valkey
Valkey Application Developer Reference
Routing
- Conditional update, compare-and-swap, optimistic locking, CAS, WATCH/MULTI/EXEC replacement, lock release race, safe delete, atomic delete-if-equal, replace Lua script -> Conditional Ops (IFEQ/DELIFEQ)
- Per-field TTL, hash field expiration, session tokens, feature flags -> Hash Field TTL
- Slow commands, large requests/replies, monitoring, debugging -> COMMANDLOG
- Key expiration inspection, absolute timestamps, TTL audit, PERSIST -> EXPIRETIME
- Polygon queries, geofencing, region matching -> Geospatial
- Cluster numbered databases, atomic slot migration -> Cluster Enhancements
- I/O threading, SIMD, zero-copy, dual-channel replication -> Performance Internals
- Caching, write-through, write-behind, stampede, client-side caching -> Patterns (caching)
- Sessions, sliding TTL, multi-device, session store -> Patterns (sessions)
- Distributed locks, Redlock, safe release -> Patterns (locks)
- Rate limiting, throttling, token bucket, sliding window -> Patterns (rate-limiting)
- Queues, streams, XADD, XREAD, consumer groups, dead letter, FIFO -> Patterns (queues)
- Leaderboards, rankings, sorted set, top-N, pagination -> Patterns (leaderboards)
- Pub/Sub, publish, subscribe, notifications, fan-out, sharded pub/sub -> Patterns (pubsub-patterns)
- Search, autocomplete, prefix, inverted index, tag filtering -> Patterns (search-autocomplete)
- Counters, atomic increment, HyperLogLog, idempotency, sharded counters -> Patterns (counters)
- Key naming, memory, performance, persistence, cluster, HA -> Best Practices
- Memory fragmentation, mem_fragmentation_ratio, active defrag, jemalloc, MEMORY USAGE, MEMORY DOCTOR -> Advanced (defrag)
- Replication internals, PSYNC, partial resync, full resync, backlog sizing, diskless replication, dual-channel, replica priority, min-replicas-to-write -> Advanced (replication)
- Latency diagnosis, high p99, LATENCY LATEST, LATENCY DOCTOR, latency-monitor-threshold, slow commands, fork pauses, THP, event loop -> Advanced (latency)
- Auth, ACLs, TLS, network security -> Security
- Common mistakes, KEYS in production, missing TTL, unbounded collections -> Anti-Patterns
- Redis compatibility, migration, fork history -> Overview
- Data types, strings, hashes, lists, sets, sorted sets, streams, bitmaps, geo, HyperLogLog -> Basics (data-types)
- Transactions, MULTI/EXEC, Lua scripting, EVAL, FCALL, INFO, SCAN, CONFIG -> Basics (server-and-scripting)
- EVAL vs FCALL, EVALSHA, FUNCTION LOAD, Lua script replication, determinism, EVAL_RO, FCALL_RO, busy-script-time, lua-time-limit, script timeout, SCRIPT KILL, sliding window rate limiter, CAS Lua -> Advanced (lua-functions)
- CLIENT TRACKING, RESP3 push invalidation, RESP2 redirect, BCAST mode, OPTIN, OPTOUT, tracking-table-max-keys, redis:invalidate, GLIDE cache, redis-py tracking, ioredis tracking, invalidation consistency -> Advanced (client-side-caching)
Valkey-Specific Features
| Topic | Reference |
|---|---|
| SET IFEQ (8.1+), DELIFEQ (9.0+) - atomic compare-and-swap, safe lock release without Lua | conditional-ops |
| HSETEX, HGETEX, HGETDEL, HEXPIRE, HPERSIST (9.0+) - per-field TTL on hashes | hash-field-ttl |
| COMMANDLOG GET/LEN/RESET (8.1+) - unified slow/large-request/large-reply logging, replaces SLOWLOG | commandlog |
| EXPIRETIME, PEXPIRETIME, PERSIST - absolute expiration timestamps, TTL inspection and removal | expiretime |
| GEOSEARCH BYPOLYGON (9.0+) - arbitrary polygon region matching | geospatial |
| Numbered databases in cluster mode, atomic slot migration | cluster-enhancements |
| I/O threading, SIMD acceleration, prefetch, zero-copy, dual-channel replication | performance-summary |
Overview
| Topic | Reference |
|---|---|
| Valkey versions, license, governance, Redis fork history, Valkey vs Redis comparison | what-is-valkey |
| Redis compatibility, migration strategies, what changed | compatibility |
Application Patterns
| Topic | Reference |
|---|---|
| Cache-aside, write-through, write-behind, client-side caching, stampede prevention | caching-strategies |
| Cache invalidation, TTL patterns, eviction policies | caching-invalidation |
| Session hashes, sliding TTL, session rotation, basic session store | sessions-basics |
| Per-field TTL sessions (Valkey 9.0+), session counting, concurrent session limits | sessions-field-expiry |
| SET NX with TTL, safe release (DELIFEQ), Redlock algorithm, fencing tokens, lock renewal | locks |
| Fixed window, sliding window counter, sliding window log | rate-limiting-windows |
| Token bucket, per-field rate limiting (Valkey 9.0+), algorithm comparison | rate-limiting-advanced |
| Simple FIFO queues (LPUSH/BRPOP), reliable queues (LMOVE) | queues-list-based |
| Stream-based queues (XREADGROUP), consumer groups, dead letter, priority queues, queue pattern comparison | queues-streams |
| Sorted set rankings, pagination, top-N, score updates, composite scoring, time-bucketed | leaderboards |
| Pub/Sub patterns, sharded pub/sub, fan-out, notification systems, keyspace notifications, pub/sub vs streams comparison | pubsub-patterns |
| Prefix autocomplete, tag filtering, inverted indexes, scored search results | search-autocomplete |
| Atomic counters, sharded counters, idempotency keys | counters-atomic |
| HyperLogLog, BITFIELD packed counters, deduplication strategies | counters-approximate |
Best Practices
| Topic | Reference |
|---|---|
| Key naming, namespaces, hot key and big key avoidance, key expiration strategies, key analysis commands | keys |
| Memory reduction, encoding thresholds, TTL strategies, eviction | memory |
| UNLINK vs DEL, SCAN vs KEYS, data-type iteration | performance-commands |
| Pipelining, connection pooling, I/O threading, performance anti-patterns | performance-throughput |
| RDB, AOF, hybrid persistence, latency impact, durability decisions | persistence |
| Hash tags, cross-slot errors, CROSSSLOT fixes | cluster-hash-tags |
| MOVED/ASK redirects, replica reads, pipelining in cluster, CLUSTERSCAN | cluster-operations |
| Sentinel, failover, retries, WAIT/WAITAOF, replication lag, Sentinel vs Cluster decision | high-availability |
Advanced Topics
| Topic | Reference |
|---|---|
Memory fragmentation, mem_fragmentation_ratio, active defrag config, MEMORY USAGE, MEMORY DOCTOR, Valkey 8.1 hashtable impact |
defrag |
Replication internals (PSYNC2), partial vs full resync triggers, backlog sizing, diskless sync, dual-channel replication (8.0+), replica chains, min-replicas-to-write |
replication-internals |
End-to-end latency diagnosis, LATENCY LATEST/HISTORY/DOCTOR, COMMANDLOG correlation, fork pauses, THP, expiration storms, I/O thread impact, p99 playbook |
latency-diagnosis |
EVAL vs FCALL, EVALSHA, FUNCTION LOAD, script replication (effects vs commands), determinism, EVAL_RO/FCALL_RO for replica reads, busy-script-time, SCRIPT KILL, memory limits, SET IFEQ/DELIFEQ as Lua replacements, sliding window rate limiter |
lua-functions |
CLIENT TRACKING protocol (RESP3 push, RESP2 redirect), default/BCAST/OPTIN/OPTOUT modes, tracking-table-max-keys eviction, GLIDE CacheConfig, redis-py/ioredis manual wiring, consistency guarantees, connection management, what to track vs skip |
client-side-caching |
Security
| Topic | Reference |
|---|---|
| ACL users, key pattern restrictions, TLS encryption, security checklist | auth-and-acl |
Anti-Patterns
| Topic | Reference |
|---|---|
| KEYS in production, DEL on big keys, missing maxmemory, hot keys, unbounded collections, severity guide, detection commands | quick-reference |
Basics
| Topic | Reference |
|---|---|
| Strings, Hashes, Lists, Sets, Sorted Sets, Streams, Pub/Sub, HyperLogLog, Bitmaps, Geo | data-types |
| Transactions (MULTI/EXEC), Lua scripting (EVAL/FCALL), Server commands (INFO/SCAN/CONFIG), client management, monitoring | server-and-scripting |
More from avifenesh/valkey-skills
valkey-dev
Use when contributing to the Valkey server - C internals, event loop, commands, data structures, cluster, replication, RDB/AOF, memory, threading, modules, Lua, RESP, tests. Not for app development (valkey) or ops (valkey-ops).
5valkey-ops
Use when deploying, configuring, monitoring, or troubleshooting self-hosted Valkey. Covers Sentinel, cluster, persistence, replication, security, Kubernetes, performance tuning. Not for app development (valkey) or server internals (valkey-dev).
5valkey-ecosystem
Use when evaluating the Valkey ecosystem - client libraries, modules (JSON, Bloom, Search), managed services (AWS, GCP, Aiven), monitoring tools, frameworks (Spring, Django, Rails), Docker/Kubernetes deployment, CI/CD patterns, migration from Redis, and developer tooling.
5glide-mq
Use when building message queues with glide-mq. Covers queue setup, producer/consumer patterns, job scheduling, workflows, batch processing, streaming, and suspend/resume. Not for migrating from BullMQ (migrate-bullmq) or Bee-Queue (migrate-bee).
4valkey-glide
Router for Valkey GLIDE per-language skills. Use when you need to find the right language-specific GLIDE skill or migration skill. Not for GLIDE library internals or contributing to GLIDE source code - use glide-dev instead.
4migrate-go-redis
Use when migrating Go from go-redis to Valkey GLIDE. Covers Result[T] nil handling, CGO dependency, PubSub, SetWithOptions, Alpine/MUSL gotchas. Not for greenfield Go apps - use valkey-glide-go instead.
1