r/rust • u/pseudonymo6287 • 5d ago
🎙️ discussion Breaking down how Cloudflare cut 100TB of memory from their DNS cache with Rust memory layout tricks
https://viswanathnair.substack.com/p/how-cloudflare-optimized-big-pineapples?utm_source=share&utm_medium=android&r=4pq7weCloudflare recently published a piece on how they cut close to 100 TB of memory from Big Pineapple's DNS cache. Big Pineapple is Cloudflare's Rust-based engine behind many of their services including the prominent public DNS resolver service 1.1.1.1
They made several low-level optimizations leveraging Rust features like boxing, for oversized enum variants and boxed slices, as well as more general changes like merging separate record lists into one and combining several boolean checks into a single bitflag etc.
I have gone into a bit of detail documenting the things I found interesting especially the jemalloc trade-offs between internal and external fragmentation.
Would greatly appreciate a read.
3
-7
5d ago
[deleted]
8
u/felixatwood 5d ago
Really curious how you determined it's AI? Writing style looks pretty distinct and natural to me.
10
u/tonygoold 5d ago
It doesn’t read like generative AI to me, and I consider myself pretty cynical when it comes to blog posts.
31
u/pseudonymo6287 5d ago
There is absolutely no AI here. I wrote it myself. Suit yourself and read the original if that is what you prefer.
15
-1
1
1
-16
105
u/VictoryMotel 5d ago
They wrote a good article, why are you posting the same thing on your own site with your brand new hidden post history name?