Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I would like to understand the LVS persistence. For me, all the client with the same address ip will go to the same server until the end of the timeout. And if clients are behind a provider/proxy/firewall or public addresses, they all go to the same real server but in terms of performance isn't very good.

I would like to try to understand with an example: The university only have one IP and use the NAT, so if all the students wants to connect to the webpage, they will all go to the same real server?

on this link http://www.ntua.gr/lvsp/Joseph.Mack/HOWTO/LVS-HOWTO.fwmark.html part 8.10.2 examples, it's right that 2 clients ( different IP but comes from the same router/firewall) will choose different servers. Does it's true with the example that I give?

share|improve this question
    
yes but because of the proxy problem, does it really possible to use it for session? because if everybody use the same real server (in case of a proxy) the load balancing not really work. –  user74765 Mar 17 '11 at 8:56

2 Answers 2

If all your clients come in from a single source IP address and you are using persistence then yes they will all chose a single realserver.

One possible solution to your load issue would be to advertise two different A records in your DNS for the load-balanced site. You could combine this with FWMARK, as described in the section you refer to above, to force the large source IP address in your traffic to chose realserver 1 for your first A record and realserver 2 for your second.

share|improve this answer

For me, all the client with the same address ip will go to the same server until the end of the timeout.

True.

But what's happened if clients are behind a provider/proxy/firewall or public addresses?

LVS cares about IP's and don't try to see if the user have a proxy. So, the LVS will see the IP of proxy.

Does they all go to the same real server?

Yes.

if yes the load balancing isn't really useful in this case, so how it's possible to handle sessions correctly?

For http is simple, you can use apache mod proxy balancer together with HA. For other protocols you should search on Internet

share|improve this answer
1  
Thanks, I would like to try to understand with an example: The university only have one IP and use the NAT, so if all the students wants to connect to the webpage, they will all go to the same real server? –  tranen Mar 15 '11 at 10:04
    
Exactly. This is the main problem with LVS persistance and proxy. –  Sacx Mar 16 '11 at 13:04
    
Thanks, so when or for what do people use LVS with persistence? –  user74765 Mar 17 '11 at 1:35
    
When they are expecting traffic from multiple source ip's :) and they want to stick an IP to one server (session things etc) –  Sacx Mar 17 '11 at 7:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.