Hacker News new | ask | show | jobs
by buzer 2947 days ago
HAProxy and network layer load balancers are very different kind of beasts. HAProxy requires, for example, you to return your traffic via HAProxy which can make HAProxy a bottleneck, requests are usually smaller than responses. HAProxy will also require you to terminate your connections which will make you lose your source IP address if you cannot get it using proxy protocol.

There are also various other benefits, but network layer balancers do have their own share of downsides as well. Like you need to have pretty big control over your infra in order to use them (generally speaking it's not feasible to use them in public clouds), configuration is more complex, they won't do TLS for you etc.

1 comments

HAProxy can be run as a layer 4 load balancer[0]. I think your comment is assuming it's running at http layer?

[0] https://www.haproxy.com/blog/layer-4-load-balancing-nat-mode...

It still requires you to terminate the connection on HAProxy. None of the things I mentioned are affected (you lose source IP without proxy protocol, return traffic must pass thru HAProxy, you can do TLS).