Why does SAM require at least two Backend Services?
Short answer
In a single-server list, all requests already go to that server; session mapping, session counters and rebalancing become meaningless and only add unnecessary cookie and table load. For this reason, TR7 applies SAM only to lists that have at least two servers; a list is the Default Backend Services list of the vService or a Conditional Backend Services group, and each row of a Backend Group counts as a separate server. The rule is per list and does not produce an error: the vService is saved, and in a single-server list, neither the SAM cookie nor the session table is created; an information message appears on the SAM tab.
How Does It Work?
- The count is made separately for each list: the Default Backend Services list and the list of each conditional set. In the list, individual Backend Services and Backend Group rows are counted as servers; for example, a list consisting of a single Backend Group with two rows meets the condition.
- Example: If there are 3 servers in the Default list and 1 server in a conditional set, SAM works only in the Default list; the requests going to the conditional set go to that single server without persistence.
- When a second server is added and the vService is saved with Save, SAM takes effect in that list; in TR7 Generates mode, clients receive the cookie on their next request.
On the SAM Tab
- For a list that does not have two servers, the following information message appears: "Session affinity requires at least 2 backends to function. Add more backends to enable session tracking."
- In this list, the Sessions and Rebalance buttons are inactive.
- Clear All clears only the lists that have at least two servers; if no list meets this condition, the button is inactive.
Common Misconceptions
- "If I select SAM with a single server, the save gives an error." The save succeeds; SAM is simply not applied.
- "The rule applies to the whole vService." Each list is evaluated separately.
- "A Backend Group counts as one server because it is a single record." Each row of the group counts as a separate server.
- "Persistence is required with a single server." If there is a single server, all requests already go to it (LB Algorithm).
How it is done in the documentation
