What do the entries marked "(Self-persistent)" in the algorithm list mean?
Short answer
Algorithms marked "(Self-persistent)" select the server with the hash of a property of the request: the client IP address, URI, URL parameter, HTTP header or RDP cookie. The same value goes to the same server every time; that is, the algorithm provides persistence by itself and a separate Persistence setting is not required. When one of these algorithms is selected, the Persistence field is hidden in the vService form and the Hash Consistency switch appears in its place.
Which Algorithms?
| Algorithm | Hashed value | vService type |
|---|---|---|
| Source | The client's IP address | HTTP |
| URI | The request path (up to the URI Character Length and URI Depth limit) | HTTP |
| URL Param | The value of the specified URL parameter | HTTP |
| HDR | The value of the specified HTTP header | HTTP |
| RDP Cookie | The value of the cookie specified in the RDP Cookie Name field in the RDP connection | L7 TCP |
This mark does not exist in the algorithm list of a Network vService; there, the same source IP going to the same server is provided with L4 Persistence or with the Source Hash algorithm.
Relation to Persistence
- When a self-persistent algorithm is selected, the Persistence field and the cookie, SAM and Hash fields that depend on it are removed from the form; the two cannot be used together.
- When the pointer is over the pin icon that appears while the LB Algorithm row is collapsed in the vService form, the Persistence value is shown as Self-persistent.
- The Load Balancer Management screen of the vService states that the algorithm pins the client to a server by itself and that a separate Persistence setting is not required; if Hash consistency is on, this is also stated separately.
Hash Consistency
When a self-persistent algorithm is selected, the Hash Consistency switch appears in the LB Algorithm box (off by default). When it is turned on, TR7 uses consistent hashing: when the number of running servers changes, only a small portion of the values change place and no server receives more than 1.5 times the average load. Details: What does the Hash Consistency option do in hash-based algorithms?
If the Key Is Not in the Request
If the HDR header, URL parameter or RDP cookie is not present in the request, that request is distributed to the servers in turn; there is no persistence for these requests.
Common Misconceptions
- "I add cookie persistence to a self-persistent algorithm as well." The Persistence field is hidden; the two cannot be used together.
- "When the server goes down, the user stays on the same server." If the server becomes unavailable, those clients go to another server.
- "Hash guarantees an even distribution." The distribution depends on the variety of the values; e.g. since users behind NAT come from a single IP, they all go to the same server with Source.
- "I can select Source on L7 TCP." Source exists only on HTTP; on L7 TCP, persistence by client IP is provided with Persistence → Hash.
How it is done in the documentation
