Reset Search



KB44830 - The session persistence is causing unequal distribution of connections to the backend server node

« Go Back


Last Modified Date9/29/2021 11:42 AM
The load-balanced application requires IP session persistence and this results in the connections distributing unequally to the backend servers.

Problem or Goal
Is there a way to distribute the connections more evenly to the backend servers while maintaining session persistence?
If session persistence is required, this will always take precedent over the load-balancing algorithm except for new requests; potentially resulting with a backend server receiving more connections than others.  While some clients send few requests, others clients, depending on the type of application, might create hundreds or thousands of connections. 

For each persistence method that uses a cache such as IP-Session Persistence, you can configure the maximum number of map entries each cache can hold.  When a cache fills up faster than the Traffic Manager is able to remove expired session entries, the Traffic Manager discards the oldest (least recently used) entry when a new entry is added.
Beginning with version 19.2, there is a configurable ip_cache_expiry timeout that can be set from the web UI: System > Global Settings > Cache Settings.  This applies to Universal, J2EE and Source IP address-based session persistence types.

This allows setting an expiry time on cached session maps which may help to redistribute load between pool nodes when new nodes are added, or when nodes recover from a failure. This is especially true in enterprise environments where the set of clients might be fixed.  Configuring a session cache with a limited lifespan can also help when placing nodes into a draining state.

Cache size and expiry settings are global - the value you set applies equally to all Session Persistence class instances you create for a particular persistence method.

The Traffic Manager does not actively delete cache entries when they reach the defined expiry time. Instead, the cache entry time is checked against the expiry value only when the entry is looked up. If the session is still current, the Traffic Manager returns the session and resets the cache entry time for that session mapping. If the session is deemed expired, the Traffic Manager deletes it from the cache and establishes a new session.

NOTE: To optimally set the IP cache size and expiry values may require monitoring the cache behavior using the Activity Monitor.  For more details and steps to monitor, please refer to the vTM User Guide 19.2 or higher, section 'Configuring Session Persistence Caches'
Related Links
Attachment 1 
Created ByRichard (Rick) Henderson



Was this article helpful?



Please tell us how we can make this article more useful.

Characters Remaining: 255