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

While the OP is about metrics when it comes to load balancing IPVS from the LVS project http://www.linuxvirtualserver.org/software/ipvs.html is often overlooked. If you're trying to balance a lot of connections/traffic (and aren't/don't want to buy a hardware load balancer) you'll get much better performance with IPVS than HAProxy or nginx.


I've used IPVS a lot in the past and it worked well in a lot of ways. We had a number of problems with ldirectord getting wedged after months of uptime, and the tools are all a little primitive, but IPVS itself works quite well. The amount of traffic it can handle, especially in the "direct routing" configuration, is stunning.

But, I can't imagine going back to it from haproxy. Haproxy allows so many other things including nice status page, agent and service checks, SSL termination, great monitoring (we use Influxdb/telegraf/grafana and Icinga2), and really advanced routing of requests (SNI, path, pretty much anything in the requests).


I guess it depends what you're load balancing, you do get pool checks from ipvs and node_exporter has an ipvs collector if you're using prometheus (we are). As you say the amount of traffic it can handle in comparison in stunning and especially if you're load balancing over a large number of ports it's less to configure than HAProxy, but it works at level 4 so if you need HTTP stuff it's not much help.


And to return to what the article thinks is most important:

ipvsadm -L will get you metrics in a human-readable format, /proc/net/ip_vs* has stats for monitoring systems to parse.


I've not looked at LVS for a while, does it do SSL termination too? (Not sure as it's Layer4). We generally use haproxy for this reason in addition to using it for balancing.


You answer yourself, LVS works on layer 4 so you have to setup SSL on your backends.

For those who are on AWS, Network Load Balancer is also competitive with LVS.


Indeed, it dawned on me moments after. I clearly need to wake up more




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: