Redis / Cache
32 notes
Some notes are currently available only in Chinese. English translations are shown when available.
- 3.2 Redis Concurrency Competitionhistorical
Two clients reading and updating the same value can race. These notes use concurrent price increments to examine unexpected update results.
- 3.3 Redis Slow Querieshistorical
Redis requests pass through sending, queuing, execution, and response stages. These notes distinguish their costs and the execution time tracked by slow queries.
- 3.4 Redis Blockinghistorical
Redis is blocked when it cannot respond to clients for an extended period. These notes examine blocking operations and troubleshooting through its command-execution thread.
- 3.5 Redis bigkeyhistorical
Big keys concern Redis values that occupy substantial space. These notes record identification methods and thresholds by data type.
- 3.6 Redis hotkeyhistorical
A single key can create a hotspot when its requests concentrate on one Redis instance. These notes examine hot-key detection and handling through QPS.
- 4.1 Redis Clusterhistorical
Redis Cluster distributes data to scale writes and uses replicas for failure handling. These notes introduce cluster structure through the limits of replication alone.
- 4.2 Redis Sentinelhistorical
Leader-follower replication alone does not perform automatic failover. Redis Sentinel monitors and coordinates switching to provide high availability.
- 4.3 Redis Replicationhistorical
Redis replication copies data to other machines. These notes use that foundation to connect leader-follower replication with high-availability mechanisms.
- 5.1 Redis Key Expiration Strategyhistorical
Setting a Redis key's expiry also raises the question of when data is actually removed. These notes examine expiry handling starting with the expire command.
- 5.2 Redis Memory Managementhistorical
Redis memory usage can be divided into process overhead, objects, and buffers. These notes organize observation and analysis around those components.