redis-clustering

Configure hash tags and replica reads for sharded Redis Cluster deployments.

Updated Jul 25, 2026
One-click install
npx skills add https://github.com/kaannakiin/turborepo_template --skill redis-clustering-kaannakiin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: redis-clustering
Source: https://github.com/kaannakiin/turborepo_template/tree/main/.agents/skills/redis-clustering
Command: npx skills add https://github.com/kaannakiin/turborepo_template --skill redis-clustering-kaannakiin

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Redis Cluster users frequently hit CROSSSLOT errors when running multi-key operations like MGET, SDIFF, transactions, or pipelines, and overload primaries with read traffic that replicas could serve. This Skill provides guidance for designing keys with hash tags and routing reads to replicas. ## Core Features & Use Cases - Hash Tag Key Design: Force related keys onto the same cluster slot using hash tags like {user:1001} so multi-key commands, transactions, and Lua scripts work without CROSSSLOT errors. - Read Replica Routing: Enable read_from_replicas in Redis Cluster or point a second client at a replica in standalone replication to scale read-heavy workloads. - Use Case: You are building a session store on Redis Cluster and your pipeline of GET commands fails with CROSSSLOT. Apply hash tags scoped to each user entity so all of a user's keys share a slot, then route dashboard reads to replicas to free primary capacity. ## Quick Start Ask the assistant to redesign your Redis keys with hash tags so your multi-key pipeline stops throwing CROSSSLOT errors in cluster mode.

Frequently Asked Questions about redis-clustering

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix CROSSSLOT errors in Redis Cluster?

CROSSSLOT errors occur when a multi-key command touches keys on different hash slots. Add a hash tag like {user:1001} to all related keys so only the tagged portion is hashed, forcing them onto the same slot.

How do hash tags work in Redis Cluster key design?

Redis Cluster hashes only the substring between { and } to assign a key's slot. Keys sharing a tag like {user:1001}:profile and {user:1001}:settings land on the same slot, enabling transactions, pipelines, and multi-key commands.

How do I read from Redis replicas in Python?

In cluster mode, create RedisCluster with read_from_replicas=True so reads are distributed to replicas while writes go to primaries. In standalone replication, connect a second redis-py client directly to the replica host for reads.

When should I avoid reading from Redis replicas?

Replica reads are eventually consistent, so avoid them for read-your-own-writes flows or data requiring strict freshness like financial balances and idempotency state. They fit caches, analytics, dashboards, and recommendation feeds.

Should every Redis Cluster key use a hash tag?

No. Tag only keys that participate in multi-key operations together. Tagging everything concentrates traffic on few slots, creating hotspots and defeating the purpose of sharding across 16,384 slots.