92 ms·
Weird that they didn't use HAProxy in the first place if they are (apparently) not even using it to serve files from filesystem
by xani_ 4y ago
Weird that they didn't use HAProxy in the first place if they are (apparently) not even using it to serve files from filesystem
- jgrahamc 4y agoWe had a great deal of experience with NGINX and the original architecture for Cloudflare was based on NGINX. When we came to move away from it we wanted to fully own our destiny (as we had done years before when writing our own DNS server) and so moving to HAProxy would not have made sense.
- aukaost 4y agoThey were wondering why the original architecture was using NGINX over HAProxy, not why HAProxy wasn't chosen as an NGINX replacement.
- jgrahamc 4y agoI think because Lee Holloway (the technical founder of Cloudflare) was used to use NGINX and so he used it for the original architecture. It's also the case that Pingora replaced part of something that handled both connections to origin servers and reading from cache. So the comment about "not serving files" isn't 100% correct as the NGINX instance was serving files as part of its work.
- xani_ 4y agoWell, it does offer more varied stuff from the get go so I can see why someone wouldn't want to limit their options, HAProxy was and is purely a proxy while NGINX is a bit of everything. SPOE/SPOA added a bit of programmability to HAProxy but it is still basically only messing around with headers and acting upon that, nothing to do with content.
- neomantra 4y agoBack in the day, Cloudflare's WAF was based on OpenResty, so the high-performance Lua-programmability at the edge (which is noted in this blog entry) was probably a factor. Quick research shows HAProxy added Lua support in 2015, which is a bit later than their use of OpenResty.
- jgrahamc 4y agoYeah, I know, I wrote that WAF.
- mh- 4y agoThis exchange is almost as enjoyable as that "famous" thread about someone's math prowess (anyone have that link?)
- neomantra 4y agoHaha, I missed that you had an intermediate comment -- thanks for all you+Cloudflare did for LuaJIT too :)
- jgrahamc 4y agoLuaJIT is a cool thing. Helped us a lot. But not everything remains the right thing forever.
- anonymoushn 4y agonginx certainly did serve cached files from the filesystem.
- eastdakota 4y agoLee actually looked at HAProxy when we were building the first prototype of Cloudflare but found he could get better performance and extensibility from NGINX. Things obviously evolved, but we considered HAProxy early on and decided to go another way.