LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

[lvs-users] Scheduling with wlc, lc or rr

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: [lvs-users] Scheduling with wlc, lc or rr
From: Andre Magri <andremag@xxxxxxxxx>
Date: Wed, 10 Feb 2010 11:40:53 +0100
Hi,
I have been trying to setup LVS DR on 1 virtual ip (10.10.10.247) which in
turn should load balance http & https requests.

*iptables:*
-----------
Table: mangle
Chain PREROUTING (policy ACCEPT)
num target prot opt source destination
1 MARK tcp -- 0.0.0.0/0 10.10.10.247 tcp dpt:80 MARK set 0x50
2 MARK tcp -- 0.0.0.0/0 10.10.10.247 tcp dpt:443 MARK set 0x50

*lvs.cf:*
--------
serial_no = 75
primary = 10.10.10.248
service = lvs
backup = 0.0.0.0
heartbeat = 1
heartbeat_port = 539
keepalive = 6
deadtime = 18
network = direct
debug_level = NONE
virtual HTTP {
active = 1
address = 10.10.10.247 eth0:1
vip_nmask = 255.255.255.0
fwmark = 80
port = 80
persistent = 300
pmask = 255.255.255.0
send = "GET /testip.ashx HTTP/1.1\r\n\r\n"
expect = "HTTP"
use_regex = 0
load_monitor = none
scheduler = wlc
protocol = tcp
timeout = 30
reentry = 30
quiesce_server = 0
server FS01 {
address = 10.10.10.10
active = 1
weight = 20
}
server DB04 {
address = 10.10.10.12
active = 1
weight = 20
}
}


*/var/log/messages:*
-------------------------
Feb 10 12:11:20 centos1 avahi-daemon[3334]: Registering new address record
for 1 0.10.10.247 on eth0.
Feb 10 12:11:20 centos1 kernel: IPVS: [rr] scheduler registered.
Feb 10 12:11:20 centos1 lvs[3700]: create_monitor for HTTP/FS01 running as
pid 3 713
Feb 10 12:11:20 centos1 lvs[3700]: create_monitor for HTTP/DB04 running as
pid 3 714
Feb 10 12:11:20 centos1 nanny[3713]: starting LVS client monitor for
10.10.10.24 7:80 -> 10.10.10.10:80
Feb 10 12:11:20 centos1 nanny[3713]: [ active ] making 10.10.10.10:80available
Feb 10 12:11:20 centos1 nanny[3714]: starting LVS client monitor for
10.10.10.24 7:80 -> 10.10.10.12:80
Feb 10 12:11:20 centos1 kernel: send_arp uses obsolete (PF_INET,SOCK_PACKET)
Feb 10 12:11:20 centos1 nanny[3714]: [ active ] making 10.10.10.12:80available
Feb 10 12:11:25 centos1 pulse[3702]: gratuitous lvs arps finished


What's happening is that no matter from which source ip I make a request to
10.10.10.247 is always forwarding request to one server 10.10.10.12. If I
delete 10.10.10.12 from the real servers list all subsequent connections are
successfully made to 10.10.10.10:


IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
FWM 80 rr persistent 300 mask 255.255.255.0
-> 10.10.10.12:http Route 20 5 0
-> 10.10.10.10:http Route 20 0 0

The only problem that I see is when I issue ipvsadm -L -c:

IPVS connection entries
pro expire state       source             virtual            destination
IP  00:40 * ERR! *       10.10.10.0:0       0.0.0.80:0         10.10.10.12:0

The ERR! entry I do not understand because I do not see virtual
0.0.0.80:0as a valid virtual address.

Loopback adapters on the real servers (IIS) are set with the VIP
10.10.10.247/32 ip.

Many thanks in advance.
_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
or go to http://lists.graemef.net/mailman/listinfo/lvs-users

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