LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: Director and Real Server: Same Machine

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: Director and Real Server: Same Machine
From: Horms <horms@xxxxxxxxxxxx>
Date: Wed, 6 Jul 2005 18:31:07 +0900
On Wed, Jul 06, 2005 at 11:07:41AM +0200, Mikel RUIZ ECHEVERRIA wrote:
> Thank you, Horms. You were very clear. I think I understood what happened,
> and I can't map ports if  I am not dealing with NAT.
> 
> You suggested to change Ips instead of ports. It's a good point of view.
> This should solve the problem.
> 
> virtual=158.227.82.39:8090
>          real=127.0.0.1:8090
>          real=127.0.0.2:8090
> 
> I configure one httpd.conf to Listen 127.0.0.1:8090 and the second
> 127.0.0.2:8090
> It stays in Syn_Recv state. Perhaps I am not doing things as you told.
> 
> On the other hand, LVS-HOWTO says (point 8, first note) that if we want to
> set up Local Nodes, we have to have the service (e.g. apache) configured  to
> Listen to VIP. Keeping this in mind, how could what you suggested work (how
> could what I understood work)?

That is a good point, and it is indeed true now that you mention it.
The reason for this is that when packets are delivered locally, using
the Local forwading mechaism which I decribed in my previous mail, the
packet is not altered at all, so the process that tgets the packet needs
to be able to accept it though it is addressed to the VIP.  Essentially
the same behaviour as LVS-DR, except the packet doesn't get
retransmitted over the wire.  Unfortunately this renders my suggestion
inopperable.

However, all is not lost, as I have just recalled another discussion 
which involved getting local NAT to work, which I believe would allow
both your original suggestion, and my suggestion to work. Sorry that
I didn't think of this the first time around, I should have.

I have made a proof of concept patch that implements this,
you can find it at:

http://archive.linuxvirtualserver.org/html/lvs-users/2005-06/msg00113.html

-- 
Horms

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