You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: stage_descriptions/replication-06-eh4.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,14 @@
1
1
In this stage, you'll implement the second step of the replication handshake.
2
2
3
-
### The Handshake Process (Recap)
3
+
### Handshake (Recap)
4
4
5
-
As a recap, there are three steps to the handshake process:
5
+
As a recap, there are three steps to the handshake:
6
6
7
7
1. The replica sends a `PING` to the master (Handled in the previous stage)
8
8
2. The replica sends `REPLCONF` twice to the master
9
9
3. The replica sends `PSYNC` to the master
10
10
11
-
For this stage, you'll handle the second part of this process.
11
+
For this stage, you'll handle the second step of this process.
12
12
13
13
### The `REPLCONF` Command
14
14
@@ -17,7 +17,7 @@ The `REPLCONF` command is used to configure a connected replica. After receiving
17
17
1.`REPLCONF listening-port <PORT>`: This tells the master which port the replica is listening on. This value is used for [monitoring and logging](https://github.com/redis/redis/blob/90178712f6eccf1e5b61daa677c5c103114bda3a/src/replication.c#L107-L130), not for replication itself.
18
18
2.`REPLCONF capa psync2`: This notifies the master of the replica's capabilities.
19
19
-`capa` stands for "capabilities". It indicates that the next argument is a feature the replica supports.
20
-
-`psync2` signals that the replica supports the PSYNC 2.0 protocol, which is an improved version of the [partial synchronization](https://redis.io/docs/latest/operate/oss_and_stack/management/replication/) feature used to resynchronize a replica with its master.
20
+
-`psync2` signals that the replica supports the PSYNC2 protocol. PSYNC2 is an improved version of the [partial synchronization](https://redis.io/docs/latest/operate/oss_and_stack/management/replication/) feature used to resynchronize a replica with its master.
21
21
- You can safely hardcode `capa psync2` for now.
22
22
23
23
Both commands should be sent as RESP arrays, so the exact bytes will look something like this:
0 commit comments