Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


What 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...


I mean it didn't drop our user connections.

The link you give talks about persistent HTTP connections paired with a broken http client.


Actually 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-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?


"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 ...


Nginx 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-balanci...


HAProxy 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.


That 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.


No, 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)


Your link is to nginx plus: That's the paid edition, $1900 per server.

The free nginx is lagging farrrrr behind in terms of features.


No, 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)


Nginx reloads do have some issues. I've had problems related to config changes / reloads with limit_req, upstream ip hash, resolver, and userid.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: