API Gateways and Service Discovery
Route, aggregate and locate services dynamically.
Gateways & Discovery
Once you have a dozen services, two problems appear. Clients shouldn't need to know each service's address or call five of them to render one screen — that's the API gateway's job. And services that scale up/down and move IPs need a way to find each other — that's service discovery.
This lesson covers both, with PHP at the gateway edge.
What an API Gateway Does
An API gateway is a single entry point in front of your services. Typical responsibilities:
- Routing requests to the right backend.
- Cross-cutting concerns: authentication, rate limiting, CORS, TLS termination.
- Aggregation: compose several backend calls into one client response.
- Protocol translation: external REST in, internal gRPC out.
It keeps clients simple and centralizes policy you'd otherwise duplicate in every service.
All lessons in this course
- From Monolith to Microservices
- Service Communication: REST and gRPC
- API Gateways and Service Discovery
- Resilience: Circuit Breakers and Retries