Why Sticky Session Routing Without TTLs Quietly Causes Backend Imbalance
Session affinity routes clients to the same backend node consistently, but problems arise when assignment records are never deleted after a client disconnects or goes idle. Over time, stale rows accumulate in the routing table, causing the load-balancing logic to misjudge which nodes are least loaded. This gradually concentrates traffic on a small number of nodes, producing imbalance that appears unrelated to any routing bug. The recommended fix is adding a TTL to each assignment, refreshed on every active use, rather than relying on explicit delete-on-disconnect events that may never fire. Developers using DynamoDB should note that its native TTL deletion is best-effort and not instantaneous, so expired records may briefly persist beyond their expiry time.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in