For example, for haproxy
(layer 7) load balancing, you only need to configure the "real servers" or "backends" behind the VIP (i.e., cluster IP). E.g.:
listen smtp 192.168.3.10:25
mode tcp
balance roundrobin
server smtp1 192.168.3.1:25 check
server smtp1 192.168.3.2:25 check
However, with lvs
(layer 4), I'd need to either:
- Set the
lvs
machine as the router to implement "NAT Routing" - The
lvs
machine and the backends have the VIP configured with some ARP mods on the backends
How does layer 7 load balancing manage to do this without the more involved configuration? Am I misunderstanding or missing something fundamental here?