Live data from Hacker News

NGINX open sources TCP load balancing

hg.nginx.org

11–20 of 121 posts

Re: NGINX open sources TCP load balancing

#12

Can someone explain how this is superior to HAproxy?

from what i understand, this could be used for anything tcp related (here[0] they said it could be used to proxy mysql, ldap, rtmp and they use pop3 as an example).

i thought haproxy was used basically to proxy http stuff, not general tcp.

[0] http://nginx.com/resources/admin-guide/tcp-load-balancing/

Re: NGINX open sources TCP load balancing

#14
Many installations would go from haproxy->nginx to nginx->nginx. Having to support a single product will make many devops happy.

In the same tense, haproxy is adding Lua support[1], which has been available in nginx - using openresty[2] - since 2011, and nginx core is doing the same with Javascript[2].

Interesting times aroung haproxy and nginx.

[1] http://blog.haproxy.com/2015/03/12/haproxy-1-6-dev1-and-lua/

[2] http://www.openresty.org

[3] http://www.infoworld.com/article/2838008/javascript/nginx-ha...

Re: NGINX open sources TCP load balancing

#16
post #6

Does that mean that I can now put NGINX in front of a cluster of TCP (non HTTP) servers and get NGINX to cleverly load balance the incoming requests to the individual nodes ?

That's correct. It's configured in much the same way as HTTP proxying, with a few different load balancing methods (least connections, consistent hashing).

Re: NGINX open sources TCP load balancing

#17

Can someone explain how this is superior to HAproxy?

from what i understand, this could be used for anything tcp related (here[0] they said it could be used to proxy mysql, ldap, rtmp and they use pop3 as an example). i thought haproxy was used basically to proxy http stuff, not general tcp. [0] http://nginx.com/resources/admin-guide/tcp-load-balancing/

You can do tcp loadbalancing with haproxy, you can't do udp though.

Re: NGINX open sources TCP load balancing

#18

Can someone explain how this is superior to HAproxy?

from what i understand, this could be used for anything tcp related (here[0] they said it could be used to proxy mysql, ldap, rtmp and they use pop3 as an example). i thought haproxy was used basically to proxy http stuff, not general tcp. [0] http://nginx.com/resources/admin-guide/tcp-load-balancing/

HAProxy is used for TCP too. The main benefit from my perspective is that there is one less component in the stack. Whereas I would previously need HAProxy running alongside NGINX to balance TCP and HTTP, I can now do all of this with NGINX.

Re: NGINX open sources TCP load balancing

#19
post #18

Earlier quoted context omitted.

from what i understand, this could be used for anything tcp related (here[0] they said it could be used to proxy mysql, ldap, rtmp and they use pop3 as an example). i thought haproxy was used basically to proxy http stuff, not general tcp. [0] http://nginx.com/resources/admin-guide/tcp-load-balancing/

HAProxy is used for TCP too. The main benefit from my perspective is that there is one less component in the stack. Whereas I would previously need HAProxy running alongside NGINX to balance TCP and HTTP, I can now do all of this with NGINX.

But why not just use HAProxy? It is often used for plain TCP load balancing (we use it).
Post reply on HN