Redis 8.0-M03 RDB Channel Replication Feature Overview and Implementation Guide
Redis 8.0-M03 adds an RDB channel replication feature that parallelizes RDB file transfer with write command streaming, reducing master node memory pressure and CPU load while improving full‑sync performance through a dedicated connection and configurable buffer limits.
Redis 8.0-M03 introduces the **RDB channel replication** feature, which allows the master node to send the RDB snapshot over a separate dedicated connection while simultaneously streaming incoming write commands to the replica.
Motivation : During a full synchronization, write commands are temporarily stored in the replication buffer on the master while the RDB file is transferred. If the transfer takes too long, this can cause memory pressure on the master and may exceed the replica's output‑buffer limits, leading to disconnections.
Advantages : By opening an additional connection for the RDB file, the buffering work is shifted to the replica, reducing the master’s CPU load and eliminating costly socket read/write system calls. The bgsave process can stream the RDB file directly to the replica, making the transfer faster.
Implementation steps :
When a replica connects, it sends rdb-channel-repl to indicate support for the RDB channel.
If the replica lacks sufficient data for PSYNC, the master replies with +RDBCHANNELSYNC <client-id> and the replica opens a new RDB channel connection.
The master attaches the replica’s main channel to the replication replay log before forking, then the bgsave process streams the RDB file over the RDB channel while the main channel continues to send the replication stream.
After the replica finishes loading the RDB file, it closes the RDB channel and applies the accumulated replication stream.
Configuration details :
The feature is only active when repl-diskless-sync is enabled.
Replica buffer limits are controlled by replica-full-sync-buffer-limit ; if unset, the replica inherits the hard limit from <replica> client-output-buffer-limit .
A hidden configuration repl-rdb-channel toggles the feature for testing and compatibility.
API changes :
INFO output now shows a new replica state send_bulk_and_stream , indicating that both the RDB file and replication stream are being sent in parallel.
Client list entries for RDB‑channel replicas include an additional C flag alongside the existing S flag.
Example INFO entry:
slave0:ip=127.0.0.1,port=5002,state=send_bulk_and_stream,offset=0,lag=0Replica buffer metrics:
replica_full_sync_buffer_size:20485 replica_full_sync_buffer_peak:1048560Example client‑list line for an RDB‑channel replica:
id=11 addr=127.0.0.1:39108 laddr=127.0.0.1:5001 fd=14 name= age=5 idle=5 flags=SC db=0 sub=0 psub=0 ssub=0 multi=-1 watch=0 qbuf=0 qbuf-free=0 argv-mem=0 multi-mem=0 rbs=1024 rbp=0 obl=0 oll=0 omem=0 tot-mem=1920 events=r cmd=psync user=default redir=-1 resp=2 lib-name= lib-ver= io-thread=0For full implementation details, see the pull request: https://github.com/redis/redis/pull/13732 .
Cognitive Technology Team
Cognitive Technology Team regularly delivers the latest IT news, original content, programming tutorials and experience sharing, with daily perks awaiting you.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.