An API gateway is the customer-facing entry point into a microservices application. It can serve the frontend UI and expose a REST API that forwards client requests to backend services. section 10.7.3 section 10.13
A gateway commonly handles these responsibilities:
- Serves the browser-based frontend through which customers interact with the application. section 10.7.3
- Forwards HTTP requests into the cluster and presents backend capabilities through client-facing routes. section 10.7.3
- Provides a place to add authentication before allowing users to reach backend microservices. section 10.7.3
- Supports either one shared gateway or separate gateways for web, mobile, and administrator frontends when their requirements differ. section 10.7.3
Forwarding a video request
In FlixTube, the browser requests GET /api/video from the gateway. The gateway requests the video-streaming service, receives a stream, and pipes it back to the browser. The video-streaming service separately forwards the video-storage request and emits a viewing event, keeping those backend responsibilities separate from the gateway. section 10.7.5
Compare a single gateway with a possible backends-for-frontends design for browser, mobile, and administrator access. section 10.7.3





