1832267 Members
3665 Online
110041 Solutions
New Discussion

Linux Virtual Server

 
SOLVED
Go to solution
Marco_113
Frequent Advisor

Linux Virtual Server

Hi all.
I've a question about Linux Virtual Server.

I've configured a balancer with NAT and works fine.

The real servers are IIS with some application.
My probelm is:

1)The client of the application is an entire Network in INTERNET natted with one public IP.

2)I need to setup a persistence to the session of the application.

So, how can i solve the problem that if i apply persistence, i loose the balancing because of the requests come from the same IP??

Thanks in advance ,
Marco
5 REPLIES 5
Ivan Ferreira
Honored Contributor

Re: Linux Virtual Server

Can you graph your network? is something like:


Internet (Clients)
|
Nat Box
|
| (Private)
LVS
|
Real Servers

Maybe you can configure a NAT POOL in the "Nat Box" so you have a pool of addresses connecting to the LVS.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Marco_113
Frequent Advisor

Re: Linux Virtual Server

Yes the network is:

Clients
|
Gateway (NAT box)
|
Internet
|
Balancer
|
Real Servers

But i cant adminisrate the Nat Box.
Thanks



Matti_Kurkela
Honored Contributor
Solution

Re: Linux Virtual Server

Many load balancers actually use the source and destination port numbers in addition to the IP addresses to identify individual sessions. According to the documentation, the IPVS component of the Linux Virtual Server works like this.

Any TCP or UDP connection has two port numbers associated with it: a source port number and a destination port number. There can be several connections to a single _destination_ port number, but the _source_ port number cannot be unique among connections coming from any one IP address.

(This means the source port number is usually dynamically allocated and useless for firewalling, but very useful to load balancers.)

A good load balancer might also be able to handle several TCP connections with identical source and destination IP addresses _and_ port numbers, by keeping track of the TCP sequence numbers of individual connections. UDP does not have sequence numbers as such, so this method is not useful for UDP.

If you're using the KTCPVS component of the Linux Virtual Server, it can implement the persistence using HTTP session cookies. This is completely independent of any network connection properties, so the presence of NAT will not affect it.
MK
Marco_113
Frequent Advisor

Re: Linux Virtual Server

Thank you Matti.
Do you know where i can find some configuration example of source hash table with different ports??
Thanks again
Marco
Marco_113
Frequent Advisor

Re: Linux Virtual Server

Excuse me Matti,
can you tell me where can i understand reading LVS documentation that the different source ports is natively supported?
Thank you very much for your help
Marco