0Pricing
PHP Academy · Lesson

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

  1. From Monolith to Microservices
  2. Service Communication: REST and gRPC
  3. API Gateways and Service Discovery
  4. Resilience: Circuit Breakers and Retries
← Back to PHP Academy