There are two configurable global parameters related to the reassign mechanism:
• Reassign threshold — When the number of empty hash entries (buckets) in the persistent hash table falls to or below this threshold (less than or equal to), the ServerIron reassigns some of the persistent hash entries on introduction of a new real server. By default, the ServerIron will reassign persistent hash entries to the new real server only if there are no empty persistent hash entries (for example, the default persist hash reassign threshold is 0 percent).
To specify the threshold, enter commands such as the following:
SLB-ServerIron#con t
SLB-ServerIron(config)#server persist-hash-threshold 5
Syntax: [no] server persist-hash-threshold <percent-value> The <percent-value> is any value from 0 to 99.
Hash 0 none Hash 1 rs2 Hash 2 rs2 Hash 5 rs2 Hash 255 none Hash 3 rs1 Hash 4 rs1 Hash 6 rs1 ... port http virtual server vs1
Persistent hash table
Hash 0 none Hash 1 none Hash 2 none Hash 5 none Hash 255 none Hash 3 none Hash 4 none Hash 6 none ... port http virtual server vs1
With the reassign mechanism, if multiple servers come up simultaneously and need reassignment because the number of empty hash table entries is below the reassign threshold, then the ServerIron will clear the persistent hashing table.
• Reassign duration — If the number of empty persistent hash entries is below the reassign threshold, the ServerIron reassigns some of the persistent hash entries over a period of time to the new real server. This duration of time is known as the persist hash reassign duration.
To specify the reassign duration, enter commands such as the following:
SLB-ServerIron#con t
SLB-ServerIron(config)#server persist-hash-reassign-duration 5
This global command is applied to all configured VIP ports that are persist-hash enabled. The ServerIron will complete the reassignment within 2 minutes by default.
Syntax: [no] server persist-hash-reassign-duration <value> The <value> is the time duration from 2 to 30 minutes
Reassignment Sequence and Example
The sequence is performed as follows:1. When a new server is introduced, the ServerIron calculates how many of the hash table entries in the persistent hash table are empty. If the number is greater than the persist-hash-reassign-threshold, the ServerIron does no reassignment.
If the number of empty hash table entries is less than or equal to the persist hash reassign threshold, the ServerIron proceeds with the reassignment. The system first calculates the total number of active real servers, which includes the new real server.
2. The system calculates the entries per server as follows:
X = entries per server = total assigned hash table entries/number of active real servers
3. The ServerIron attempts to reassign X persistent hash entries to the new real server over the duration specified by the persist-hash-reassign-duration.
The ServerIron will stop reassigning persistent hash entries to the new real server when either of the following occurs:
• The system has finished reassigning X persistent hash entries to the new real server (occurs in the amount of time specified by the persist-hash-reassign-duration)
• The number of persistent hash entries assigned to the new real server is equal to the lowest number of persistent hash entries assigned to any of the existing real servers, whichever happens earlier.
Figure 3.15 Hash Table Before Reassignment
Persistent hash entries have been assigned as follows. Entries 47 to 54 have been assigned to real server rs1. Entries 55 and 56 have been assigned to rs2. All other entries are empty (no real server has been assigned to them).
In this example, the administrator configures a reassign-threshold of 99 percent. That is, whenever the number of empty hash entries falls below 99 percent, the ServerIron will reassign the persistent hash table entries whenever a new real server comes up. The reassign-duration is the default value (2 minutes).
Next, the administrator binds port HTTP of a new real server rs3 to port HTTP of virtual server vs1. When real server rs3 comes up, the ServerIron calculates the number of active real server ports. In this example, the number is 3 (rs1, rs2 and rs3). The system then calculates the number of empty hash table entries. In this example, the number is 246. Since less than 99 percent of the hash table entries are empty, the ServerIron will attempt to reassign some of the persistent hash entries to the new real server rs3.
The ServerIron now calculates entries per server X as follows:
X = total assigned hash table entries/number of active real servers = 10/3 = 3
The ServerIron now attempts to reassign 3 persistent hash entries to the new real server over 2 minutes. The system will stop after it has reassigned 2 entries of real server rs1 to new real server rs3. The reason is once rs3 is assigned 2 persistent hash entries, the value is equal to the number of entries assigned to existing real server rs2.
The persistent hash table after the reassignment appears as follows:
Hash 0 none Hash 1 none ... Hash 49 rs1 Hash 51 rs1 Hash 54 rs1 ... Hash 47 rs1 Hash 48 rs1 Hash 50 rs1 Hash 52 rs1 Hash 53 rs1 Hash 55 rs2 Hash 56 rs2 Hash 255 none port http virtual server vs1
Figure 3.16 Hash Table After Reassignment