LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: [lvs-users] Load Balancer Not Listening on Specified Ports

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [lvs-users] Load Balancer Not Listening on Specified Ports
From: Graeme Fowler <graeme@xxxxxxxxxxx>
Date: Mon, 26 Oct 2009 19:09:48 +0000
On Mon, 2009-10-26 at 11:18 -0700, mojorising wrote:
> Thanks a lot for your response. It helps me understand a bit more
> about how LVS works.

Grand :)

> So, as I mentioned in my first post, "The web servers are up and
> running. I can download web pages successfully from them from my
> desktop as well as directly from the
> load balancer with netcat or similar." I just checked again and I can
> download web pages from the real servers on port 80 with netcat or
> telnet from the LVS machine. So we're all good there. Now I'm
> wondering why nanny might have issues talking to the real servers on
> 80.

Only you can tell that one I'm afraid. Have you checked the logs which
nanny produces?

> As for the bits about the configuration, yes. You are right. I just
> verified the IP addresses in the configuration and the ones I am
> testing with via netcat and telnet are the same.

Good.

> With respect to the former, if nothing is listening on the load
> balancer, maybe I am trying to use it the wrong way. On other load
> balancers I have used, such as pen or BigIP, the load balancer is
> actually listening and waiting for TCP connections, which it then
> forwards on to the "balanced" nodes (real servers) on specified ports.
> Basically, as far as PCs browsing the balanced sites know, that load
> balancer *is* the web server. Does that make sense? So when I go to
> test those load balancers to see if they work, I check to make sure
> they are listening on the approriate port and try to connect to them
> in the same way I would connect to a real server directly. Am I
> supposed to be doing things differently with LVS?

The two devices/systems you mention can work in mixed modes;
"directing" (load balancing at L4) or "proxy" (load balancing at L7). L7
apps must first terminate the TCP session themselves before sending
making a further L7 connection on to the server.

LVS works at L4 - TCP or UDP. It is not application aware, and it only
ever routes packets based on some rule it's configured with. That's it,
in a nutshell.

To the client, as you state, the load balancer *is* the webserver as
they connect to an IP address (the VIP) and replies come back from that.
At the TCP or UDP level, the client application is unaware of the magic
going on at the other end of the connection.

To check how LVS is configured, you can either rely on nanny to tell you
(how? I don't know) or use the ipvsadm command line tool:

ipvsadm -L            # displays LVS table
ipvsadm -L --stats    # displays usage stats
ipvsadm -L --rate     # displays rate statistics
[the -n switch can be used for numerical output]

It's worth remembering at this point that nanny is an abstraction layer
away from what's really going on behind the scenes; it monitors the
servers and puts them into/takes them out of the server "pool" as
necessary. It doesn't really do *any* load balancing itself.

Graeme


_______________________________________________
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>