content/operate/rs/7.22/databases/durability-ha/consistency.md
Redis Enterprise Software comes with the ability to replicate data
to another database instance for high availability and persist in-memory data on
disk permanently for durability. With the [WAIT]({{<relref "/commands/wait">}}) command, you can
control the consistency and durability guarantees for the replicated and
persisted database.
Any updates that are issued to the database are typically performed with the following flow:
{{< image filename="/images/rs/weak-consistency.png" >}}
With the [WAIT]({{<relref "/commands/wait">}}) or [WAITAOF]({{<relref "/commands/waitaof">}}) commands, applications can ask to wait for
acknowledgments only after replication or persistence is confirmed on
the replica. The flow of a write operation with WAIT or WAITAOF is:
WAITAOF and the AOF every write setting, the replica persists the update to disk before sending the acknowledgment.The application only gets the acknowledgment from the write after durability is achieved with replication to the replica for WAIT or WAITAOF and to the persistent storage for WAITAOF only.
{{< image filename="/images/rs/strong-consistency.png" >}}
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.
See the [WAITAOF]({{<relref "/commands/waitaof">}}) command for details for enhanced data safety and durability capabilities introduced with Redis 7.2.