In this lesson · topic 3 of 7
Topic 3
Move the TTL and watch the origin
8 min read
What the lab runs
Ten requests arrive each tick for 100 objects. Popularity is skewed, so a handful of objects take most of the traffic. Each request lands on one of the edges at random. An edge keeps a copy for the TTL you set. Every tick there is a chance that one object changes at the origin.
The lab shows the edge hit ratio, how many requests reached the origin, how many responses were older than the current version, and the average latency. A hit costs 20 ms, a shield hit 60 ms, and an origin trip 180 ms.
Predict before you press play
Things to try
- Set the TTL to 300 and read the hit ratio and the stale share.
- Switch the cache key to path plus tracking value.
- Turn the shield on and compare origin requests.
- Set the TTL to 300 and turn purge on.
- Raise the edge count from 4 to 8.
The full-page lab has a guided experiment for each of these, and for stale while revalidate.