redis avatar

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-code

Installs 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 CROSSSLOT error on MGET, 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

More from redis/agent-skills

All 8
1affaan-m avatarpubmed-databaseaffaan-m/everything-claude-codepubmed database1.8Kskills.sh installs
2upstash avatarredis-jsupstash/redis-jsWork with the Upstash Redis JavaScript/TypeScript SDK for serverless Redis operations. Use for caching, session storage, rate limiting, leaderboards, full-text 1.7Kskills.sh installs
3vercel avatarcapture-api-response-test-fixturevercel/aiCapture API response test fixture.1.7Kskills.sh installs
4lovartai avatarlovart-apilovartai/lovart-skilllovart api1.7Kskills.sh installs
5affaan-m avatarredis-patternsaffaan-m/everything-claude-coderedis patterns1.7Kskills.sh installs
6intellectronica avatartodoist-apiintellectronica/agent-skillsThis skill provides instructions for interacting with Todoist using the td CLI tool. It covers CRUD operations for tasks/projects/sections/labels/comments, and 1.7Kskills.sh installs