Cloudflare Ditches Nginx For In-House, Rust-Written Pingora

Cloudflare has "outgrown" Nginx and ended up creating their own HTTP proxy stack. Cloudflare found that Nginx's worker process architecture was hitting drawbacks, particularly around CPU resources. Nginx also proved to be difficult to extend to their needs.
Cloudflare engineers have been developing Pingora from scratch as an in-house solution. The Rust programming language was chosen for its memory safety while still delivering C-like performance. Cloudflare also implemented their own HTTP library for Rust in order to suit all of their different needs. Pingora employs a multi-threaded architecture rather than multi-process.
Cloudflare Pingora diagram.
As for the performance benefits with Pingora:
In production, Pingora consumes about 70% less CPU and 67% less memory compared to our old service with the same traffic load.
Beyond the staggering performance wins, Pingora is also deemed safer thanks in large part to the use of Rust.
Those wishing to learn more about Cloudflare's Pingora project can do so via the Cloudflare blog. The only downside is that Pingora isn't yet open-sourced -- Cloudflare says they are working out the plans to, but as of right now this HTTP proxy isn't yet public.
105 Comments