VS/TUN, VS/DR response problem

Paresh Bafna paresh at it.iitb.ac.in
Sun Jan 8 14:07:05 GMT 2006


Graeme Fowler wrote:

>Hi
>
>On Sat, 2006-01-07 at 15:12 +0530, Paresh wrote:
>  
>
>>I wanted to know that in VS/TUN and VS/DR when reply goes back directly 
>>from real server to client then what is source IP and port used?
>>    
>>
>
>Well, logically it _must_ be the VIP and the port being load balanced,
>mustn't it?
>
>  
>
>>If it uses VIP as source IP, then from where real server get state of 
>>connection that is present between client and VIP host?
>>    
>>
>
>>From the packets it is processing.
>  
>
But packet doesn't contain all the information required for TCP protocol
to work completely, viz RTT, MTU are not present in packet.
Also initially client will create connection with VIP, then will send
request for particular data or service...
So there will be connection establishment bewtween client and VIP (SYN,
ACK-SYN and ACK)
Then VIP (load balancing) will choose one of the server to cater this
request, then does VIP simulate conn. establishment with real server,
because for server to accept request (forwarded from VIP) initial
handshake has to take place somehow. It is after this handshake server
will allocate socket (port) for connection with client

Is my understanding of working of LVS right or is there any basic
mis-understanding?

>  
>
>>State may include VIP, corr. port on VIP host, various sequence numbers, 
>>time values like RTT, etc. which are required to send response back 
>>client on already existing connection (between client and VIP host).
>>
>>I guess real server can not respond back to client using its own IP,  
>>that wont be acceptable by normal TCP symantics.
>>    
>>
>
>Correct.
>
>Remember that the director is simply acting as a router in TUN or DR
>mode. The packet flow is:
>
>Client IP / Client Port on client
>to
>VIP / VIP port on director
>to
>VIP / VIP port on realserver
>  
>
Does director decides upon real server (load balancing) when it gets SYN
packet from client ?

>to
>Client IP / Client port on client
>
>The only difference between a directly connected, non-LVS server and an
>LVS is the additional work done by the director to route packets to the
>realservers. They are unaware of the director (as are the clients,
>effectively), they simply process packets as you would expect - so the
>connection state is created, tracked, processed and closed in the same
>way as it would normally be.
>
>Or have I misunderstood your question?
>
>Graeme
>
>_______________________________________________
>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
>  
>
Paresh


More information about the lvs-users mailing list