What do Rebalance and Clear All do on the Session Affinity Manager (SAM) tab?
Short answer
Rebalance deletes the specified percentage of the session records bound to the selected Backend Services in the selected list (Default Backend Services or a conditional set); these users are reassigned to a Backend Service according to the algorithm on their next request. Sessions are not moved to a specific server; the algorithm selects the new server. Clear All completely empties the session tables of all lists that have at least two servers. Neither of them drops open connections, and both work together on the two devices in the cluster; they are performed from the Session Affinity Manager (SAM) tab and have no WEB-CLI equivalent.
SAM Tab
On the screen of a vService whose Persistence is Session Affinity Manager (SAM), there is a Session Affinity Manager (SAM) tab (tabs):
- Top toolbar: Refresh, Clear All (Clear All is enabled only while at least one list has at least two servers).
- Cards: Sessions, Backends, Max idle, Max life.
- For each list (Default Backend Services or a conditional set): the session percentage and count per Backend Service, and the Sessions (session list) and Rebalance buttons. If the list has fewer than two servers, the buttons are inactive and the "Session affinity requires at least 2 backends to function" warning appears.
Rebalance
Fields in the Rebalance Sessions form:
| Field | Meaning | Default |
|---|---|---|
| Backends | The Backend Services whose sessions will be cleared (whose load will be reduced) | All selected |
| Percent | The ratio of sessions to be cleared (1–100) | 100 |
| Selection | Visible only while Percent is below 100; which sessions will be selected: First (Sequential), Random, Oldest (By expiry), Newest (By expiry), Least Connections | First (Sequential) |
- Below 100 percent, the confirmation window shows the approximate number of sessions to be cleared, with the title "Rebalance Sessions?"; at 100 percent, the title becomes "Clear Sessions?", meaning that all sessions of the selected Backend Services are cleared.
- To clear the sessions of a single Backend Service, only that server is selected and Percent is left at 100.
- Oldest (By expiry) selects the sessions closest to expiring, Newest (By expiry) the sessions furthest from expiring, and Least Connections the sessions with the fewest connections.
Clear All
- The confirmation window shows, with the title "Clear All Sessions?", how many lists and approximately how many sessions will be cleared.
- Only the tables of the lists that have at least two servers are cleared.
When Is It Used?
| Situation | Operation |
|---|---|
| A new Backend Service was added; the existing sessions are on the old servers | The busy servers are selected and Rebalance is run with a low percentage (gradual) |
| A server will be put into maintenance | Only that server is selected and Rebalance is run with Percent 100 |
| The session distribution is to be reset completely | Clear All |
Rebalance and Clear All delete only the mapping in TR7; they do not change settings and do not require a save or peer device synchronization. Details: Rebalance.
Common Misconceptions
- "Rebalance distributes the sessions evenly to the other servers." It only deletes the records; the algorithm selects the new server, and the user may also land on the same server.
- "Clear All logs users out of their sessions." It deletes the mapping in TR7; if the application session is kept on the server and the user goes to another server, the user may need to log in again on that server.
- "There is a separate Clear button for a single server." The sessions of a single server are cleared with Rebalance.
- "It can also be done from WEB-CLI." Rebalance and Clear All are done only from the SAM tab.
How it is done in the documentation
