Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Cloudflare Ditches Nginx For In-House, Rust-Written Pingora!
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

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

ArkasArkas Moderator
edited September 2022 in News

LINUX NETWORKING --
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.

Full article:
https://www.phoronix.com/news/CloudFlare-Pingora-No-Nginx

Thanked by 2mrTom that_guy

Comments

  • MikeAMikeA Member, Patron Provider
    edited September 2022

    https://blog.cloudflare.com/how-we-built-pingora-the-proxy-that-connects-cloudflare-to-the-internet/

    We will be back with more technical details regarding the problems we faced, the optimizations we applied and the lessons we learned from building Pingora and rolling it out to power a significant portion of the Internet. We will also be back with our plan to open source it.

    &

    In production, Pingora consumes about 70% less CPU and 67% less memory compared to our old service with the same traffic load.

    Pretty cool.

  • Alibaba did something similar with TEngine, but expecting a valuable contribution back from a Chinese government-supported company, affiliated with CCP, with a normal git and commit flow,
    is a far fetched dream. Sorry Chinese guys, I'm sure you contribute in other ways.

    Thanked by 1ericls
  • Pingora is written using Rust and I think that's a pretty big endorsement for the language.

    Thanked by 1that_guy
  • @luckypenguin said:
    Alibaba did something similar with TEngine, but expecting a valuable contribution back from a Chinese government-supported company, affiliated with CCP, with a normal git and commit flow,
    is a far fetched dream. Sorry Chinese guys, I'm sure you contribute in other ways.

    They do have a git repo for it which seems somewhat sensible commit-wise, I guess the main problem would be the lack of English docs?
    https://github.com/alibaba/tengine

  • @CyberneticTitan said:
    Pingora is written using Rust and I think that's a pretty big endorsement for the language.

    https://www.zdnet.com/article/linus-torvalds-rust-may-make-it-into-the-next-linux-kernel-after-all/

    i thought this is the best "endorsement" a language can get.

    Thanked by 1that_guy
  • @Erisa said: They do have a git repo for it which seems somewhat sensible commit-wise, I guess the main problem would be the lack of English docs?

    https://github.com/alibaba/tengine

    Well aware, thanks!
    The "issue" is they never work with upstream, they do their stuff for their own good. Just like most
    Chinese stuff. Try to find a firmware for your XXX Chinese device that is 99% based on GPL.
    I'm sure CF will behave better, as it's not a hard fork but looks like an entirely new web server.
    This is actually why nginx was born in Rambler by Igor Sysoev, he didn't like the performance of
    Apache back in the 00s.

    Thanked by 1Erisa
  • @luckypenguin said: The "issue" is they never work with upstream,

    Ah right, thought I was missing something, thanks. Yeah I wouldn't expect that from them either.

    @luckypenguin said: I'm sure CF will behave better, as it's not a hard fork but looks like an entirely new web server.

    Yeah. It's a new webserver designed to proxy traffic as fast as possible. As you say, it reminds of the Nginx succeeding Apache days, very much the same idea since their goal is to be faster than Nginx. Will be pretty exciting to see it.

    Thanked by 1luckypenguin
  • @luckypenguin said:
    Alibaba did something similar with TEngine, but expecting a valuable contribution back from a Chinese government-supported company, affiliated with CCP, with a normal git and commit flow,
    is a far fetched dream. Sorry Chinese guys, I'm sure you contribute in other ways.

    When you said other ways, I thought you would mention openresty 😂

  • @fadedmaple said: When you said other ways, I thought you would mention openresty 😂

    Ha, nice, but no, Chinese guys actually commit so many stuff to many open source stuff, so
    it would be rude to categorize them all under some stereotype. I meant exactly what I said,
    and no offense should be taken, when I imply that many Chinese projects just fork something
    and never contribute back.

Sign In or Register to comment.