← Microservices learning pathMicroservices · Module 4 of 10
API gateway and service discovery
Route requests and find services dynamically.
📖 Key ideas
- An API gateway is the single entry point for clients.
- It handles routing, authentication, rate limiting and aggregation.
- Service discovery lets services find each other's addresses.
- Kubernetes DNS and service registries (Consul, Eureka) provide discovery.
- Backend-for-Frontend (BFF) tailors APIs per client type.
💡 Real-life example: The API gateway is a mall's main entrance with a guard and directory board.
API gatewaySingle client entry point
Service discoveryFinding service locations dynamically
Service registryDirectory of service instances
BFFBackend for Frontend