3 ms·
After reading that original article, I'm wondering how HAproxy would have stacked up against Nginx. It seems much more suited to their use cases. That said, I'm
by orthecreedence 3y ago
After reading that original article, I'm wondering how HAproxy would have stacked up against Nginx. It seems much more suited to their use cases. That said, I'm all for new infrastructure built in Rust, and it's cool Pingora is set up composably so you can build your own LB/proxy without having to implement everything from scratch if you want to.
- arandomusername 3y agoAFAIK HAProxy also uses lua, so it would probably suffer in terms of performance quite similarly in that aspect. There's also the memory safety aspect with Rust.
- VWWHFSfQ 3y agoI've never heard anybody suggest that nginx with luijit suffers from performance issues.
- steveklabnik 3y agoI worked at Cloudflare, but long ago, and not on this sort of thing. Cloudflare has extensive experience with both of these things, including employing Mike Pall for a time. That they've invested in Pingora instead is an interesting data point precisely due to that deep expertise at scale. As they say in the link that started this subthread: > In production, Pingora consumes about 70% less CPU and 67% less memory compared to our old service with the same traffic load. The savings come from a few factors. > > Our Rust code runs more efficiently compared to our old Lua code. On top of that, there are also efficiency differences from their architectures. For example, in NGINX/OpenResty, when the Lua code wants to access an HTTP header, it has to read it from the NGINX C struct, allocate a Lua string and then copy it to the Lua string. Afterwards, Lua has to garbage-collect its new string as well. In Pingora, it would just be a direct string access.
- deleted 3y ago[deleted]