LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

[lvs-users] One realserver must connect to services to other realservers

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: [lvs-users] One realserver must connect to services to other realservers (routing problem).
From: Markus Hofer <hofmarkus@xxxxxxxxx>
Date: Thu, 25 Aug 2011 15:03:27 +0200
Hey guys,

i have a question about the connection of one (or in future more) 
realserver to services
to other realserver.

The problem is that when i would connect from one realserver (A) to a 
other servive on a other
realserver (B) the connection go to the LVS-Box (in my case keepalived 
loadbalancer) and then
to the other realserver (B).

My loadbalance ist keepalived with NAT.

For example:

Tomcat Service on Realserver A with external IP (VIP) 192.168.200.15)




         Loadbalancer (LVS) (IP 192.168.200.15)
        ^                                    |
        |                                    |
        |                                    |
        |                                    |
        |                                    V

REALSERVER (A)            REALSERVER (B)
(192.168.0.10)            (192.168.0.10)



The problem is, that realserver B see that the question for the service 
comes from the network 192.168.0.10 and then goes
directly to A, but couldn't work out the answer, because realserver A 
ask 192.168.200.15 and not 192.168.0.10.

My work around for this problem is:

- in the hostfile i make a other local entry for the tomcat-service. So 
realserver A ask realserver B directly and not
over LVS. But this is very complicate, because I must insert all 
DNS-entry local to this realserver A.


My qustion is how I could work around this without other new DNS entries?

If the realserver go outside for services i have insert a SNAT on 
POSTROUTING on the LVS.
Like: 
http://www.duffau.net/LVS/LVS-HOWTO.LVS-NAT.html#client_on_LVS-NAT_realserver

I think i could make some somethink like that if one realserver must 
connect to one other realserver, but I think
this SNAT i must insert in the PREROUTING?
It not easy to make changes on a service ONLINE and so i would ask the 
LVS Users Mailing List if someone could help me.


Thanks!

Markus Hofer




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