5

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

 2 years ago
source link: https://www.phoronix.com/news/CloudFlare-Pingora-No-Nginx
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

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

Written by Michael Larabel in Linux Networking on 15 September 2022 at 02:56 PM EDT. 43 Comments

Cloudflare has long relied upon Nginx as part of its HTTP proxy stack but now has replaced it with their in-house, Rust-written Pingora software that is said to be serving over one trillion requests per day and delivering better performance while only using about a third of the CPU and memory resources.

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.

image.php?id=2022&image=cloudflare_pingora_med
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.

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK