Hello,
> I've been using a LVS-NAT cluster for about 2-1/2 years,
> since the VA-Linux 6.2
Ditto, except LVS-DR from the start. New power supplies for fullon 2230's
are $500 now! (Thank god for ebay)..
> days, but I've never setup a LVS-DR cluster. Either I'm
> missing something in
On my LVS-DR setup I don't use loopback devices at all. AFAIK loopbacks are
only for the real servers, and even there I use the transparant
proxy-redirect method to bypass all that. E.g:
<Haresources>
stage-lb2.internal.sidestep.com IPaddr::10.50.1.10 IPaddr::10.50.1.9
ldirectord::ldirectord.cf
And
# Virtual Server for HTTP
virtual=10.50.1.10:80
real=10.50.1.3:80 gate 1
Result in
eth1 Link encap:Ethernet HWaddr 00:D0:B7:A7:AD:67
inet addr:10.50.1.2 Bcast:10.50.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:42354403 errors:0 dropped:0 overruns:0 frame:0
TX packets:43793599 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:3470999016 (3310.2 Mb) TX bytes:1243044426 (1185.4 Mb)
Interrupt:21 Base address:0x8000
eth1:0 Link encap:Ethernet HWaddr 00:D0:B7:A7:AD:67
inet addr:10.50.1.10 Bcast:10.50.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:21 Base address:0x8000
eth1:1 Link encap:Ethernet HWaddr 00:D0:B7:A7:AD:67
inet addr:10.50.1.9 Bcast:10.50.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:21 Base address:0x8000
and
[root@stage-lb1 root]# ipvsadm -L -n
IP Virtual Server version 1.0.9 (size=65536)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 10.50.1.10:80 rr persistent 10
-> 10.50.1.3:80 Route 0 0 0
And on my real servers (with a redhat kernel or the appropriate iptables -j
redirect patches):
$IPTABLES -t nat -A PREROUTING -p tcp -d 10.50.1.10 --dport 80 -j REDIRECT
--to-port 80
... And that's it.
Cheers
Peter
|