Memory · Data store
External Session State Store
Data storeMemoryCognition & Memoryarc:ExternalSessionStateStore
A shared, network-accessible store (key-value or relational) that externalizes session state so every stateless replica can retrieve and update any user's conversation.
Responsibility. Persists session state outside replicas so any replica can continue any conversation.
Also known as: Redis state store, Shared state layer, RedisStateStore, Shared state (database, cache)
Variant of Conversation State Store abstract
When to choose. Choose for large-scale deployments (100+ instances), frequent autoscaling that would churn sessions, or when no session may be lost on instance failure.
Relationships
is read by dependency
- Agent Controller abstract Ch4.7 Ref7.17
is written by dependency
- Agent Controller abstract Ch4.7 Ref7.17
alternative to variability
Design guidance
- SHOULD be the default for production agents; most production systems choose stateless architecture.
- SHOULD be deployed with automatic failover (e.g., Sentinel or Cluster) so the state layer is not a single point of failure.
- SHOULD use a relational store for structured state that requires transactional consistency.
- MUST hold all persistent conversation state so any replica can serve any turn.
- SHOULD be protected by multi-AZ replication, read replicas and backup/restore, since stateful components cannot rely on simple load balancing.
Quantitative guidance
As stated by the sources; verify before use.
- Adds 5-20 ms per request for state retrieval (Ch1.8).
- Fetching context from Redis costs milliseconds vs microseconds for in-memory access (Ch4.7).
Classification
- Patterns
- Externalized stateStateless architectureAutomatic failover (Sentinel/Cluster)Session-ID-indexed conversation historyMulti-AZ replication with automatic failoverRead replicas
- Technologies
- RedisRedis ClusterRedis SentinelPostgreSQL
- Quality attributes
- Performance efficiency (ISO/IEC 25010)Reliability (ISO/IEC 25010 | NIST AI RMF: valid and reliable)
- Risks mitigated
- Session loss on instance failureUneven load from sticky sessions
Sources
- Ch1.8: T. Nguyen, "Scalability and Production Deployment," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 1.8. 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.
- Ref7.17: "Scaling Agentic AI Systems: Patterns and Strategies," unpublished reference note (17-Scalability-Patterns.md), Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam supplementary materials, 2026. unpublished note