How Cloudflare Optimized their Reverse Proxy with Tries
Cloudflare optimized their reverse proxy performance by using a data structure called a trie. This change cut latency by 75% for a path handling 35 million requests per second. Their process included extensive benchmarking with the Rust criterion crate, inverting their header removal function, and creating a custom optimized trie implementation. This effort's result was a reduction in average header removal time from 3.65 to 0.93 microseconds.
