www.domstamand.com@DOMZE DOMZE
API GATEWAY
www.domstamand.com@DOMZE DOMZE
Qui suis-je?
Développeur Senior pour EquiSoft
15+ ans d’expérience en prog
Commencé en Access (VB + SQL )
Puis en PHP 3…5
Puis maintenant en .NET et cie
Les enjeux
www.domstamand.com@DOMZE DOMZE
Les enjeux
• Plusieurs services/endpoints
• Couplement des applications aux services
• Les applications doivent connaitre les services spécifiques
• Différents protocoles
• Performance du réseau
• Plusieurs requêtes (server-side/spa apps) vs quelques requêtes (mobiles)
• Roundtrips!
• Microservices sont distribués(load-balanced)
• Regroupement par types de clients
• Mobile
• Desktop
• Securité
• DDOS par exemple
www.domstamand.com@DOMZE DOMZE
Les enjeux
• Concerns pouvant être partagés vs être dans chaque service
• Authentication and authorization
• Service discovery integration
• Response caching
• Retry policies, circuit breaker, and QoS
• Rate limiting and throttling
• Load balancing
• Logging, tracing, correlation
• Headers, query strings, and claims transformation
• IP whitelisting
API Gateway patterns
www.domstamand.com@DOMZE DOMZE
Single API Gateway
www.domstamand.com@DOMZE DOMZE
Backend For FrontEnd API Gateway pattern (BFF)
Pitfalls
www.domstamand.com@DOMZE DOMZE
Pitfalls
• Rajoute du développent et des coûts
• Rajoute un peu de temps de réponse due au proxying
• Moins d’impacte que du « chattiness »
• Peut être un problème
• Rajoute un point of failure
• Si n’est pas bien scalled out (bottleneck)
www.domstamand.com@DOMZE DOMZE
Pitfalls
• Faire attention lorsque vos microservices sont déployés dans un
environnement classique IIS ayant un load balancer en avant
• Avoir un API Gateway peut devenir inutile
• API Gateway peut devenir une indirection de plus pour vos services
Load balancer
API Gateway API Gateway API Gateway
Implémentations
www.domstamand.com@DOMZE DOMZE
Implémentations
• Version cloud (most known)
• Azure API Management
• Google Apigee
• Mulesoft
• Version On-Premise
• OCELOT (lightweight)
• .NET Core based

Api gateway

Notes de l'éditeur

  • #5 Coupling : Microservices evolution – what if we break the services into more services or do massive refactoring? Round trips: request aggregation Security issues: Attacks are larger if they are geared towards all your services Performance: reduce chatty communication
  • #6 Cross-Cutting concerns: Authorization (JWT validation), SSL at a single point
  • #8 Think of it like the facade pattern Acts as a reverse proxy What is the problem with this pattern? acts as a monolithic aggregator or orchestrator and violates microservice autonomy by coupling all the microservices API Gateways should be segregated based on business boundaries and the client apps and not act as a single aggregator for all the internal microservices.
  • #12 API Gateways are cute but!