Does anyone know why nginx used separate processes for workers, instead of threads? This post makes it sound like threads are the way to go, but presumably nginx had a reason for using processes back in the day.
Pingora, the proxy that connects Cloudflare to the Internet
51–60 of 127 posts
Re: Pingora, the proxy that connects Cloudflare to the Internet
#52Re: Pingora, the proxy that connects Cloudflare to the Internet
#53Earlier quoted context omitted.
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.
Curses! now I need to learn yet another language!
Re: Pingora, the proxy that connects Cloudflare to the Internet
#54Earlier quoted context omitted.
When is night on the internet?
Most—maybe damn near all—sites see significant dips in traffic for at least a few hours a day. Which part of the day, depends on the site. More often than not, it's while the team is asleep and staffing, if any, is at its lowest point, since teams tend to live roughly in the same ~half of the world that their products are most-used in. Plus there's practically no-one in the Pacific until you reach Japan, and not a to…
(it's getting rarer, but it does still happen. Fraud prevention cranked up is definitely a thing on any large enough ecommerce website)
Re: Pingora, the proxy that connects Cloudflare to the Internet
#55Re: Pingora, the proxy that connects Cloudflare to the Internet
#56I share lots of feelings towards NGINX that Cloudflare mention on this blog post. New features like 103 Early Hints and HTTP/3 exist in HAProxy and Caddy but there is nothing coming in NGINX.
nginx was good for a decade or two. they were acquired and doomed to irrelevancy since.
I think I read two weeks ago what F5 was going to focus more on improving the open source version. Probably because the competition is getting harder and they're noticing it in a market share decline, but whichever the reason is, this was good to hear.
Also it was good to see it no longer being part of a Russian company, even though the devs and owners are good people. You never know how a government can enforce some problematic behavior, specially one which is known for liking to throw people out of high rise windows.
Re: Pingora, the proxy that connects Cloudflare to the Internet
#57> 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)
1. Only making valid states possible, to the greatest extent reasonably possible.
2. Treating error as regular data, not an afterthought - with language features to make that not too painful.
3. Not returning placeholder values (i.e. if you get back a parsed value from a parse function, it means it parsed correctly, not that either there's an error somewhere else or it parsed correctly).
Language features, in particular "enums" (aka algebraic data types, aka tagged unions), make this approach possible. You couldn't do it in go, for instance, even if there was a cultural decision to.
Re: Pingora, the proxy that connects Cloudflare to the Internet
#58Is 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.
Re: Pingora, the proxy that connects Cloudflare to the Internet
#59I'm mildly blown away to read, 'And the NGINX community is not very active, and development tends to be “behind closed doors”.' Is this a reflection of the company, nginx (now owned by F5) going the way of an Oracle-style takeover of WebLogic from another era?
Some of the OSS papercuts with nginx:
- nginx has always used a "submit a patch to a mailing list" style of contributions. Many contributions, my own attempt a decade ago, just get ghosted: https://mailman.nginx.org/pipermail/nginx-devel/2010-Decembe...
- Neither the contributing page (http://nginx.org/en/docs/contributing_changes.html) nor the Mercurial repo (http://hg.nginx.org/) redirect to HTTPS!
- Tests were a later addition and in a distinct repo with a bespoke harness. I'm sure it has advantages, but it also takes extra work for contributors to figure out.
- They use Trac?! I loved Trac circa 2008 but had no idea it was still a thing. I can't even login to it without it timing out.
I don't want to nitpick an excellent project like nginx, but I think it's clear that easing third party contributions has never been a high priority.