Cloud Parts

Load balancer, API gateway or CDN?

DimensionLoad balancersAPI gatewaysCDNs
Main jobSpread traffic over healthy backendsAuthenticate, throttle and route API callsServe cached content near users
Where it runsIn your region, before your serversIn your region, before your APIsHundreds of edge locations worldwide
Caches responsesNoOptionallyYes, that’s its purpose
Knows callers and API keysNoYesOnly simple rules at the edge
Reach for it forAny service with more than one instancePublic and partner APIsStatic assets and global audiences

Rule of thumb

A common production path uses all three in a row: the CDN at the edge, then an API gateway or layer-7 load balancer, then your services.

Sources