LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: load balancing problem

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: load balancing problem
From: Malcolm Turnbull <malcolm@xxxxxxxxxxxxxxxx>
Date: Mon, 13 Sep 2004 08:39:41 +0100
You've got persistence set so one client accessing a hundred times should always go 100% to the same server, unless the persistent timeout has expired.


Regards,

Malcolm Turnbull.

Loadbalancer.org Limited
+44 (0)7715 770523
http://www.loadbalancer.org/


" When a single point of failure is not an option"

Why not try our online demonstration <http://www.loadbalancer.org/demo.html> ? Or get answers to common questions <http://www.loadbalancer.org/fud.html> ?



Nobukimi Sasaki wrote:

Dear All:



I have been working on this problem for a long time, and still can?ft solve it. It drives me crazy. I use one LVS director, with two real servers. Let?fs say, real server A and B.


The problem is that, let?fs say, I access to the real servers from a client 100 times in one minute. Then, for example, 90/100 accesses go to the real server A, while 10/100 go to the real server B. But each of them supposed to get 50/100.


Here is my environment, and configurations:



Red Hat Linux Advanced Server release 2.1AS/i686

Kernel 2.4.9-e.3

iptables version v1.2.4

# ipvsadm -l -n

IP Virtual Server version 0.8.1 (size=65536)

Prot LocalAddress:Port Scheduler Flags

 -> RemoteAddress:Port             Forward Weight ActiveConn InActConn

FWM  80 dh persistent 320

 -> 192.9.200.81:0                 Route   1      0          0

 -> 192.9.200.80:0                 Route   1      0          0



# ifconfig -a

eth0      Link encap:Ethernet  HWaddr 00:10:4B:18:A2:E2

         inet addr:192.9.202.84  Bcast:192.9.202.255  Mask:255.255.255.0

eth0:1    Link encap:Ethernet  HWaddr 00:10:4B:18:A2:E2

         inet addr:192.9.202.86  Bcast:192.9.202.255  Mask:255.255.255.0

eth1      Link encap:Ethernet  HWaddr 00:90:99:12:E6:92

         inet addr:192.9.200.84  Bcast:192.9.200.255  Mask:255.255.255.0

lo        Link encap:Local Loopback

         inet addr:127.0.0.1  Mask:255.0.0.0

# netstat -rn

Kernel IP routing table

Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface

192.9.200.0     0.0.0.0         255.255.255.0   U        40 0          0 eth1

192.9.202.0     0.0.0.0         255.255.255.0   U        40 0          0 eth0

127.0.0.0       0.0.0.0         255.0.0.0       U        40 0          0 lo

0.0.0.0         192.9.200.253   0.0.0.0         UG       40 0          0 eth1



Here is the configuration for the iptable:

# iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT -d 192.9.202.86 
--to-destination 192.9.200.80-192.9.200.81

# service iptables save

# iptables -t nat -L

Chain PREROUTING (policy ACCEPT)

target     prot opt source               destination

DNAT       tcp  --  anywhere             192.9.202.86       tcp dpt:http 
to:192.9.200.80-192.9.200.81



Chain POSTROUTING (policy ACCEPT)

target     prot opt source               destination



Chain OUTPUT (policy ACCEPT)

target     prot opt source               destination



I appreciate you to read this long message, and hope I can get some suggestions or comments.


Thanks in advance


                
---------------------------------
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
_______________________________________________
LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
or go to http://www.in-addr.de/mailman/listinfo/lvs-users
<Prev in Thread] Current Thread [Next in Thread>