Live data from Hacker News

Pingora, the proxy that connects Cloudflare to the Internet

blog.cloudflare.com

61–70 of 127 posts

Re: Pingora, the proxy that connects Cloudflare to the Internet

#61

> When crashes do occur an engineer needs to spend time to diagnose how it happened and what caused it. Since Pingora's inception we’ve served a few hundred trillion requests and have yet to crash due to our service code. > In fact, Pingora crashes are so rare we usually find unrelated issues when we do encounter one. Recently we discovered a kernel bug soon after our service started crashing. We've also discovered h…

Which aspect(s) of Rust do you think are most responsible for this? (e.g. borrow checker, memory safety, culture that attracts devs who care about reliability, etc)

It is of course a combination of all these aspects.

A type system that can express thread safety (Send/Sync traits) is incredibly valuable when building multi-threaded systems.

Universal definition of what is safe, and standard traits and borrowing rules, make APIs more predictable. Just from function's signature you know a lot about its behavior, without having to look for gotchas in the manual.

Mandatory error handling prevents cutting corners. Unit testing is built-in.

Generics, good inlining, and Cargo help split code into libraries without a performance or usability hit, which helps make focused, well-tested components.

Most of these things aren't groundbreaking, but Rust being new had a luxury of picking current best practices and sensible defaults.

Re: Pingora, the proxy that connects Cloudflare to the Internet

#62

For any of the Cloudflare team that frequents HN, curious if you have an eventual plan to open-source Pingora? I recognize it may stay proprietary if you consider it to be a differentiator and competitive advantage, but this blog post almost has a tone of "introducing this new technology!" as if it's in the cards for the future.

We are planning on open sourcing it. That's mentioned in the post near the end.

Do you think that it would be beneficial during analyst conference calls to highlight that Cloudflare is using Rust to build its next-gen critical systems? It shows a strong commitment to building best-in-class technology.

Re: Pingora, the proxy that connects Cloudflare to the Internet

#63
post #7

Should have waited to post this until it was actually ready to be open sourced. Otherwise this is just kinda like "huh, neat" without anything else to do with it.

In some cases it can be enough to know that it could be worth waiting for the release instead of putting more resources into a stack you're currently using. You might replace it entirely in a few months if the release turns out to be a product which you can and want to switch to, so it's ok to get a heads-up.

Re: Pingora, the proxy that connects Cloudflare to the Internet

#64

We did the same. We've replaced nginx/lua with a cache server (for video) written in Golang - now serving up to 100 Gbit/s per node. It's more CPU and memory efficient and completely tailored to our needs. We are happy that we moved away from nginx.

Wow ... 100 Gbit/s. Where do you work? That’s some serious traffic.

A german company building an app for watching linear TV. Netflix is actually serving 400Gbit/s per node and already have 800Gbit/s ready.

I think we can scale our setup up to 200 Gbit/s but we are too small. Total traffic is ~2 Tbit/s.

Most challenging is the missing support of QUIC/http3 and KTLS in Golang. Also 100G NIC supply chain is difficult. We use NVIDIA Connect-X 6, but it's impossible to get a version with TLS offloading.

Re: Pingora, the proxy that connects Cloudflare to the Internet

#65
post #34

Earlier quoted context omitted.

Wow ... 100 Gbit/s. Where do you work? That’s some serious traffic.

100 Gbit/s is only like 3000 concurrent viewers at 5000 KiB/s.

100 Gbit/s / 5000 KiB/s is 20000.

Re: Pingora, the proxy that connects Cloudflare to the Internet

#66

For any of the Cloudflare team that frequents HN, curious if you have an eventual plan to open-source Pingora? I recognize it may stay proprietary if you consider it to be a differentiator and competitive advantage, but this blog post almost has a tone of "introducing this new technology!" as if it's in the cards for the future.

We are planning on open sourcing it. That's mentioned in the post near the end.

It is kind of weird to point out nginx doing closed door development as a negative, and then do exactly the same thing yourself.

Re: Pingora, the proxy that connects Cloudflare to the Internet

#67
post #14

Is it open source?

It will be. There will be a follow up blog post about the open sourcing with all the gory details of how it was built and how it works.

I think you should remove the part about closed door development as a negative for nginx given the way that this has been developed.

Re: Pingora, the proxy that connects Cloudflare to the Internet

#68
post #63
post #7

Should have waited to post this until it was actually ready to be open sourced. Otherwise this is just kinda like "huh, neat" without anything else to do with it.

In some cases it can be enough to know that it could be worth waiting for the release instead of putting more resources into a stack you're currently using. You might replace it entirely in a few months if the release turns out to be a product which you can and want to switch to, so it's ok to get a heads-up.

Unfortunately, without being able to run the code yourself or at least seeing a benchmark, it's hard to commit to unreleased code like this

Re: Pingora, the proxy that connects Cloudflare to the Internet

#69
post #38

> When crashes do occur an engineer needs to spend time to diagnose how it happened and what caused it. Since Pingora's inception we’ve served a few hundred trillion requests and have yet to crash due to our service code. > In fact, Pingora crashes are so rare we usually find unrelated issues when we do encounter one. Recently we discovered a kernel bug soon after our service started crashing. We've also discovered h…

I had a very similar experience. Much smaller scale, but the service was keeping internal state and clients were connecting with a WebSocket. It could handle up to a million clients on one server and it practically never crashed. While I was writing it I had only hobby-level experience with Rust and I was also mentoring a colleague, so he wrote a big chunk of code as a total Rust noob.

Is this using Async Rust?
Post reply on HN