You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**Horizontally scaled deployments**: Multiple agent instances behind a load balancer need to share conversation state
25
+
-*Example*: A customer service chatbot deployed across 10+ Kubernetes pods
26
+
-**Multi-region requirements**: Your agents run in different geographic regions and need consistent state
27
+
-*Example*: Global support system where users can be served from any region
28
+
-**Existing Dapr adoption**: Your team already uses Dapr for other microservices
29
+
-*Example*: Your organization has standardized on Dapr for service mesh, pub/sub, and state management
30
+
-**Backend flexibility requirements**: You need to switch state stores without redeploying code
31
+
-*Example*: Starting with Redis in dev, moving to Cosmos DB in production
32
+
-**Enterprise governance**: Platform teams need centralized control over state management policies
33
+
-*Example*: Security requires encryption, TTL, and audit logging configured at the infrastructure level
34
+
35
+
### When to consider alternatives
36
+
37
+
**Use `SQLiteSession` instead if**:
38
+
- Your agent runs as a single instance (desktop app, CLI tool, personal assistant)
39
+
- You want zero external dependencies
40
+
41
+
**Use `Session` (in-memory) instead if**:
42
+
- You're building a quick prototype or demo
43
+
- Sessions are short-lived and losing state on restart is acceptable
44
+
45
+
### The trade-off
46
+
47
+
`DaprSession` adds operational complexity (running Dapr sidecars, managing components) in exchange for production-grade features, flexibility and governance. Choose it when that trade-off makes sense for your deployment scale and requirements.
0 commit comments