← Microservices learning path
Microservices · Module 4 of 10

API gateway and service discovery

Route requests and find services dynamically.

📖 Key ideas

  1. An API gateway is the single entry point for clients.
  2. It handles routing, authentication, rate limiting and aggregation.
  3. Service discovery lets services find each other's addresses.
  4. Kubernetes DNS and service registries (Consul, Eureka) provide discovery.
  5. 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