2dbi

Difference between a load balancer and an API gateway?

via2dbi

A conceptual systems question on two often-confused components.

  • Load balancer: distributes incoming traffic across multiple backend instances for scalability and availability. Operates at L4 (TCP/UDP) or L7 (HTTP), with health checks and strategies like round-robin, least-connections, or hashing.
  • API gateway: an application-layer entry point in front of services that handles routing, authentication/authorization, rate limiting, request/response transformation, caching, and aggregation across multiple services.

Overlap & when to use each: both can do L7 routing, but the gateway adds API-management concerns (auth, quotas, versioning). In practice they're layered — a load balancer in front of gateway instances, which then route to backend services.

Add a follow-up question they asked
Responsibilities of each
Where each sits in the path
asked …
LeaderboardSalary
Language
Account