Redis Glossary
Redis Glossary
A comprehensive guide to the terminology used in Redis, with a focus on persistence, clustering, caching, streams, modules, and data structures.
A
ACID
An acronym for Atomicity, Consistency, Isolation, and Durability. These are the properties that guarantee database transactions are processed reliably. While Redis is primarily an in-memory store, it offers ACID compliance through features like Transactions and Persistence.
AOF (Append Only File)
A persistence mode that logs every write operation received by the server. These operations can then be replayed again at server startup, reconstructing the original dataset. AOF is more durable than RDB but can result in larger file sizes.
AOF Rewrite
An optimization process where Redis creates a new AOF file by reading the current data in memory, rather than re-reading the old AOF file. This compacts the log by removing redundant commands (e.g., multiple INCR commands become a single SET).
ASK Redirection
A temporary redirection error returned by a Redis Cluster node when a client requests a key that is currently being migrated to another node. The client should retry the request on the target node but not update its local slot map.
B
BGSAVE
A command that initiates a background save process. Redis forks a child process that writes the RDB file to disk while the parent process continues to serve clients. This is the standard way to create snapshots without blocking the server.
Bloom Filter
A probabilistic data structure that tests whether an element is a member of a set. It can tell you if an element is definitely not in the set or maybe in the set, but never false negatives.
C
Cache Aside
A caching pattern where the application code maintains the cache. It first checks the cache; if data is missing, it fetches from the database and updates the cache.
Cache Stampede
A situation where many concurrent requests try to fetch the same data from the database simultaneously because the cache entry has expired.
Client-Side Caching
A technique where Redis data is cached in the application’s local memory to avoid network latency. Redis 6+ supports server-assisted client-side caching to handle invalidation.
Cluster Bus
A separate binary protocol (port 16379 by default) used by Redis Cluster nodes to communicate with each other. It carries gossip messages, failure detection signals, and configuration updates.
Configuration Epoch
A version number (similar to a Raft term) used to resolve conflicts when multiple nodes claim to be the master of a shard.
Consumer Group
A logical group of consumers that cooperate to consume data from a Stream. Redis guarantees that each message is delivered to only one consumer in the group, enabling horizontal scaling of message processing.
COW (Copy-On-Write)
An optimization strategy used by the operating system during fork(). When a process forks, the parent and child share the same physical memory pages. A page is only duplicated (copied) when one of the processes tries to write to it. This allows for fast snapshots but can cause memory usage to spike if the dataset is heavily modified during a snapshot.
CQRS (Command Query Responsibility Segregation)
An architectural pattern where read (Query) and write (Command) operations are separated. Redis Streams are often used as the “Command” log, while other data structures (like Sorted Sets or Hashes) serve as the “Query” views.
CRC16
The hashing algorithm used to map keys to Hash Slots. Slot = CRC16(Key) % 16384.
Cypher
A declarative graph query language used by RedisGraph. It allows for expressive and efficient querying of graph data.
E
Event Sourcing
A design pattern where state changes are stored as a sequence of events. Instead of storing just the current state, you store all the events that led to it. Redis Streams is an ideal storage engine for Event Sourcing.
Eviction
The process of removing items from the cache to make space for new data when the memory limit is reached.
Expiration
The automatic removal of a key after a specified Time To Live (TTL).
F
FAIL
A state reached when a majority of masters agree that a node is PFAIL. This triggers the failover process.
Fork
A Unix system call used by Redis to create a child process for background tasks like RDB snapshotting or AOF rewriting. The child process is an exact copy of the parent at the moment of creation.
fsync
A system call that flushes data from the OS buffer cache to the physical disk. Redis uses fsync to ensure data durability in AOF mode. The frequency of fsync calls (always, everysec, no) determines the trade-off between performance and data safety.
G
Gossip Protocol
A peer-to-peer communication mechanism where nodes randomly exchange state information (PING/PONG) to eventually propagate cluster state to all members.
H
Hash Slot
The unit of data partitioning in Redis Cluster. There are exactly 16,384 hash slots. Every key belongs to one slot, and every slot is assigned to one master node.
Hash Tag
A substring within a key enclosed in braces {}. If present, only the content inside the braces is hashed, allowing users to force multiple keys into the same hash slot (e.g., {user:100}:profile and {user:100}:orders).
Hybrid Persistence
A feature introduced in Redis 4.0 that combines RDB and AOF. The AOF file starts with an RDB snapshot of the current data (fast loading) and continues with AOF logs for subsequent writes (durability).
HyperLogLog
A probabilistic data structure used to estimate the cardinality (number of unique elements) of a set with very small memory usage.
I
Invalidation
The process of marking a cache entry as stale or removing it. In Client-Side Caching, the server sends invalidation messages to clients when a tracked key is modified.
Inverted Index
A data structure used by RediSearch to map content (like words in a document) to its location in the database (the document ID). This enables fast full-text search.
L
LFU (Least Frequently Used)
An eviction algorithm that removes the item that has been accessed the fewest times. Good for stable access patterns.
LRU (Least Recently Used)
An eviction algorithm that removes the item that has not been accessed for the longest time. Good for recency-based access patterns.
M
Master Node
A node that holds a subset of hash slots and accepts read/write operations.
Master-Replica Replication
A topology where one node (Master) handles writes and replicates data to one or more other nodes (Replicas) for read scalability and high availability.
Maxmemory
A configuration directive in Redis that sets the maximum amount of memory the instance can use.
Memory Fragmentation
The ratio between the memory allocated by the operating system (RSS) and the memory actually used by Redis. High fragmentation means wasted memory.
Module
A dynamic library that can be loaded into Redis to extend its functionality with new data types and commands (e.g., RedisJSON, RediSearch).
MOVED Redirection
A permanent redirection error returned when a client requests a key from a node that does not own the corresponding hash slot. Clients should update their internal slot map upon receiving this error.
P
Partitioning
The process of splitting data across multiple Redis instances. Also known as Sharding.
PEL (Pending Entries List)
A data structure within a Consumer Group that tracks messages that have been delivered to a consumer but not yet acknowledged (XACK). This ensures reliable delivery even if a consumer crashes.
Persistence
The ability of a system to store data durably so that it survives a restart or power failure. Redis supports RDB, AOF, and Hybrid persistence.
PFAIL (Possible Fail)
A flag set by a node when it cannot reach another node for longer than the node-timeout. It is a local view of failure.
Pipeline
A technique to send multiple commands to the server without waiting for the replies, and then reading the replies in a single step.
Pub/Sub
A messaging pattern where senders (publishers) send messages to channels, without knowing who will receive them. Receivers (subscribers) listen to channels. In Redis, Pub/Sub is “fire-and-forget” (no persistence).
R
Radix Tree (Rax)
The underlying data structure used by Redis Streams to store IDs and messages efficiently. It is a space-optimized trie (prefix tree).
RDB (Redis Database)
A persistence mode that creates point-in-time snapshots of the dataset at specified intervals. RDB files are compact and perfect for backups but allow for some data loss in case of failure (data since the last snapshot).
RediSearch
A Redis module that provides full-text search, indexing, and aggregation capabilities.
RedisGraph
A Redis module that adds a graph database functionality, using sparse matrices and the Cypher query language.
RedisJSON
A Redis module that implements the JSON data interchange standard as a native data type, allowing for storing, updating, and fetching JSON values.
Replica Node
A standby node that replicates data from a Master. It can be promoted to Master if the original Master fails.
Replication
A process where data from a master Redis instance is copied to one or more replica instances. This provides high availability and read scalability.
Resharding
The process of moving hash slots from one node to another to balance the load or add/remove nodes.
RESP3
Redis Serialization Protocol version 3. It supports out-of-band data push, which is essential for server-assisted client-side caching invalidation messages.
S
SAVE
A command that performs a synchronous save of the dataset to an RDB file. Unlike BGSAVE, SAVE blocks all other client connections until the file is written. It should rarely be used in production.
Sentinel
A system designed to help manage Redis instances. It performs monitoring, notification, and automatic failover.
Sharding
See Partitioning.
Sparse Matrix
A matrix in which most of the elements are zero. RedisGraph uses sparse matrices to efficiently represent and traverse graph data.
Split Brain
A scenario where a network partition causes the cluster to divide into two or more independent sub-clusters, potentially leading to data inconsistency.
Stream
A persistent, append-only data structure in Redis that stores a sequence of messages. Each message has a unique ID and one or more field-value pairs.
T
Thundering Herd
Similar to Cache Stampede, occurring when a popular cache item expires, causing a spike in database load.
Transaction
A way to execute a group of commands as a single isolated step.
TTL (Time To Live)
The duration for which a key should remain in the cache before it expires.
V
Vector Search
A search method supported by RediSearch that finds similar items based on their mathematical vector representation, commonly used in AI/ML for semantic search.
W
Write Amplification
A phenomenon where the physical data written to storage is greater than the logical data written by the application. In Redis AOF, this can happen if the rewrite process is not efficient or if fsync is called very frequently.
Write-Behind (Write-Back)
A caching pattern where data is written to the cache first and then asynchronously updated in the database. Offers high write performance but risks data loss.
Write-Through
A caching pattern where data is written to the cache and the database synchronously. Ensures strong consistency.
X
XACK
The command used by a consumer to acknowledge that a message has been successfully processed. This removes the message from the Pending Entries List (PEL).
XADD
The command to append a new message to a Stream.
XCLAIM
The command used to take ownership of a pending message from another consumer. This is critical for recovering from consumer failures.
XREADGROUP
The command used by a consumer in a group to read new or pending messages from a Stream.