LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Multiple ports on real servers

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Multiple ports on real servers
From: "Mindaugas" <mind@xxxxx>
Date: Thu, 23 Nov 2006 11:09:47 +0200

 Hello,

 Accidently replied privately to ratz so repeating my e-mail here. :)

 I need the following setup preferably with LVS-NAT:
 VIP:80   --> RS1:80, RS1:81, RS1:82, RS2:80, RS2:81, RS2:82
 VIP:8080 --> RS1:80, RS1:81, RS1:82, RS2:80, RS2:81, RS2:82
 VIP:9080 --> RS1:80, RS1:81, RS1:82, RS2:80, RS2:81, RS2:82

 3 open ports on real servers because I'd like to run 3 instances of
Squid on each to better utilize 4 cores (plus one more application which
will use 4th core).
 I cannot do just VIP:80-->RS1:80, VIP:8080-->RS1:8080 because traffic
on those ports is very different.

 Now I have the following iptables and IPVS rules on director:
-A PREROUTING -p tcp -m multiport --dports 80,8080,9080 -j MARK --set-mark 0x1

-A -f 1 -s wlc -p 15
-a -f 1 -r RS1:0 -m -w 1
-a -f 1 -r RS2:0 -m -w 1

 And iptables on real servers:
-A PREROUTING -s 0.0.0.0/0.0.0.1 -p tcp -m multiport --dports
80,8080,9080 -j REDIRECT --to-ports 80
-A PREROUTING -s 0.0.0.1/0.0.0.1 -p tcp -m multiport --dports
80,8080,9080 -j REDIRECT --to-ports 81

So I'm missing one Squid and load balancing is separated onto both director
and real servers. I'd prefer to have it in one place - on director.

 Thanks,

 Mindaugas


<Prev in Thread] Current Thread [Next in Thread>