You purged the CDN. Seconds later it served the old price again.
transcript
The price drops. You purge the CDN. Done. Seconds later, it's serving the old price again.
A price goes from 99 dollars to 79. Where is the old one hiding? In Redis. In the gateway's response cache. On many CDN edges. And in browsers. You can't push anything to a browser at all.
Watch the wrong order. You purge the CDN first. Fine so far. A request arrives. The CDN misses, and asks the origin. The origin checks Redis. Still 99. It isn't deleted yet. So the CDN caches 99 again. Then Redis is deleted. Too late.
So flip it. Update the database. Then delete Redis, right away. It's fast. Then the gateway. Then queue the CDN purge. It's slow, so it's async. Browsers? You wait out their max-age. Say 60 seconds.
Now if the CDN refills early, it refills from a fresh Redis. An outer layer can only ever copy what's inside it.
Closest to the database first. Then outward, one tier at a time. Purge the edge first, and the edge just learns the old price again.
Full breakdown in the lecture.