This must be an interesting problem, because I'm still thinking about it after 1.5 days... I want to simulate a few scenarios to see if I can generate some pretty looking charts, but first I want to make sure I'm understanding your algorithm correctly. Is the following pseudocode accurate?
/* 'place' is a given range of 16 IP addresses 'lastConnect' is the last time a 'place' made a connection 'time' is the current time 'load0' is the current load on server 0 'load1' is the current load on server 1
Returns 0 or 1 corresponding to one of two webservers */
chooseServer( place ) { lastConnect = lookup_last_connect_time( place );
if ( time - lastConnect < 20 minutes ) return lookup_last_server_connected( place );
else if ( load0 == load1 ) return random( 0 or 1 );
no subject
Date: 2007-05-24 04:02 (UTC)/*
'place' is a given range of 16 IP addresses
'lastConnect' is the last time a 'place' made a connection
'time' is the current time
'load0' is the current load on server 0
'load1' is the current load on server 1
Returns 0 or 1 corresponding to one of two webservers
*/
chooseServer( place )
{
lastConnect = lookup_last_connect_time( place );
if ( time - lastConnect < 20 minutes )
return lookup_last_server_connected( place );
else if ( load0 == load1 )
return random( 0 or 1 );
else
return ( load0 < load1 )? 0 : 1;
}