logo
episode-header-image
Oct 2024
1h 2m

Cloudflare's 150ms global cache purge | ...

Hussein Nasser
About this episode

Cloudflare built a global cache purge system that runs under 150 ms.


This is how they did it.


Using RockDB to maintain local CDN cache, and a peer-to-peer data center distributed system and clever engineering, they went from 1.5 second purge, down to 150 ms.


However, this isn’t full picture, because that 150 ms is just actually the P50. In this video I explore Clouldflare CDN work, how the old core-based centralized quicksilver, lazy purge work compared to the new coreless, decentralized active purge. In it I explore the pros and cons of both systems and give you my thoughts of this system.


0:00 Intro

4:25 From Core Base Lazy Purge to Coreless Active

12:50 CDN Basics

16:00 TTL Freshness

17:50 Purge

20:00 Core-Based Purge

24:00 Flexible Purges

26:36 Lazy Purge

30:00 Old Purge System Limitations

36:00 Coreless / Active Purge

39:00 LSM vs BTree

45:30 LSM Performance issues

48:00 How Active Purge Works

50:30 My thoughts about the new system

58:30 Summary


Cloudflare blog

https://blog.cloudflare.com/instant-purge/



Mentioned Videos


Cloudflare blog

https://blog.cloudflare.com/instant-purge/



Percentile Tail Latency Explained (95%, 99%) Monitor Backend performance with this metric

https://www.youtube.com/watch?v=3JdQOExKtUY


How Discord Stores Trillions of Messages | Deep Dive

https://www.youtube.com/watch?v=xynXjChKkJc


Fundamentals of Operating Systems Course

https://os.husseinnasser.com


Backend Troubleshooting Course

https://performance.husseinnasser.com

Up next
Oct 22
Developers will be prompters (and that is bad)
I discuss the state of what will be happening in the coming few years and why I encourage the 3 of you who want to be elite engineers to keep their critical thinking sharp. To pause and think before prompting. 
9m 26s
Oct 15
AI will not replace elite engineers
This is a conversation with Rashed Hasan, a PhD Candidate from the University of Nebraska. We chatted about databases, ORMs and how to use AI without losing yourself. Rashed pagehttps://www.mdrashedulhasan.me/homepage 
56m 28s
Sep 25
Engineers will be out of the 'Loops'
I discuss loops engineering and how it will numb creative thinking and critical system design for engineers. 
12m 58s
Recommended Episodes
Mar 2019
Hacking
This episode is about hacking. 
10m 9s
Jun 2025
Hiding in plain sight with vibe coding.
This week, Dave is joined by ⁠Ziv Karliner⁠, ⁠Pillar Security⁠’s Co-Founder and CTO, sharing details on their work on "New Vulnerability in GitHub Copilot and Cursor: How Hackers Can Weaponize Code Agents." Vibe Coding - where developers use AI assistants like GitHub Copilot and ... Show More
21m 49s
Aug 2022
Talos Takes Ep. #72: Emergency Apache HTTP Server episode
<div>Sorry for dropping two episodes in the feed in one day, but we also needed to find time to talk about the critical zero-day vulnerability in Apache HTTP Server. An attacker could exploit this vulnerability to perform path traversal and eventually remote code execution. Patch ... Show More
5m 5s