4 ms·
As a comparison, nginx -- which is a quite different bit of software but is sometimes used in a similar fashion to haproxy -- can be gracefully restarted severa
by greglindahl 10y ago
As a comparison, nginx -- which is a quite different bit of software but is sometimes used in a similar fashion to haproxy -- can be gracefully restarted several times per second with no issues.
- gerdesj 10y ago"which is a quite different bit of software but is sometimes used in a similar fashion to haproxy" You put your finger on it right there - it's quite different. For example can nginx tunnel an RDP session for example? No of course not - nginx is a web server (proxy) etc. They have overlapping use cases but there are quite a few bits outside the intersection of their capabilities. Even now I am mentally writing a haproxy.conf to serve web content. The static bit is easy but I'll stick to using nginx or apache for what they are good at. Obviously I wouldn't dream of letting IIS accept external inbound connections unless mediated via HAProxy ...
- lobster_johnson 10y agoNginx supports L4 (TCP/UDP) proxying just fine, just like HAProxy [1]. Nginx's HTTP(S) proxy capabilities are extensive. Not as extensive as HAProxy, but definitely close. (I don't know anything about RDP, I guess it's a binary protocol that HAProxy doesn't know anything about?) [1] https://www.nginx.com/resources/admin-guide/tcp-load-balancing/ https://www.nginx.com/resources/admin-guide/tcp-load-balanci...
- drewbug01 10y agoHAProxy is much more flexible than nginx when it comes to proxying and load-balancing non-http protocols. And, frankly - HAProxy is pretty darn flexible around HTTP too. It's not really an apples-to-apples comparison.
- deleted 10y ago[deleted]
- gerdesj 10y agoThat link goes to something peddling nginx plus. I'll stick with nginx and haproxy and use each where appropriate. For some odd reason Products -> Compare versions didn't work for me (Chrome on Linux) so I can't tell what plus brings to the show.
- lobster_johnson 10y agoNo, that link is for the open source version. *Prerequisites* Latest NGINX Open Source built with the --with-stream configuration flag, or latest NGINX Plus (no extra build steps required)
- user5994461 10y agoYour link is to nginx plus: That's the paid edition, $1900 per server. The free nginx is lagging farrrrr behind in terms of features.
- lobster_johnson 10y agoNo, that link is for the open source version. *Prerequisites* Latest NGINX Open Source built with the --with-stream configuration flag, or latest NGINX Plus (no extra build steps required)
- jsz0 10y agoNginx reloads do have some issues. I've had problems related to config changes / reloads with limit_req, upstream ip hash, resolver, and userid.
- annnnd 10y agoWhat do you mean by "with no issues"? Do you want to say that it doesn't drop connections? If that is the case, I would be curious to know more - but cursory search doesn't support this claim. [0] If you mean something else then HAproxy also supports "graceful restarts several times per second with no issues". But the article is not talking about that. EDIT: added link. [0] https://serverfault.com/questions/523417/reloading-new-nginx-configuration-with-no-downtime https://serverfault.com/questions/523417/reloading-new-nginx...
- greglindahl 10y agoI mean it didn't drop our user connections. The link you give talks about persistent HTTP connections paired with a broken http client.
- annnnd 10y agoActually the link I posted dealt with reloading config, not restarting (which is something completely different - you can't upgrade binary that way). But broken clients are everywhere, so you can't discount them. And persisten connections too, while we are at it. I did however find instructions how to properly restart Nginx without dropping connections: https://www.digitalocean.com/community/tutorials/how-to-upgrade-nginx-in-place-without-dropping-client-connections https://www.digitalocean.com/community/tutorials/how-to-upgr... Apparently it can be done (and could even be automated), but the procedure looks very generic to me (not nginx-specific). Is this what you did?