Content Deep Dive
A good day to trie-hard: saving compute 1% at a time
Blog post from Cloudflare
Post Details
Company
Date Published
Author
Kevin Guthrie
Word Count
1,801
Language
English
Hacker News Points
-
Summary
Cloudflare has developed an open-source Rust crate to reduce CPU utilization and enable its Content Delivery Network (CDN) to handle more of the world's increasing web traffic. The company optimized a function called clear_internal_headers, which was consuming over 1.7% of pingora-origin's total CPU time. By implementing a new data structure called trie-hard, they reduced the compute utilization of pingora-origin by 1.28%. The optimized function has been running in production since July 2024 and its performance closely matches the predictions from benchmarking tests.