Skip to content

Commit 5f9bfc6

Browse files
committed
DOC-3091 DOC-3752 RS: Fix terms in WAIT docs & mention WAITAOF
1 parent 359b551 commit 5f9bfc6

File tree

4 files changed

+47
-54
lines changed

4 files changed

+47
-54
lines changed
Lines changed: 23 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,56 @@
11
---
2-
Title: Use the WAIT command for strong consistency
2+
Title: Use the WAIT command to improve data safety and durability
33
alwaysopen: false
44
categories:
55
- docs
66
- operate
77
- rs
88
description: Use the wait command to take full advantage of Redis Enterprise Software's
9-
replication based durability.
9+
replication-based durability.
1010
linkTitle: WAIT command
1111
weight: $weight
1212
---
1313
Redis Enterprise Software comes with the ability to replicate data
1414
to another replica for high availability and persist in-memory data on
15-
disk permanently for durability. With the WAIT command, you can
15+
disk permanently for durability. With the [`WAIT`]({{<relref "/commands/wait">}}) command, you can
1616
control the consistency and durability guarantees for the replicated and
1717
persisted database.
1818

19-
Any updates that are issued to the database are typically performed with
20-
the following flow shown below;
19+
## Non-blocking Redis write operation
2120

22-
1. Application issues a write,
23-
1. Proxy communicates with the correct master "shard" in the system
24-
that contains the given key,
25-
1. The acknowledgment is sent to proxy once the write operation
26-
completes
21+
Any updates that are issued to the database are typically performed with the following flow:
22+
23+
1. Application issues a write.
24+
1. Proxy communicates with the correct primary shard in the system that contains the given key.
25+
1. The acknowledgment is sent to proxy after the write operation completes.
2726
1. The proxy sends the acknowledgment back to the application.
2827

29-
Independently, the write is communicated from master to replica and
30-
replication acknowledges the write back to the master. These are steps 5
31-
and 6.
28+
Independently, the write is communicated from the primary shard to the replica, and
29+
replication acknowledges the write back to the primary shard. These are steps 5 and 6.
3230

3331
Independently, the write to a replica is also persisted to disk and
3432
acknowledged within the replica. These are steps 7 and 8.
3533

3634
{{< image filename="/images/rs/weak-consistency.png" >}}
3735

38-
With the WAIT command, applications can ask to wait for
36+
## Blocking write operation on replication
37+
38+
With the `WAIT` command, applications can ask to wait for
3939
acknowledgments only after replication or persistence is confirmed on
40-
the replica. The flow of a write operation with the WAIT command is
41-
shown below:
42-
43-
1. Application issues a write,
44-
1. Proxy communicates with the correct master "shard" in the system
45-
that contains the given key,
46-
1. Replication communicated the update to the replica shard.
47-
1. Replica persists the update to disk (assuming AOF every write setting
48-
is selected).
49-
1. The acknowledgment is sent back from the replica all the way to the
50-
proxy with steps 5 to 8.
40+
the replica. The flow of a write operation with the WAIT command is:
41+
42+
1. The application issues a write,
43+
1. The proxy communicates with the correct primary shard in the system that contains the given key,
44+
1. Replication communicates the update to the replica shard.
45+
1. The replica persists the update to disk if the AOF every write setting is selected.
46+
1. The acknowledgment is sent back from the replica all the way to the proxy with steps 5 to 8.
5147

5248
With this flow, the application only gets the acknowledgment from the
5349
write after durability is achieved with replication to the replica and to
5450
the persistent storage.
5551

5652
{{< image filename="/images/rs/strong-consistency.png" >}}
5753

58-
With the WAIT command, applications can have a guarantee that even under
59-
a node failure or node restart, an acknowledged write is recorded.
54+
The `WAIT` command always returns the number of replicas that acknowledged the write commands sent by the current client before the `WAIT` command, both in the case where the specified number of replicas are reached, or when the timeout is reached. In Redis Enterprise Software, the number of replicas is always 1 for databases with high availability enabled.
6055

61-
See the WAIT command for details on the new durability and
62-
consistency options.
56+
See the [`WAITAOF`]({{<relref "/commands/waitaof">}}) command for details for enhanced data safety and durability capabilities introduced with Redis 7.2.

content/operate/rs/databases/durability-ha/consistency.md

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,50 +5,49 @@ categories:
55
- docs
66
- operate
77
- rs
8-
description: Explains the order write operations are communicated from app to proxy
9-
to shards for both the weak consistency model and the strong consistency model.
8+
description: Explains the order write operations are communicated from app to proxy to shards for both non-blocking Redis write operations and blocking write operations on replication.
109
linkTitle: Consistency
1110
weight: 20
1211
---
1312
Redis Enterprise Software comes with the ability to replicate data
1413
to another database instance for high availability and persist in-memory data on
15-
disk permanently for durability. With the WAIT command, you can
14+
disk permanently for durability. With the [`WAIT`]({{<relref "/commands/wait">}}) command, you can
1615
control the consistency and durability guarantees for the replicated and
1716
persisted database.
1817

19-
Any updates that are issued to the database are typically performed with
20-
the following flow shown below;
18+
## Non-blocking Redis write operation
2119

22-
1. Application issues a write
23-
2. Proxy communicates with the correct primary (also known as master) "shard" in the system that contains the given key
24-
3. The shard writes the data and sends an acknowledgment to the proxy
25-
4. The proxy sends the acknowledgment back to the application
26-
5. The write is communicated from master to replica
27-
6. Replica acknowledges the write back to the master
28-
7. The write to a replica is persisted to disk
29-
8. The write is acknowledged within the replica
20+
Any updates that are issued to the database are typically performed with the following flow:
21+
22+
1. The application issues a write.
23+
2. The proxy communicates with the correct primary (also known as master) shard in the system that contains the given key.
24+
3. The shard writes the data and sends an acknowledgment to the proxy.
25+
4. The proxy sends the acknowledgment back to the application.
26+
5. The write is communicated from the primary shard to the replica.
27+
6. The replica acknowledges the write back to the primary shard.
28+
7. The write to a replica is persisted to disk.
29+
8. The write is acknowledged within the replica.
3030

3131
{{< image filename="/images/rs/weak-consistency.png" >}}
3232

33-
With the WAIT command, applications can ask to wait for
33+
## Blocking write operation on replication
34+
35+
With the `WAIT` command, applications can ask to wait for
3436
acknowledgments only after replication or persistence is confirmed on
35-
the replica. The flow of a write operation with the WAIT command is
36-
shown below:
37+
the replica. The flow of a write operation with the `WAIT` command is:
3738

38-
1. Application issues a write,
39-
2. Proxy communicates with the correct master "shard" in the system that contains the given key,
40-
3. Replication communicated the update to the replica shard.
41-
4. Replica persists the update to disk (assuming AOF every write setting is selected).
42-
5-8. The acknowledgment is sent back from the replica all the way to the proxy with steps 5 to 8.
39+
1. The application issues a write.
40+
2. The proxy communicates with the correct primary shard in the system that contains the given key.
41+
3. Replication communicates the update to the replica shard.
42+
4. The replica persists the update to disk if the AOF every write setting is selected.
43+
5. The acknowledgment is sent back from the replica all the way to the proxy with steps 5 to 8.
4344

4445
With this flow, the application only gets the acknowledgment from the
4546
write after durability is achieved with replication to the replica and to
4647
the persistent storage.
4748

4849
{{< image filename="/images/rs/strong-consistency.png" >}}
4950

50-
With the WAIT command, applications can have a guarantee that even under
51-
a node failure or node restart, an acknowledged write is recorded.
51+
The `WAIT` command always returns the number of replicas that acknowledged the write commands sent by the current client before the `WAIT` command, both in the case where the specified number of replicas are reached, or when the timeout is reached. In Redis Enterprise Software, the number of replicas for HA enabled databases is always 1.
5252

53-
See the WAIT command for details on the new durability and
54-
consistency options.
53+
See the [`WAITAOF`]({{<relref "/commands/waitaof">}}) command for details for enhanced data safety and durability capabilities introduced with Redis 7.2.
25.4 KB
Loading
24.9 KB
Loading

0 commit comments

Comments
 (0)