patternModeratepending
API gateway pattern -- single entry point for microservices
Viewed 0 times
API gatewayroutingaggregationKongrate limitingsingle entry point
Problem
Clients need to know about multiple microservice URLs, handle authentication separately for each, and make multiple calls for a single page. Each service has different protocols and formats.
Solution
API gateway sits between clients and services: (1) Single entry point: one URL for all services. (2) Request routing: /users -> user service, /orders -> order service. (3) Cross-cutting concerns: auth, rate limiting, logging, CORS handled once. (4) Response aggregation: combine data from multiple services. (5) Protocol translation: REST to gRPC, WebSocket proxying. Tools: Kong, APISIX, AWS API Gateway, Nginx, Traefik.
Why
Without a gateway, each client must implement service discovery, authentication, and error handling for every microservice independently. The gateway centralizes these concerns.
Revisions (0)
No revisions yet.