Redis single-primary checkpoints
If your application already has a Redis single primary, it can save workflow progress there. Managed checkpoints have been validated on a Redis 7.4 single primary. Managed checkpoints for Redis Cluster are deferred.
New deployments
- Connect with Redisson's
useSingleServer(). Use the sameRedissonClientfor the saver, the blob store, and parent and child graphs you need to fork together. Connect application instances to the same logical database and keep the serializer and blob namespace consistent. - Set Redis to
maxmemory-policy noeviction, permitINFO, and keep the saver's default TTL of-1. To recover progress after Redis itself restarts, enable AOF and set its sync policy to match your tolerance for data loss.
import com.alibaba.cloud.ai.graph.checkpoint.savers.redis.RedisCheckpointBlobStore;
import com.alibaba.cloud.ai.graph.checkpoint.savers.redis.RedisSaver;
var saver = RedisSaver.builder().redisson(redissonClient).build();
var blobs = new RedisCheckpointBlobStore(redissonClient, "support-workflow");
New storage uses the new checkpoint format by default. Register saver with the graph. To offload payloads, attach blobs as shown in the large state guide.
Upgrade existing checkpoints
- Back up Redis and reserve space for a copy of old history. Keep the original logical database, key mappings, and serializer. Managed mode requires TTL
-1. - Follow the rolling upgrade guide to upgrade all instances. Drain old runs, writes, and archive jobs, then call
activateManagedCheckpointWrites(). Restart the application or rebuild the saver and recompile the graph. - Verify recovery with the original
threadIdand check the old IDs and order. Old archives whose thread mappings are missing and any custom payloads need separate migration. Rehearse with your longest thread histories. A history migration, fork, or pruning operation that would change more than 3,000 Redis keys is rejected in full.
Blob garbage collection defaults to observation only. See retention, collection, and monitoring.