Talk:Locality-Based Least-Connection Scheduling
From LVSKB
Expiration algorithm
I find it usefull for understanding why subsequent connections to the same destination IP address may not follow the same path.
ServerNode[] is a list of maps from destination IP address to server; C(ServerNode[]) is the current number of not NULL maps in the list; Now is the current system time; net.ipv4.vs.lblc_expiration is the sysctl parameter (default 24 hours).
Every 1 minute:
Count = C(ServerNode[]);
if (Count > 16384) then {
for (dest_ip = 0.0.0.0;
C(ServerNode[]) > min((Count-16384)*4/3, 8192);
dest_ip++) {
if (ServerNode[dest_ip].server is not NULL AND
ServerNode[dest_ip].lastuse < Now - 6 minutes) then
ServerNode[dest_ip].server = NULL;
}
}
Every 30 minutes:
for (dest_ip = 0.0.0.0; dest_ip < 255.255.255.255; dest_ip++) {
if (ServerNode[dest_ip].server is not NULL AND
ServerNode[dest_ip].lastuse < Now - net.ipv4.vs.lblc_expiration) then
ServerNode[dest_ip].server = NULL;
}
Please correct me if I am wrong.
- Jkrzyszt 02:31, 16 September 2006 (CST)