
Redis Clustering
This covers the two gotchas that trip up most teams moving to Redis Cluster: CROSSSLOT errors when you try multi-key operations across shards, and overloaded primaries when you haven't configured replica reads. The hash tag guidance is practical, showing you how to group related keys with curly braces so transactions and pipelines work, plus when not to do it (tagging everything defeats sharding). The replica read section is short but hits the key point: eventual consistency is fine for dashboards and caches, terrible for anything requiring strict freshness. If you're designing keys for a cluster or debugging why MGET suddenly broke in production, this will save you an hour of Stack Overflow.
- skills.sh installs
- 2K
- GitHub stars
- 175
- last updated
- Aug 21, 2026
Install
$ npx -y skills add redis/agent-skills --skill redis-clustering --agent claude-codeInstalls into .claude/skills of the current project.
Files
Redis Clustering
Guidance for designing keys and routing reads in a sharded Redis Cluster (and in standalone primary/replica replication). Covers the two failure modes that bite most new cluster users: CROSSSLOT errors on multi-key operations, and overloading primaries with read traffic.
When to apply
- Designing keys for a Redis Cluster deployment.
- Debugging a
CROSSSLOTerror onMGET,SDIFF, transactions, or pipelines. - Implementing transactions / Lua scripts that touch multiple keys.
- Scaling out read traffic without adding shards.
1. Hash tags for multi-key operations
Redis Cluster distributes keys across 16,384 slots by hashing the key name. Any command that touches multiple keys (MGET, SDIFF, SUNIONSTORE, transactions, pipelines, Lua scripts with multiple KEYS[]) requires all keys to live on the same slot — otherwise the server returns a CROSSSLOT error.
Hash tags force this: the part between { and } is the only thing hashed for slot assignment, so two keys sharing a hash tag always land together.
Sponsors
Details
- Repository
- github.com/redis/agent-skills
- Categories
- Backend & APIs, AI & Agent Building, Data Science & ML, Debugging, Marketing & SEO, Databases
- First seen
- Jul 14, 2026