1.Client-server topology
A request from a browser or mobile app rarely hits a backend service directly. It usually passes through a load balancer, then a reverse proxy or API gateway, before reaching the service that actually handles it — each layer has a distinct job.
Key features
- Client: browser or mobile app — initiates requests, renders responses
- Load balancer: distributes incoming connections across many backend instances
- Reverse proxy: sits in front of one or more services, forwarding requests on their behalf
- API gateway: a reverse proxy specialized for APIs — routing, auth, rate limiting in one place
- Backend service: the process that actually executes business logic
Who sits between the client and the code that runs
- Client — browser or mobile app
- leads to Load balancer
- Load balancer — picks a healthy instance
- leads to API gateway
- API gateway — auth, routing, rate limit
- leads to Backend service
- Backend service — runs the business logic
Command
client → load balancer → API gateway → backend service(s)
↳ reverse proxy in front of any of themA request usually passes through a load balancer, an API gateway (or reverse proxy), and only then a backend service instance — four distinct jobs, not one box.