Iptables – lvs vs haproxy vs ? for hostname based forwarding

forwardinghaproxyhostnameiptablesldirectord

i'd like to forward incoming traffic on 80 to various ports based on the hostname.

previously on serverfault i've seen solutions that uses ldirectord, just iptables, haproxy, and other proxy servers.

considering that i'm looking for simply proxying, what would be the pro's and con's of ldirectord vs haproxy vs perhaps some pure iptables based solution?

~B

Best Answer

LVS is a layer 4 focused product, it doesn't peek up into layer 7 sections of the packet to decode http headers, so it cannot make decisions based on them. Similarly for iptables you'd have to find some http module and have it be a tcp proxy and... lets just say it'd be an obscure hack if you got it working.

So in that case your x vs. y decision is more or less made for you, ha-proxy. Also comparably lightweight to ha-proxy would be "pound".

Related Topic