Infrastructure · Software component
Session Affinity Load Balancer
Software componentInfrastructureInfrastructurearc:SessionAffinityLoadBalancer
A load balancer that pins all requests from the same client to the same replica so conversation context cached there is reused.
Responsibility. Keeps a client's follow-up requests on the replica holding its context.
Also known as: Sticky sessions, Client-IP affinity, IP hash, Consistent routing
Variant of Load Balancer abstract
When to choose. Choose as the simplest cache-locality option for conversational agents whose follow-up messages come from the same client.
Relationships
routes to dynamic
- Agent Controller abstract Ch4.3
alternative to variability
Design guidance
- SHOULD be treated as a temporary expedient while externalizing state, then replaced by least-connections routing.
- SHOULD NOT be used for independent requests (e.g., document processing) where affinity yields no benefit.
Quantitative guidance
As stated by the sources; verify before use.
- Power users can drive ~30% of traffic to one replica while others sit near 10% utilization; skew worsens with small replica counts (Ch4.7).
Classification
- Patterns
- Session affinityIP-hash routingSticky sessions
- Technologies
- Kubernetes Service sessionAffinity: ClientIP
- Quality attributes
- Performance efficiency (ISO/IEC 25010)Maintainability (ISO/IEC 25010)
- Risks mitigated
- Context rebuild on follow-up messagesLocal cache misses for partially stateful agents
Sources
- Ch4.3: T. Nguyen, "Container Orchestration and Edge Deployment," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 4.3. ISBN: 9798244538229.
- Ch4.7: T. Nguyen, "Scaling Strategies," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 4.7. ISBN: 9798244538229.