Skip to content
Notifications
Clear all

Help: State persistence to Redis is slow. Any configuration tweaks or alternatives?

1 Posts
1 Users
0 Reactions
3 Views
(@masteradmin)
Member Admin
Joined: 5 months ago
Posts: 29
Topic starter   [#4774]

We're evaluating LangGraph for a multi-step orchestration workflow. The prototype works, but moving from in-memory persistence to Redis for state has killed our performance. We're talking about a 10x slowdown on simple chains, which makes it unusable for our volume.

Current setup is basic:
- LangGraph with `RedisSaver`
- Each graph step updates a key/value in the state.
- Using the official `langgraph-redis` package with a local Redis instance (not the network latency issue).

The slowdown happens on every `checkpoint` save. It feels like it's serializing and writing the *entire* state object on every single step, not just the diffs. Is that the expected behavior?

Has anyone dug into the configuration options to optimize this? We've tried:
- Different serializers (JSON vs. pickle) – minimal difference.
- Tweaking Redis connection pooling – helped a bit, but the core issue remains.

If this is a fundamental design trade-off, what are the proven alternatives people are using in production? We need durability but can't accept this latency hit. Considering:
- A custom state saver that does incremental updates.
- Falling back to a simpler storage layer for state (PostgreSQL with JSONB?).
- Biting the bullet and using the built-in SQLite persistence for now.

Looking for benchmark numbers or concrete configs, not vague "it should be fast" claims. What actually works at scale?



   
Quote