Clear vs reassign mechanisms, Enabling persistent hashing, Enabling the clear-on-change mechanism – Brocade Virtual ADX Server Load Balancing Guide (Supporting ADX v03.1.00) User Manual
Page 103: Enabling, Persistent hashing
![background image](/manuals/361724/103/background.png)
Brocade Virtual ADX Server Load Balancing Guide
87
53-1003247-01
Hash-based SLB with server persistence
2
If the client makes another request to the VIP, for example after two days, then the Brocade Virtual
ADX will again calculate the hash based on the client IP and retrieve the persistent hash table
entry. Because a real server has already been allocated to the persistent hash table entry, the
Brocade Virtual ADX will use this real server to service the client request. As an effect, the client will
always be directed to the same real server.
Clear vs reassign mechanisms
There are two configurable mechanisms to handle the introduction of a new server:
•
clear-on-change — Whenever a new server comes up, the entire persistent hash table is
cleared and assignments are started afresh. For more information, refer to
•
reassign-on-change — The default. Whenever a new server comes up, the Brocade Virtual ADX
calculates the number of hash entries allocated to each existing server. The Brocade Virtual
ADX then reassigns some of these entries to the new server. For more information, refer to
“Enabling the reassign-on-change mechanism”
Enabling persistent hashing
To enable the persistent hashing (phash) mechanism for a virtual server port, enter commands
such as the following.
Virtual ADX(config)#server virtual-name-or-ip vs1
Virtual ADX(config-vs-vs1)#port http persist-hash
The reassign-on-change function is selected by default.
Syntax: [no] port port persist-hash [clear-on-change | reassign-on-change]
When persistent hashing is configured for a VIP, the round robin predictor for the VIP is
automatically enabled. This default is used to evenly distribute hash assignments. After you enter
the port port persist-hash command, the predictor round-robin command automatically appears
under the virtual server in the configuration file.
NOTE
SSL is a special case where sticky automatically gets turned on. If persistent hashing must be
configured for port SSL, you need to explicitly turn off sticky on the SSL port using the no port ssl
sticky command and then enable persistent hashing for this port.
Enabling the clear-on-change mechanism
To enable the clear-on-change mechanism, enter commands such as the following.
Virtual ADX(config)#server virtual-name-or-ip vs1
Virtual ADX(config-vs-vs1)#port http persist-hash clear-on-change
Virtual ADX(config-vs-vs1)#end
When the clear-on-change command is set for persistent hashing, the entire persistent hash table
is cleared whenever a new server comes up. For example, is shown in the following figure.