Company
Date Published
Sept. 10, 2024
Author
Kevin Guthrie
Word count
1801
Language
English
Hacker News points
None

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.