4. 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
5. 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
10. 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)
11. 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
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
Cross-Cutting concerns: Authorization (JWT validation), SSL at a single point
Think of it like the facade patternActs as a reverse proxyWhat is the problem with this pattern?acts as a monolithic aggregator or orchestrator and violates microservice autonomy by coupling all the microservicesAPI Gateways should be segregated based on business boundaries and the client apps and not act as a single aggregator for all the internal microservices.