Amazon CloudFront
Global Content Delivery Network (CDN) for high-speed, secure data transfer to users worldwide.
The Architecture Ingredients
Origin Server
The source of truth. Can be an S3 bucket, EC2 instance, or an HTTP server where your original content lives.
Edge Locations
A global network of data centers that cache copies of your content closer to your viewers.
Distributions
The configuration that tells CloudFront where to fetch content and how to deliver it (HTTP/HTTPS).
TTL (Time to Live)
Determines how long your content stays in the cache before CloudFront checks the origin for updates.
How It Works: The Request Flow
The journey from user request to content delivery
The User Request
A user requests a file. DNS routes the request to the nearest Edge Location.
Cache Inspection
If the file is in the cache (Hit), it’s served instantly. If not (Miss), CloudFront fetches it.
Content Delivery
The content is delivered to the user and cached at the Edge for the next request.