LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Maintaining state under Director failover ?

To: Linux Virtual Servers Mailling List <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Maintaining state under Director failover ?
From: Michael Sparks <zathras@xxxxxxxxxxxxxxxxxx>
Date: Fri, 18 Feb 2000 18:00:55 +0000 (GMT)
Hiya,


I know this one's the tricky one :-)

However shouldn't it be possible to do a deterministic load balancing
effect by doing something like taking a hash of the the IP address & port
of the requesting half (ie clientside) of the TCP stream, and using that
to decide the real server ?

logically speaking :

Given incoming TCP info joe.bloggs.dialup.user.net port 40020
X real servers with weights
Y mean weight per machine
range = X*Y - ie total of all weights.

server[0..weight server0] = server 0;
server[weight server0..(weight server0 + weight server1)] = server 1;
server[(weight server0 + weight server1) .. (weight server1 + weight server2)] 
= server 1;
server[(weight server1 + weight server2) .. (weight server2 + weight server3)] 
= server 1;
...
real server index = hash("joe.bloggs.dialup.user.net","40020") mod range
choose server[real server index] for this connection.

(eg real server index = random(userIP+port) mod range.
where random in this case takes an unsigned 32 bit integer, and returns
and unsigned 32bit integer.

If the weights were kept low, the above static partitioning *could* enable
the system state to ensure that any previously unseen connection (in
whatever state) by the load balancer was sent to the correct server.

Maintaining state between Directors would then just need the ipvsadm table
to be copied over, not the entire ip_masq table, making "transparent"
director failure more possible.

Clearly wouldn't work in conjunction with most of the existing
schedulers, but I can't see why it wouldn't work as a new scheduler
in it's own right... Howeverm since I haven't ever done any coding in
the linux kernel, I'm sure there's huge swathes of problems this could
cause...

Thoughts? (I'm very much expecting to get the idea shot down in flames :-)

If it is viable, with however much we'd have to jump through hoops to do
it, in terms of mechanics, but unknown in terms of fairness, I could
easily set a process running to gather netstat -n stats to find out if
it'd be fair/collect trace data on our systems.

Even if it never got coded the info could be useful for future ideas :-)



Michael.
--
National & Local Web Cache Support        R: G117
Manchester Computing                      T: 0161 275 7195
University of Manchester                  F: 0161 275 6040
Manchester UK M13 9PL                     M: Michael.Sparks@xxxxxxxxxxxxxxx



<Prev in Thread] Current Thread [Next in Thread>
  • Maintaining state under Director failover ?, Michael Sparks <=