CDN vs Load Balancer

There is often confusion because both "distribute traffic". But they do it differently.

CDN (Content Delivery Network)

Primary Goal: Speed / Caching.

Location: At the Edge (thousands of locations).

Workload: Static files (Images, CSS, JS) and TLS termination.

Load Balancer (ELB/ALB)

Primary Goal: Scale / Health / Logic.

Location: In the Datacenter (in front of the servers).

Workload: Distributing dynamic requests to compute instances.

The Verdict

You almost always need both. The CDN protects the Load Balancer from volume. The Load Balancer protects the servers from inequality.