Reverse Proxy vs. API Gateway vs. Load Balancer
Reverse proxies, API gateways, and load balancers compared by responsibility.
Reverse proxies, API gateways, and load balancers often sit close together in a request path, which is why they get conflated. In practice they solve related but different problems. The easiest distinction is to ask what decision each one is primarily responsible for.
Reverse proxy: the server-side entry point
A reverse proxy sits in front of one or more backend services and represents them to the client. Clients connect to the proxy, not directly to the application servers behind it.
Its core job is mediation at the edge. Typical responsibilities include TLS termination, host and path routing, caching, compression, request filtering, hiding internal topology, and sometimes simple load balancing.
Think of it as the managed front door for server infrastructure.
Load balancer: distribute traffic across healthy targets
A load balancer’s primary job is traffic distribution. It decides which healthy backend instance should receive a request. That can happen at layer 4 using transport information such as IP and port, or at layer 7 using HTTP-aware rules.
Health checks are central here. A load balancer should stop routing traffic to unhealthy instances quickly. It may also consider weights, connection counts, latency, or geographic location when choosing a target.
A reverse proxy can load balance, but load balancing is a narrower responsibility than everything a reverse proxy may do.
API gateway: manage API-specific policy
An API gateway usually sits in front of application programming interfaces and adds API-aware concerns that go beyond generic traffic routing. These often include authentication, authorisation, per-client rate limits, request transformation, quota enforcement, API keys, tenant isolation, version routing, and developer-facing observability.
In a microservices environment, an API gateway can present one coherent API surface while hiding many internal services. It becomes the policy enforcement layer for consumers.
Why people mix them up
Modern products overlap heavily. Envoy, NGINX, cloud gateways, and managed ingress systems can perform parts of all three roles. So the categories are architectural, not product-bound.
One component may terminate TLS like a reverse proxy, distribute traffic like a load balancer, and enforce API keys like a gateway. That does not make the concepts identical. It means the software is multifunctional.
Choosing the right abstraction
If the main need is a stable edge in front of servers, reach for a reverse proxy. If the main need is spreading traffic across healthy instances, focus on load balancing. If the main need is consumer-specific API governance, use an API gateway.
Large systems often use all three functions, whether in separate layers or collapsed into fewer components. A public request might hit a global load balancer first, then a reverse proxy or ingress layer, then an API gateway for policy before reaching services.
Practical takeaway
These are not competing superheroes. They are different control points in the request path. The useful question is not which label sounds best. It is which decision you need enforced at that point in the architecture: entry mediation, target selection, or API policy.