Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux Virtual Server: Users

Load Balanced web cluster not working correctly

 

 

Linux Virtual Server users RSS feed   Index | Next | Previous | View Threaded


mag2589 at gmail

Jan 31, 2007, 12:16 PM

Post #1 of 5 (533 views)
Permalink
Load Balanced web cluster not working correctly

I'm a new when it comes to LVS. I recently set up a load balanced
cluster with 2 real web servers and 1 load balancer. I used ldirectord
to configure ipvsadm on the load balancer. To get the load balancer to
listen on the virtual port I went into the console and typed
"eth0:0 192.168.0.114 netmask 255.255.255.0 broadcast 192.168.0.114"
To then get the real servers to listen on this virtual IP i had to
type the same thing into their console also. Is this correct? My
problem comes in when a user sends a web request and it gets mapped to
one of the real servers and not to the load balancer. If the request
does go to the load balancer the cluster works. Did I do something
wrong? Half the time it goes straight to the load balancer and half
the time it goes straight to one of the real servers.
_______________________________________________
LinuxVirtualServer.org mailing list - lvs-users[at]LinuxVirtualServer.org
Send requests to lvs-users-request[at]LinuxVirtualServer.org
or go to http://www.in-addr.de/mailman/listinfo/lvs-users


jmack at wm7d

Jan 31, 2007, 10:46 PM

Post #2 of 5 (504 views)
Permalink
Re: Load Balanced web cluster not working correctly [In reply to]

On Wed, 31 Jan 2007, Mag2589 Walla wrote:

> I'm a new when it comes to LVS. I recently set up a load balanced
> cluster with 2 real web servers and 1 load balancer. I used ldirectord
> to configure ipvsadm on the load balancer. To get the load balancer to
> listen on the virtual port I went into the console and typed
> "eth0:0 192.168.0.114 netmask 255.255.255.0 broadcast 192.168.0.114"

I would be surprised if ethernet aliases work anymore.

> To then get the real servers to listen on this virtual IP i had to
> type the same thing into their console also. Is this correct? My
> problem comes in when a user sends a web request and it gets mapped to
> one of the real servers and not to the load balancer.

that's how it's supposed to work.


> If the request
> does go to the load balancer the cluster works.

the director is just a router with funny rules. The request
is routed through the director to the realservers




> Did I do something
> wrong? Half the time it goes straight to the load balancer and half
> the time it goes straight to one of the real servers.

have you handled the arp problem?

Joe

--
Joseph Mack NA3T EME(B,D), FM05lw North Carolina
jmack (at) wm7d (dot) net - azimuthal equidistant map
generator at http://www.wm7d.net/azproj.shtml
Homepage http://www.austintek.com/ It's GNU/Linux!
_______________________________________________
LinuxVirtualServer.org mailing list - lvs-users[at]LinuxVirtualServer.org
Send requests to lvs-users-request[at]LinuxVirtualServer.org
or go to http://www.in-addr.de/mailman/listinfo/lvs-users


mag2589 at gmail

Feb 1, 2007, 2:21 PM

Post #3 of 5 (500 views)
Permalink
Re: Load Balanced web cluster not working correctly [In reply to]

No I have not yet handled the ARP problem.
Could I use the following commands to hide the interface? I'm on kernel 2.6.19

# Start the hiding interface functionality
echo 1 > /proc/sys/net/ipv4/conf/all/hidden
# Hide all addresses for this interface
echo 1 > /proc/sys/net/ipv4/conf/<interface_name>/hidden

Thanks
_______________________________________________
LinuxVirtualServer.org mailing list - lvs-users[at]LinuxVirtualServer.org
Send requests to lvs-users-request[at]LinuxVirtualServer.org
or go to http://www.in-addr.de/mailman/listinfo/lvs-users


horms at verge

Feb 8, 2007, 12:01 AM

Post #4 of 5 (490 views)
Permalink
Re: Load Balanced web cluster not working correctly [In reply to]

On Thu, Feb 01, 2007 at 05:21:04PM -0500, Mag2589 Walla wrote:
> No I have not yet handled the ARP problem.
> Could I use the following commands to hide the interface? I'm on kernel 2.6.19
>
> # Start the hiding interface functionality
> echo 1 > /proc/sys/net/ipv4/conf/all/hidden
> # Hide all addresses for this interface
> echo 1 > /proc/sys/net/ipv4/conf/<interface_name>/hidden

hidden is a very old way to do things. It was never merged into the
kernel, rather patched kernels were supplied. Around the time of 2.6.0 a
different approach, arp_announce/arp_ignore, was merged into the
kernel, and you should use that technique.

http://kb.linuxvirtualserver.org/wiki/Using_arp_announce/arp_ignore_to_disable_ARP


--
Horms
H: http://www.vergenet.net/~horms/
W: http://www.valinux.co.jp/en/

_______________________________________________
LinuxVirtualServer.org mailing list - lvs-users[at]LinuxVirtualServer.org
Send requests to lvs-users-request[at]LinuxVirtualServer.org
or go to http://www.in-addr.de/mailman/listinfo/lvs-users


jmack at wm7d

Apr 3, 2007, 11:52 AM

Post #5 of 5 (407 views)
Permalink
Re: Load Balanced web cluster not working correctly [In reply to]

On Wed, 31 Jan 2007, Mag2589 Walla wrote:

> I'm a new when it comes to LVS. I recently set up a load balanced
> cluster with 2 real web servers and 1 load balancer. I used ldirectord
> to configure ipvsadm on the load balancer. To get the load balancer to
> listen on the virtual port I went into the console and typed
> "eth0:0 192.168.0.114 netmask 255.255.255.0 broadcast 192.168.0.114"

netmask 255.255.255.255

Joe

--
Joseph Mack NA3T EME(B,D), FM05lw North Carolina
jmack (at) wm7d (dot) net - azimuthal equidistant map
generator at http://www.wm7d.net/azproj.shtml
Homepage http://www.austintek.com/ It's GNU/Linux!
_______________________________________________
LinuxVirtualServer.org mailing list - lvs-users[at]LinuxVirtualServer.org
Send requests to lvs-users-request[at]LinuxVirtualServer.org
or go to http://www.in-addr.de/mailman/listinfo/lvs-users

Linux Virtual Server users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.