28 articles
Knowledge Base
Redis
28 articles in the Redis category · page 1 of 2.
- Why MONITOR ruins production — and what to use instead Understand why redis-cli MONITOR degrades a busy Redis to a crawl, when it is safe to use, and which tools (slowlog, latency, INFO commandstats) belong in your toolkit instead.
- Redis Sentinel deep dive — automatic failover end to end How Sentinel detects master failure, runs leader election, promotes a replica, reconfigures the topology, and notifies clients — with the timing knobs that actually matter.
- Setting up Redis Cluster mode with sharding and replication Bootstrap a six-node Redis Cluster, understand the 16384 hash-slot model, configure replicas per master, and verify cluster health before any traffic is routed.
- Redis ACLs — users, roles, and least-privilege access control Replace the legacy requirepass with Redis 6+ ACLs: named users, command categories, key patterns, channel scopes, and persistence with aclfile.
- Installing Redis on Ubuntu with persistence and authentication Install Redis 7 on Ubuntu, choose between apt and source builds, configure password auth and bind interfaces, and verify with redis-cli before going live.
- Redis Lua scripting with EVAL and EVALSHA Write atomic Lua scripts for Redis, load with EVAL/SCRIPT LOAD, pass KEYS and ARGV correctly, and avoid the blocking and replication pitfalls in production.
- Testing Redis Sentinel failover without breaking production Build a regular failover-drill routine for Sentinel-managed Redis: planned failover, kill-the-master tests, client-side validation, and the metrics to watch.
- Redis Functions — server-side libraries that replace EVAL scripting Use Redis 7 Functions to register named libraries of Lua functions that persist across restarts, replicate cleanly, and replace the EVALSHA reload dance.
- Tuning Redis replication — buffers, backlog, and partial sync Size the replication backlog, tune client-output-buffer-limit replica, understand PSYNC vs FULLSYNC, and avoid the cascade of full resyncs on a saturated link.
- RedisGraph — what it did, why it was deprecated, and migration paths Understand RedisGraph (the property-graph module), its Cypher-compatible query model, why Redis Inc. ended support in 2023, and how to migrate to a supported graph database.
- Redis Pub/Sub vs Streams — choosing between fire-and-forget and durable logs Compare Redis Pub/Sub against Streams: delivery semantics, durability, backpressure, consumer-group support, and the use cases each mode actually fits.
- Deploying Redis 7 with Sentinel for automatic failover on Ubuntu 22.04 Stand up a hardened Redis 7 cluster with 1 primary + 2 replicas + 3 Sentinels on Ubuntu 22.04 — AOF persistence, ACL, TLS, automatic failover under quorum.
- Redis Stack — what is bundled and when to choose it over OSS Redis Understand Redis Stack: the modules bundled (RedisJSON, RediSearch, TimeSeries, Bloom), licensing, install paths, and the operational difference vs OSS Redis.
- Redis eviction policies — choosing between LRU, LFU, TTL and noeviction Compare allkeys-lru, allkeys-lfu, volatile-lru, volatile-ttl, and noeviction with the workload signatures each fits and the failure modes when the wrong one is chosen.
- Redis persistence — RDB vs AOF tradeoffs Compare RDB snapshots and AOF append-only logs: durability, recovery time, file size, write amplification, and the combined mode most production deployments use.
- Redis persistence — RDB and AOF, configured for the workload Understand RDB snapshots vs AOF append-only files, the durability trade-offs, the fsync policies, and the production combination that gets you both fast restore and minimal data loss.
- Redis Sentinel — high availability for single-shard Redis Configure a three-node Sentinel deployment that monitors a primary-replica Redis pair, performs automatic failover, and lets clients discover the current primary.
- Redis memory tuning — sizing maxmemory, fragmentation, and overhead Size maxmemory correctly by accounting for COW, TLS buffers, replication overhead and fragmentation; read INFO memory; tune jemalloc and active defrag.
- Redis TLS encryption for client and replication traffic Issue certificates, configure tls-port and tls-cert-file, enable replication and cluster bus TLS, and connect clients with redis-cli --tls and a CA bundle.
- Debugging the BUSY error from a long-running Redis Lua script Diagnose and recover from BUSY Redis is busy running a script: SCRIPT KILL, SHUTDOWN NOSAVE, busy-script-timeout, and the patterns that prevent recurrence.
- Redis key expiration patterns — TTL, EXPIREAT, lazy vs active expiration Set TTLs with EXPIRE and EXPIREAT, understand lazy vs active expiration, watch expired_keys, and avoid the patterns that produce phantom memory growth.
- Redis Streams with XADD and XREAD for append-only event logs Use Redis Streams as a durable event log with XADD, XREAD, XREADGROUP, and consumer groups; understand IDs, trimming, acknowledgment, and pending entries.
- RediSearch for secondary indexes and full-text search inside Redis Define FT indexes over Hashes and JSON, query with full-text and numeric filters, and tune for write-rate vs query latency in a Redis Stack deployment.
- RedisJSON for native JSON documents inside Redis Store, query, and atomically update JSON documents in Redis with the JSON module — JSONPath, partial updates, memory tradeoffs, and indexing with RediSearch.