AI for Redis
Operate and debug Redis with AI — data structures and memory, persistence (RDB/AOF), replication and Sentinel, Cluster sharding, eviction and TTLs, latency, and reliability.
39 copy-paste prompts · 50 in-depth guides Jump to prompts Jump to guides
Prompts
- Intermediate
Redis Bitmap Analytics Design Prompt
Design memory-efficient real-time analytics with Redis bitmaps — daily active users, retention, and feature flags — using SETBIT/BITCOUNT/BITOP and BITFIELD counters.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
Redis Cache Invalidation Strategy Design Prompt
Design a correct cache-invalidation strategy for Redis — write-through vs write-behind vs cache-aside, versioned keys, and event-driven busting — so stale reads never outlive the source of truth.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
Redis Cache Stampede Prevention Design Prompt
Design defenses against cache stampede (dogpile/thundering herd) when a hot Redis key expires and many clients recompute it at once — locks, early recompute, and jittered TTLs.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
Redis Capacity Planning and Forecasting Prompt
Forecast Redis memory, connection, and throughput headroom — accounting for RSS overhead, replication buffers, fork COW, and growth — to decide when to scale up, add replicas, or shard.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
Redis Fork and Copy-on-Write Latency Tuning Prompt
Diagnose and tune Redis fork/copy-on-write latency during RDB and AOF rewrites — THP, overcommit, latest_fork_usec, and COW memory — so background saves stop stalling the primary.
- Claude
- ChatGPT
- Cursor
Open prompt - Intermediate
Redis Key Naming Convention Design Prompt
Design a consistent, collision-free Redis key-naming scheme — namespaces, delimiters, versioning, and cluster hash-tag placement — that stays debuggable and safe to migrate.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
Redis Functions Library Design Prompt
Design a Redis 7+ Functions library (FUNCTION LOAD) to replace ad-hoc EVAL scripts — with named entry points, KEYS/ARGV discipline, atomicity, and cluster-safe key access.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
Redis Object Encoding Optimization Prompt
Cut Redis memory by keeping values in their compact internal encodings — listpack, intset, embstr — by tuning the *-max-* thresholds and reshaping keys, verified with OBJECT ENCODING.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
Redis SCAN-Based Key Migration Design Prompt
Design a non-blocking key migration or bulk operation on a live Redis instance using SCAN cursors, batching, and rate limiting — never KEYS — with DUMP/RESTORE or MIGRATE.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
Redis Active-Active (CRDT) Geo-Replication Design Prompt
Design multi-region active-active Redis — CRDT semantics, conflict resolution, counters vs strings, and expiry pitfalls — for low-latency global writes.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
Redis Geospatial Index Design Prompt
Design a Redis geospatial index — GEOADD/GEOSEARCH modeling, sharding, precision, and memory trade-offs — for proximity search at scale.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
Redis HyperLogLog Cardinality Design Prompt
Design HyperLogLog counting on Redis — PFADD/PFCOUNT/PFMERGE, error bounds, key rollups, and Cluster merges — for unique-count analytics.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
Redis Big Key and Hot Key Analysis Prompt
Hunt down oversized keys and traffic-skewed hot keys that cause latency spikes, uneven cluster load, and blocking deletes — then fix them safely.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
Redis Client-Side Caching (Tracking) Design Prompt
Design a RESP3 client-side caching layer with server-assisted invalidation — default vs broadcast tracking, BCAST prefixes, OPTIN/OPTOUT — without serving stale data.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
Redis Multithreaded I/O and Threading Tuning Prompt
Decide whether io-threads, lazy-free background threads, and CPU pinning will actually help — or hurt — a latency-sensitive Redis instance, with real INFO evidence.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
Redis ACL and Security Hardening Prompt
Harden Redis with ACL users and rules, command renaming, protected-mode, and bind, applying least privilege and closing default-access holes.
- Claude
- ChatGPT
Open prompt - Advanced
Redis Backup and Migration Plan Prompt
Plan Redis backups with BGSAVE/RDB, move keys with DUMP/RESTORE and MIGRATE, and sequence safe version upgrades and data migrations.
- Claude
- ChatGPT
Open prompt - Intermediate
Redis Caching Strategy Design Prompt
Design a Redis caching layer — cache-aside, write-through, write-behind patterns, TTLs, and stampede protection for read-heavy services.
- Claude
- ChatGPT
Open prompt - Advanced
Redis Cluster Sharding Design Prompt
Design Redis Cluster sharding — 16384 hash slots, resharding, hash tags, and multi-key operation constraints across shards.
- Claude
- ChatGPT
Open prompt - Intermediate
Redis Connection Pool Tuning Prompt
Tune Redis client connection pools: pool sizing, timeouts, maxclients, TCP keepalive, and avoiding connection exhaustion and leaks.
- Claude
- ChatGPT
Open prompt - Intermediate
Redis Data Structure Selection Prompt
Choose the right Redis type — string, hash, list, set, sorted set, stream, bitmap, or HyperLogLog — for a given use case and access pattern.
- Claude
- ChatGPT
Open prompt - Advanced
Redis Distributed Lock and Redlock Design Prompt
Design SET NX PX distributed locks safely, evaluate Redlock and its controversy, and add fencing tokens to avoid split-brain writes.
- Claude
- ChatGPT
Open prompt - Intermediate
Redis Eviction Policy Tuning Prompt
Tune Redis maxmemory and maxmemory-policy — allkeys-lru, volatile-ttl, LFU, noeviction — to match cache vs data-store workloads.
- Claude
- ChatGPT
Open prompt - Intermediate
Redis Keyspace Notifications Setup Prompt
Configure notify-keyspace-events to receive expired, evicted, and mutation events via keyspace/keyevent pub/sub, with delivery caveats.
- Claude
- ChatGPT
Open prompt - Intermediate
Redis Leaderboard Sorted Set Design Prompt
Design scalable leaderboards with Redis sorted sets using ZADD/ZRANGE/ZRANK, handling ties, pagination, and huge member counts.
- Claude
- ChatGPT
Open prompt - Advanced
Redis Lua Scripting Review Prompt
Review Redis Lua scripts — EVAL/EVALSHA, atomicity, KEYS vs ARGV, and script safety — to keep server-side logic correct and non-blocking.
- Claude
- ChatGPT
Open prompt - Advanced
Redis Memory Optimization Prompt
Analyze Redis memory usage — encodings, big keys, fragmentation — and reduce footprint with listpack/intset thresholds and smarter modeling.
- Claude
- ChatGPT
Open prompt - Advanced
Redis Persistence RDB/AOF Config Prompt
Configure Redis durability — RDB snapshots vs AOF, appendfsync policy, and hybrid persistence — balancing data safety against latency.
- Claude
- ChatGPT
Open prompt - Intermediate
Redis Pipelining and Batching Optimization Prompt
Optimize Redis throughput with pipelining and batching — cut round-trip latency, size batches safely, and avoid blocking the event loop.
- Claude
- ChatGPT
Open prompt - Intermediate
Redis Pub/Sub Messaging Design Prompt
Design Redis messaging — Pub/Sub vs Streams, fan-out patterns, sharded pub/sub, and the at-most-once delivery caveats to plan around.
- Claude
- ChatGPT
Open prompt - Intermediate
Redis Rate Limiter Design Prompt
Design token bucket and sliding window rate limiters in Redis using INCR/EXPIRE or atomic Lua, avoiding race conditions and TTL bugs.
- Claude
- ChatGPT
Open prompt - Intermediate
Redis Replication Setup Review Prompt
Review Redis primary/replica topology — replicaof, replica-read-only, sync health, and lag — for read scaling and failover readiness.
- Claude
- ChatGPT
Open prompt - Advanced
Redis Sentinel High Availability Design Prompt
Design Redis Sentinel HA — quorum, automatic failover, and client discovery — for resilient primary/replica setups without Cluster.
- Claude
- ChatGPT
Open prompt - Intermediate
Redis Session Store Design Prompt
Design a Redis session store with correct TTLs, serialization, and a decision between sticky sessions and shared session state.
- Claude
- ChatGPT
Open prompt - Intermediate
Redis SLOWLOG and Latency Analysis Prompt
Diagnose Redis latency using SLOWLOG, LATENCY monitoring, and latency-monitor-threshold to find slow commands and blocking sources.
- Claude
- ChatGPT
Open prompt - Advanced
Redis Streams Consumer Groups Design Prompt
Design Redis Streams processing — XADD/XREADGROUP/XACK, pending entries lists, claiming stuck messages, and trimming for at-least-once delivery.
- Claude
- ChatGPT
Open prompt - Advanced
Redis TLS Configuration Review Prompt
Review Redis TLS setup: tls-port, certificates, client authentication (mTLS), and cluster/replication TLS, catching common misconfigurations.
- Claude
- ChatGPT
Open prompt - Intermediate
Redis Transactions MULTI/EXEC Design Prompt
Design correct Redis transactions with MULTI/EXEC/WATCH optimistic locking and understand atomicity limits and rollback behavior.
- Claude
- ChatGPT
Open prompt - Beginner
Redis TTL and Expiration Strategy Prompt
Design TTL hygiene with EXPIRE/PEXPIRE, understand active vs lazy expiry, and avoid immortal keys and expiry-driven latency spikes.
- Claude
- ChatGPT
Open prompt
Guides
- · 10 min read
Redis 'OOM command not allowed when used memory > maxmemory': How to Fix
Fix OOM command not allowed when used memory > maxmemory in Redis: diagnose maxmemory limits, noeviction policy, big keys, fragmentation, and unbounded data growth.
Read guide - · 8 min read
Redis Error Guide: 'WRONGPASS invalid username-password pair or user is disabled' — Fix the Credential or ACL User
Fix WRONGPASS invalid username-password pair or user is disabled in Redis: diagnose wrong passwords, disabled ACL users, wrong username, and stale rotated secrets.
Read guide - · 8 min read
Redis Error Guide: 'Background append only file rewriting already in progress' — Fix Overlapping BGREWRITEAOF
Fix Background append only file rewriting already in progress in Redis: diagnose concurrent BGREWRITEAOF, auto-rewrite races, and slow AOF forks.
Read guide - · 8 min read
Redis Error Guide: 'ERR Background save already in progress' — Fix Overlapping BGSAVE Calls
Fix ERR Background save already in progress in Redis: diagnose concurrent BGSAVE, slow RDB forks, and backup jobs racing scheduled saves.
Read guide - · 8 min read
Redis Error Guide: 'ERR Client sent AUTH, but no password is set' — Fix AUTH Against an Unsecured Server
Fix ERR Client sent AUTH, but no password is set in Redis: a password sent to a server with no requirepass, ACL mismatches, and wrong-instance connections.
Read guide - · 8 min read
Redis Error Guide: 'ERR DISCARD without MULTI' — Fix Transaction Cleanup Logic
Fix ERR DISCARD without MULTI in Redis: diagnose DISCARD called with no open transaction, double cleanup after EXEC, and connection-pool state assumptions.
Read guide - · 8 min read
Redis Error Guide: 'ERR invalid expire time in set command' — Fix Bad TTL Values
Fix ERR invalid expire time in 'set' command in Redis: diagnose zero and negative TTLs, seconds-vs-milliseconds mixups, overflow, and float expiry values.
Read guide - · 8 min read
Redis Error Guide: 'ERR MULTI calls can not be nested' — Fix Transaction State on Pooled Connections
Fix ERR MULTI calls can not be nested in Redis: diagnose a second MULTI on an open transaction, leaked state, and connection-pool reuse bugs.
Read guide - · 8 min read
Redis Error Guide: 'ERR no such key' — Fix RENAME, MOVE, and OBJECT on Missing Keys
Fix ERR no such key in Redis: diagnose RENAME/MOVE/OBJECT/DUMP on keys that expired, were evicted, live in another DB, or sit on a different cluster node.
Read guide - · 9 min read
Redis Error Guide: 'NOGOODSLAVE No suitable replica to promote' — Fix Sentinel Failover
Fix NOGOODSLAVE No suitable replica to promote in Redis Sentinel: diagnose disconnected replicas, replica-priority 0, stale replication, and quorum issues.
Read guide - · 8 min read
Redis Error Guide: 'ERR syntax error' — Fix Invalid Command Options and Flags
Fix ERR syntax error in Redis: diagnose unsupported flags, mistyped options, wrong option order, and version-specific command syntax on SET and EXPIRE.
Read guide - · 8 min read
Redis Error Guide: 'ERR value is not a valid float' — Fix INCRBYFLOAT and Sorted-Set Scores
Fix ERR value is not a valid float in Redis: diagnose non-numeric stored values, bad INCRBYFLOAT input, locale decimal commas, and NaN on ZADD scores.
Read guide - · 8 min read
Redis Error Guide: 'ERR wrong number of arguments for command' — Fix Malformed Commands and Client Bugs
Fix ERR wrong number of arguments for 'set' command in Redis: diagnose missing arguments, unquoted spaces, wrong arity, and client-library serialization bugs.
Read guide - · 8 min read
Redis Error Guide: 'bind: Address already in use' — Free Port 6379 and Fix Duplicate Redis Startups
Fix bind Address already in use when starting Redis: find what holds port 6379, stop duplicate or orphaned redis-server processes, and correct port config.
Read guide - · 8 min read
Redis Error Guide: 'BUSYKEY Target key name already exists' — Use REPLACE on RESTORE, COPY, and MIGRATE
Fix BUSYKEY Target key name already exists in Redis: understand RESTORE, COPY, and MIGRATE overwrite behavior and add REPLACE to make migrations idempotent.
Read guide - · 8 min read
Redis Error Guide: 'This instance has cluster support disabled' — Enable cluster-enabled or Use Non-Cluster Commands
Fix This instance has cluster support disabled in Redis: enable cluster-enabled mode correctly and stop running CLUSTER commands against a standalone node.
Read guide - · 9 min read
Redis Error Guide: 'DUMP payload version or checksum are wrong' — Fix RESTORE Serialization Mismatches
Fix DUMP payload version or checksum are wrong in Redis RESTORE: handle RDB version mismatches, truncated payloads, and binary-unsafe transport corruption.
Read guide - · 8 min read
Redis Error Guide: 'EXEC without MULTI' — Fix Broken Transaction Sequencing and Pooled Connections
Fix ERR EXEC without MULTI in Redis: understand MULTI/EXEC transaction state and how connection pooling and reconnects desync transaction commands.
Read guide - · 8 min read
Redis Error Guide: 'increment or decrement would overflow' — Fix 64-bit Counter Overflows
Fix increment or decrement would overflow in Redis: understand INCR/INCRBY/HINCRBY 64-bit integer limits, BITFIELD overflow modes, and redesigning counters.
Read guide - · 8 min read
Redis Error Guide: 'NOPROTO unsupported protocol version' — Fix RESP3 HELLO Against Older Redis
Fix NOPROTO unsupported protocol version in Redis: understand RESP2 vs RESP3, the HELLO handshake, and matching the client protocol to the server version.
Read guide - · 9 min read
Redis Error Guide: 'NOREPLICAS Not enough good replicas to write' — Restore Replica Health or Relax min-replicas
Fix NOREPLICAS Not enough good replicas to write in Redis: diagnose min-replicas-to-write, replica link status, and replication lag so primary writes succeed.
Read guide - · 8 min read
Redis Error Guide: 'SELECT is not allowed in cluster mode' — Drop Multiple Databases for Cluster
Fix SELECT is not allowed in cluster mode in Redis: understand why cluster uses only DB 0 and migrate code off numbered databases to key prefixes instead.
Read guide - · 9 min read
Redis Error Guide: 'NOPERM this user has no permissions' — Fix ACL Rules
Fix Redis 'NOPERM' errors: read the ACL rule that denied the command, key, or channel, then grant the right +command, key pattern, or pub/sub permission safely.
Read guide - · 9 min read
Redis Error Guide: 'TRYAGAIN Multiple keys request during rehashing of slot' — Fix Cluster Resharding
Fix Redis Cluster 'TRYAGAIN' errors on multi-key commands during slot migration: understand key-in-flight semantics, retry correctly, and reduce cross-slot exposure.
Read guide - · 9 min read
Redis Error Guide: 'ERR unknown command' — Fix Missing Modules and Typos
Fix Redis 'ERR unknown command' errors: tell a missing module (JSON.SET, FT.SEARCH) from a typo, wrong server, or renamed command, and load or route correctly.
Read guide - · 8 min read
Redis Error Guide: 'DENIED Redis is running in protected mode' — Fix Remote Connection Refused
Fix Redis 'DENIED Redis is running in protected mode' safely: bind to the right interfaces, require a password or ACL, and never expose an unauthenticated Redis to the internet.
Read guide - · 9 min read
Redis Error Guide: 'Can't save in background: fork: Cannot allocate memory' — Fix Redis fork/COW OOM
Fix Redis 'fork: Cannot allocate memory' during RDB/AOF saves: set vm.overcommit_memory=1, size RAM for copy-on-write, cut write churn, and cap maxmemory so bgsave and BGREWRITEAOF succeed.
Read guide - · 8 min read
Redis Error Guide: 'ERR value is not an integer or out of range' — Fix Numeric Command Failures
Fix Redis 'ERR value is not an integer or out of range': non-numeric strings passed to INCR/EXPIRE/SETRANGE, float-vs-int confusion, 64-bit overflow, and out-of-range index arguments.
Read guide - · 9 min read
Redis Error Guide: 'ASK <slot> <host:port>' — Cluster Redirect During Resharding
Fix ASK redirects in Redis Cluster: understand slot migration, ASKING, MOVED vs ASK, client cluster-map refresh, and stuck resharding during live key migration.
Read guide - · 8 min read
Redis Error Guide: 'BUSY Redis is busy running a script' — Blocked by a Long Lua Script
Fix 'BUSY Redis is busy running a script' errors: lua-time-limit, SCRIPT KILL vs SHUTDOWN NOSAVE, looping Lua, and writing non-blocking scripts.
Read guide - · 8 min read
Redis Error Guide: 'BUSYGROUP Consumer Group name already exists' — Make Group Creation Idempotent
Fix BUSYGROUP Consumer Group name already exists in Redis Streams: understand XGROUP CREATE on restart, MKSTREAM, idempotent group setup, and safe consumer bootstrapping.
Read guide - · 9 min read
Redis Error Guide: 'CLUSTERDOWN Hash slot not served' — Restore Slot Coverage
Fix CLUSTERDOWN Hash slot not served in Redis Cluster: diagnose unassigned slots, failed masters with no replica, cluster-require-full-coverage, and broken cluster state.
Read guide - · 9 min read
Redis Error Guide: 'Could not connect to Redis ... Connection refused' — Nothing Is Listening on the Port
Fix Could not connect to Redis Connection refused: diagnose a stopped redis-server, wrong host/port, bind and protected-mode config, firewalls, and crashed instances.
Read guide - · 9 min read
Redis Error Guide: 'Connection reset by peer' / Broken Pipe to Redis
Fix Redis 'Connection reset by peer' and broken pipe errors: diagnose client output buffer limits, idle timeouts, TCP keepalive, OOM killer, and idle reaping.
Read guide - · 9 min read
Redis Error Guide: 'CROSSSLOT Keys in request don't hash to the same slot' — Use Hash Tags
Fix CROSSSLOT Keys in request don't hash to the same slot in Redis Cluster: understand slot hashing, hash tags, multi-key commands, MGET/MSET, and transaction key placement.
Read guide - · 8 min read
Redis Error Guide: 'EXECABORT Transaction discarded because of previous errors'
Fix EXECABORT errors in Redis MULTI/EXEC: diagnose queued syntax errors, unknown commands, wrong arity, and how it differs from runtime WRONGTYPE.
Read guide - · 10 min read
Redis Error Guide: Latency Spikes — Fork, AOF Rewrite, THP and Swap via SLOWLOG/LATENCY
Fix Redis latency spikes: diagnose fork/COW stalls, AOF rewrite, transparent hugepages, swap and slow commands via SLOWLOG and LATENCY DOCTOR.
Read guide - · 8 min read
Redis Error Guide: 'LOADING Redis is loading the dataset in memory' — Wait Out the Startup Load
Fix LOADING Redis is loading the dataset in memory: understand RDB/AOF load on startup, slow disk, huge dumps, replica full sync, and how to wait or speed up recovery.
Read guide - · 9 min read
Redis Error Guide: 'MASTERDOWN Link with MASTER is down and replica-serve-stale-data is no'
Fix Redis MASTERDOWN errors: diagnose broken master links, master_link_status:down, replica-serve-stale-data, network/auth failures, and resync recovery.
Read guide - · 9 min read
Redis Error Guide: 'ERR max number of clients reached' — Connection Limit Hit
Fix 'ERR max number of clients reached' in Redis: diagnose maxclients, leaked/idle connections, missing pooling, low ulimit -n, and CLIENT KILL relief.
Read guide - · 9 min read
Redis Error Guide: High mem_fragmentation_ratio — RSS Far Exceeds used_memory
Fix high Redis mem_fragmentation_ratio and RSS >> used_memory: diagnose allocator fragmentation, activedefrag, jemalloc, swap, and churn via INFO memory.
Read guide - · 10 min read
Redis Error Guide: 'MISCONF Redis is configured to save RDB snapshots but is currently unable to persist on disk' — Fix the Failing BGSAVE
Fix MISCONF Redis is configured to save RDB snapshots but unable to persist on disk: diagnose full disk, permissions on dir, failed BGSAVE, and stop-writes-on-bgsave-error.
Read guide - · 9 min read
Redis Error Guide: 'MOVED <slot> <host:port>' — Use a Cluster-Aware Client
Fix MOVED slot host:port redirects in Redis Cluster: understand slot ownership, cluster-aware clients, the -c flag, stale slot maps after resharding, and MOVED vs ASK.
Read guide - · 8 min read
Redis Error Guide: 'NOAUTH Authentication required' — Send AUTH Before Commands
Fix NOAUTH Authentication required in Redis: diagnose requirepass and ACL auth, missing AUTH in the connection string, wrong password source, and unauthenticated clients.
Read guide - · 8 min read
Redis Error Guide: 'NOSCRIPT No matching script. Please use EVAL' — Reload the Script Cache
Fix NOSCRIPT No matching script Please use EVAL in Redis: understand EVALSHA script cache misses after restart, SCRIPT FLUSH, failover, and the EVALSHA-then-EVAL fallback.
Read guide - · 8 min read
Redis Error Guide: 'Protocol error: invalid bulk length / too big inline request'
Fix Redis 'Protocol error: invalid bulk length' and 'too big inline request': diagnose non-RESP clients, oversized args, proto-max-bulk-len, and TLS mismatch.
Read guide - · 9 min read
Redis Error Guide: 'Bad file format reading the append only file' / Short Read Loading DB
Fix Redis crashes loading RDB/AOF: diagnose 'Bad file format', 'Short read' truncation, OOM on load, and repair with redis-check-aof/redis-check-rdb.
Read guide - · 9 min read
Redis Error Guide: 'READONLY You can't write against a read only replica' — Point Writes at the Master
Fix READONLY You can't write against a read only replica in Redis: diagnose writing to a replica, stale topology after failover, Sentinel/Cluster routing, and replica-read-only.
Read guide - · 9 min read
Redis Error Guide: Replica Stuck in Repeated Full Resync — Partial Resync Failing
Fix a Redis replica looping on full resync: diagnose small repl-backlog-size, replication ID mismatch, output buffer kills, and rising sync_full.
Read guide - · 8 min read
Redis Error Guide: 'WRONGTYPE Operation against a key holding the wrong kind of value'
Fix WRONGTYPE errors in Redis: diagnose key-type mismatches, colliding key names, wrong command for a type, and format drift using TYPE and SCAN.
Read guide