0
0
AWScloud~10 mins

Edge locations and CloudFront overview in AWS - Step-by-Step Execution

Choose your learning style9 modes available
Process Flow - Edge locations and CloudFront overview
User requests content
Request sent to nearest Edge Location
Edge Location checks cache
Serve cached
Content delivered to User
Edge caches content for future requests
User requests go to the closest edge location. If content is cached there, it is served immediately. Otherwise, the edge fetches from the origin, delivers it, and caches it for next time.
Execution Sample
AWS
User -> Edge Location -> Cache? -> Serve or Fetch -> Deliver -> Cache
Shows the path of a user request through CloudFront edge locations and caching behavior.
Process Table
StepActionCache CheckResultContent SourceUser Delivery
1User requests contentN/AN/AN/AWaiting
2Request reaches nearest edge locationCheck cacheCache missOrigin serverWaiting
3Edge fetches content from originN/AContent retrievedOrigin serverWaiting
4Edge delivers content to userN/ADeliveredEdge cacheDelivered
5Edge caches contentN/ACached for futureEdge cacheN/A
6User requests same content againCheck cacheCache hitEdge cacheDelivered
7Edge delivers cached contentN/ADeliveredEdge cacheDelivered
💡 Content is delivered either from cache or origin; subsequent requests use cached content until expiration.
Status Tracker
VariableStartAfter Step 2After Step 3After Step 5After Step 7
Cache StatusEmptyMissMissCachedHit
Content LocationOriginOriginOriginEdge cacheEdge cache
User Delivery StatusWaitingWaitingWaitingDeliveredDelivered
Key Moments - 3 Insights
Why does the edge location fetch content from the origin server?
Because the cache check at step 2 shows a cache miss, so the edge must get the content from the origin (see execution_table row 2).
What happens when the user requests the same content again?
At step 6, the cache check results in a cache hit, so the edge serves the cached content directly without contacting the origin (see execution_table row 6).
Does the user always get content from the origin server?
No, only on the first request or cache miss. Later requests get content from the edge cache (see execution_table rows 4 and 7).
Visual Quiz - 3 Questions
Test your understanding
Look at the execution table, what is the cache status after step 5?
ACache is empty
BCached
CCache miss
DCache hit
💡 Hint
Check the 'Cache Status' variable after step 5 in variable_tracker.
At which step does the edge location deliver content to the user for the first time?
AStep 4
BStep 3
CStep 6
DStep 7
💡 Hint
Look at the 'User Delivery' column in execution_table for when content is first marked 'Delivered'.
If the cache never stored content, how would step 6 change?
AUser would not receive content
BContent would be delivered from edge cache
CCache hit would become cache miss
DOrigin server would be bypassed
💡 Hint
Refer to execution_table row 6 and variable_tracker for cache status changes.
Concept Snapshot
CloudFront uses edge locations to deliver content quickly.
User requests go to the nearest edge location.
If content is cached, it is served immediately.
If not cached, edge fetches from origin and caches it.
Subsequent requests use cached content until expiration.
Full Transcript
When a user requests content, the request goes to the nearest CloudFront edge location. The edge checks if it has the content cached. If yes, it serves the cached content immediately, making delivery fast. If not, the edge fetches the content from the origin server, delivers it to the user, and stores it in its cache for future requests. This process reduces latency and load on the origin server by serving repeated requests from edge caches.