Skip to content

Commit 344966f

Browse files
committed
RC Active-Active section
1 parent 07712e6 commit 344966f

File tree

8 files changed

+97
-105
lines changed

8 files changed

+97
-105
lines changed

config.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,15 @@ rdi_current_version = "1.15.0"
7171
"Rust-sync"={quickstartSlug="rust"}
7272
"Rust-async"={quickstartSlug="rust"}
7373

74-
75-
76-
# Mount directories
74+
# Mount directories for duplicate content
7775
[module]
7876
[[module.mounts]]
7977
source = "content"
8078
target = "content"
8179
[[module.mounts]]
8280
source = "content/operate/rs/databases/active-active/develop"
8381
target = "content/operate/rc/databases/active-active/develop"
82+
excludeFiles = ["_index.md"]
8483

8584
# Markup
8685
[markup]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
In the example below, database writes are concurrent at the points in
2+
time t1 and t2 and happen before a sync can communicate the changes.
3+
However, writes at times t4 and t6 are not concurrent as a sync happened
4+
in between.
5+
6+
| **Time** | **CRDB Instance1** | **CRDB Instance2** |
7+
| ------: | :------: | :------: |
8+
| t1 | SET key1 "a" | |
9+
| t2 | | SET key1 "b" |
10+
| t3 | — Sync — | — Sync — |
11+
| t4 | SET key1 "c" | |
12+
| t5 | — Sync — | — Sync — |
13+
| t6 | | SET key1 "d" |
Lines changed: 23 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,49 @@
11
---
2-
Title: Active-Active geo-distributed Redis
2+
Title: Active-Active Redis
33
alwaysopen: false
44
categories:
55
- docs
66
- operate
7-
- rs
8-
- kubernetes
9-
description: Overview of the Active-Active database in Redis Enterprise Software
7+
- rc
8+
description: Overview of the Active-Active feature for Redis Cloud.
9+
weight: 43
1010
hideListLinks: true
11-
linktitle: Active-Active
12-
weight: 40
11+
aliases:
12+
- /operate/rc/databases/configuration/active-active-redis/
1313
---
14-
In Redis Enterprise, Active-Active geo-distribution is based on [CRDT technology](https://en.wikipedia.org/wiki/Conflict-free_replicated_data_type).
15-
The Redis Enterprise implementation of CRDT is called an Active-Active database (formerly known as CRDB).
16-
With Active-Active databases, applications can read and write to the same data set from different geographical locations seamlessly and with latency less than one millisecond (ms),
17-
without changing the way the application connects to the database.
1814

19-
Active-Active databases also provide disaster recovery and accelerated data read-access for geographically distributed users.
15+
Active-Active databases store data across multiple regions and availability zones. This improves scalability, performance, and availability, especially when compared to standalone databases.
2016

17+
To create Active-Active databases, you need a Redis Cloud Pro subscription that enables Active-Active Redis and defines the regions for each copy of your databases. See [Create an Active-Active database]({{< relref "/operate/rc/databases/create-database/create-active-active-database" >}}) for instructions.
2118

22-
## High availability
19+
Active-Active databases are distributed across multiple regions (geo-distribution). This improves performance by reducing latency for nearby users and improves availability by protecting against data loss in case of network or resource failure.
2320

24-
The [high availability]({{< relref "/operate/rs/databases/durability-ha/" >}}) that Active-Active replication provides is built upon a number of Redis Enterprise Software features (such as [clustering]({{< relref "/operate/rs/databases/durability-ha/clustering.md" >}}), [replication]({{< relref "/operate/rs/databases/durability-ha/replication.md" >}}), and [replica HA]({{< relref "/operate/rs/databases/configure/replica-ha.md" >}})) as well as some features unique to Active-Active ([multi-primary replication]({{<relref "#multi-primary-replication/">}}), [automatic conflict resolution]({{<relref "#conflict-resolution/">}}), and [strong eventual consistency]({{<relref "#strong-eventual-consistency/">}})).
21+
Active-Active databases allow read and write operations in each copy. Each copy eventually reflects changes made in other copies ([eventual consistency]({{< relref "/glossary#eventual-consistency" >}})). Conflict-free data types (CRDTs) synchronize read and write operations between copies. CRDTs ensure consistency and resolve conflicts.
2522

26-
Clustering and replication are used together in Active-Active databases to distribute multiple copies of the dataset across multiple nodes and multiple clusters. As a result, a node or cluster is less likely to become a single point of failure. If a primary node or primary shard fails, a replica is automatically promoted to primary. To avoid having one node hold all copies of certain data, the [replica HA]({{< relref "/operate/rs/databases/configure/replica-ha.md" >}}) feature (enabled by default) automatically migrates replica shards to available nodes.
23+
Active-Active databases use TLS to synchronize data between regions. You can also use TLS to encrypt client connections. See [Transport Layer Security (TLS)]({{< relref "/operate/rc/security/database-security/tls-ssl.md" >}}) for more information.
2724

28-
## Multi-primary replication
29-
30-
In Redis Enterprise Software, replication copies data from primary shards to replica shards. Active-Active geo-distributed replication also copies both primary and replica shards to other clusters. Each Active-Active database needs to span at least two clusters; these are called participating clusters.
31-
32-
Each participating cluster hosts an instance of your database, and each instance has its own primary node. Having multiple primary nodes means you can connect to the proxy in any of your participating clusters. Connecting to the closest cluster geographically enables near-local latency. Multi-primary replication (previously referred to as multi-master replication) also means that your users still have access to the database if one of the participating clusters fails.
25+
When developing for Active-Active databases, you need to consider some important differences. See [Develop applications with Active-Active databases]({{< relref "/operate/rc/databases/active-active/develop/_index.md" >}}) for related information.
3326

3427
{{< note >}}
35-
Active-Active databases do not replicate the entire database, only the data.
36-
Database configurations, LUA scripts, and other support info are not replicated.
28+
Active-Active subscriptions on Redis Cloud are limited to a maximum of 10 regions and 10 databases.
3729
{{< /note >}}
3830

39-
## Syncer
40-
41-
Keeping multiple copies of the dataset consistent across multiple clusters is no small task. To achieve consistency between participating clusters, Redis Active-Active replication uses a process called the [syncer]({{< relref "/operate/rs/databases/active-active/syncer" >}}).
42-
43-
The syncer keeps a [replication backlog]({{< relref "/operate/rs/databases/active-active/manage#replication-backlog/" >}}), which stores changes to the dataset that the syncer sends to other participating clusters. The syncer uses partial syncs to keep replicas up to date with changes, or a full sync in the event a replica or primary is lost.
31+
## Active-Active geo-distributed replication highlights
4432

45-
## Conflict resolution
33+
### Multi-zone
4634

47-
Because you can connect to any participating cluster to perform a write operation, concurrent and conflicting writes are always possible. Conflict resolution is an important part of the Active-Active technology. Active-Active databases only use [conflict-free replicated data types (CRDTs)](https://en.wikipedia.org/wiki/Conflict-free_replicated_data_type). These data types provide a predictable conflict resolution and don't require any additional work from the application or client side.
35+
Geo-distributed replication maintains copies of both primary and replica shards in multiple clusters. These clusters can be spread across multiple availability zones. Active-Active Redis uses zone awareness to spread your primary and replica shards across zones, which helps protect against data loss from regional outages.
4836

49-
When developing with CRDTs for Active-Active databases, you need to consider some important differences. See [Develop applications with Active-Active databases]({{< relref "/operate/rs/databases/active-active/develop/_index.md" >}}) for related information.
37+
### Local latency with unique endpoints
5038

39+
Applications can connect to a specific copy of an Active-Active database using its unique endpoint. For local latency, configure your application to use a database endpoint in the closest region.
5140

52-
## Strong eventual consistency
41+
### Conflict resolution
5342

54-
Maintaining strong consistency for replicated databases comes with tradeoffs in scalability and availability. Redis Active-Active databases use a strong eventual consistency model, which means that local values may differ across replicas for short periods of time, but they all eventually converge to one consistent state. Redis uses vector clocks and the CRDT conflict resolution to strengthen consistency between replicas. You can also enable the causal consistency feature to preserve the order of operations as they are synchronized among replicas.
43+
Active-Active databases use special data types called conflict-free data types (CRDT). These automatically resolve conflicts that occur when writes are made to different clusters at the same time.
5544

56-
Other Redis Enterprise Software features can also be used to enhance the performance, scalability, or durability of your Active-Active database. These include [data persistence]({{< relref "/operate/rs/databases/configure/database-persistence.md" >}}), [multiple active proxies]({{< relref "/operate/rs/databases/configure/proxy-policy.md" >}}), [distributed synchronization]({{< relref "/operate/rs/databases/active-active/synchronization-mode.md" >}}), [OSS Cluster API]({{< relref "/operate/rs/databases/configure/oss-cluster-api.md" >}}), and [rack-zone awareness]({{< relref "/operate/rs/clusters/configure/rack-zone-awareness.md" >}}).
45+
### Failover handling
5746

58-
## Next steps
47+
After a failure at the process, node, or zone level, Active-Active databases automatically promote replica shards to replace failed primaries, copy data to new replica shards, and migrate shards to new nodes as needed. This reduces downtime and makes the most of your computing resources, even in the event of a failure.
5948

60-
- [Plan your Active-Active deployment]({{< relref "/operate/rs/databases/active-active/planning.md" >}})
61-
- [Get started with Active-Active]({{< relref "/operate/rs/databases/active-active/get-started.md" >}})
62-
- [Create an Active-Active database]({{< relref "/operate/rs/databases/active-active/create.md" >}})
49+
Active-Active also provides a failover opportunity in case an entire cluster fails. Applications should redirect traffic to another cluster in the Active-Active deployment if a connected cluster fails. After the original cluster recovers, applications can direct traffic back to the original cluster. Redirecting traffic to alternate clusters is not handled automatically by Active-Active, so you must add redirection logic to the application. However, data automatically syncs to a recovered cluster when it returns to a healthy state.

content/operate/rc/databases/create-database/create-active-active-database.md renamed to content/operate/rc/databases/active-active/create-active-active-database.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ linkTitle: Create Active-Active database
1010
weight: 20
1111
aliases:
1212
- /operate/rc/subscriptions/create-active-active-subscription
13+
- /operate/rc/databases/create-database/create-active-active-database
1314
---
1415

15-
Active-Active databases store data across multiple regions and availability zones. This improves scalability, performance, and availability, especially when compared to standalone databases. See [Active-Active Redis]({{< relref "/operate/rc/databases/configuration/active-active-redis" >}}) for more information.
16+
Active-Active databases store data across multiple regions and availability zones. This improves scalability, performance, and availability, especially when compared to standalone databases. See [Active-Active Redis]({{< relref "/operate/rc/databases/active-active" >}}) for more information.
1617

1718
To deploy Active-Active databases in Redis Cloud, you need a Redis Cloud Pro plan that enables Active-Active Redis and defines the regions for each copy of your databases.
1819

@@ -319,8 +320,8 @@ Use the **Database list** to check the status of your databases.
319320
## More info
320321

321322
- [Create a Pro database with a new subscription]({{< relref "/operate/rc/databases/create-database/create-pro-database-new" >}})
322-
- [Active-Active Redis]({{< relref "/operate/rc/databases/configuration/active-active-redis" >}})
323-
- [Develop applications with Active-Active databases]({{< relref "/operate/rs/databases/active-active/develop/_index.md" >}})
323+
- [Active-Active Redis]({{< relref "/operate/rc/databases/active-active" >}})
324+
- [Develop applications with Active-Active databases]({{< relref "/operate/rc/databases/active-active/develop/_index.md" >}})
324325
- Database [memory limit]({{< relref "/operate/rc/databases/configuration/sizing#dataset-size" >}})
325326
- Redis Cloud [subscription plans]({{< relref "/operate/rc/subscriptions/" >}})
326327
- [Redis Cloud pricing](https://redis.io/pricing/#monthly)
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
Title: Active-Active Redis applications
3+
alwaysopen: false
4+
categories:
5+
- docs
6+
- operate
7+
- rc
8+
description: General information to keep in mind while developing applications for
9+
an Active-Active database.
10+
hideListLinks: true
11+
linktitle: Develop applications
12+
weight: 99
13+
note: The rest of the content in this folder is mounted from content/operate/rs/databases/active-active/develop. If you need to make a change in the pages in this folder, make it in the RS folder.
14+
---
15+
Developing globally distributed applications can be challenging, as
16+
developers have to think about race conditions and complex combinations
17+
of events under geo-failovers and cross-region write conflicts. In Redis Cloud, Active-Active databases
18+
simplify developing such applications by directly using built-in smarts
19+
for handling conflicting writes based on the data type in use. Instead
20+
of depending on just simplistic "last-writer-wins" type conflict
21+
resolution, geo-distributed Active-Active databases combine techniques defined in CRDT
22+
(conflict-free replicated data types) research with Redis types to
23+
provide smart and automatic conflict resolution based on the data type's
24+
intent.
25+
26+
An Active-Active database is a globally distributed database that spans multiple cloud provider regions. Each Active-Active database can have many Active-Active database instances
27+
that come with added smarts for handling globally distributed writes
28+
using the proven
29+
[CRDT](https://en.wikipedia.org/wiki/Conflict-free_replicated_data_type)
30+
approach.
31+
[CRDT](https://en.wikipedia.org/wiki/Conflict-free_replicated_data_type)
32+
research describes a set of techniques for creating systems that can
33+
handle conflicting writes. CRDBs powered by Multi-Master Replication
34+
(MMR) provide a straightforward and effective way to replicate your
35+
data between regions and simplify development of complex applications
36+
that can maintain correctness under geo-failovers and concurrent
37+
cross-region writes to the same data.
38+
39+
{{< image filename="/images/rs/crdbs.png" alt="Geo-replication world map">}}
40+
41+
Active-Active databases replicate data between multiple Redis Cloud provider regions. Common uses for Active-Active databases include disaster recovery,
42+
geographically redundant applications, and keeping data closer to your
43+
users' locations. MMR is always multi-directional amongst the regions
44+
configured in the Active-Active database. For unidirectional replication, see [Active-Passive replication]({{< relref "/operate/rc/databases/migrate-databases#sync-using-active-passive" >}}).
45+
46+
## Example of synchronization
47+
48+
{{< embedmd "content/embeds/rc-rs-aa-synchronization.md" >}}
49+
50+
[Learn more about
51+
synchronization for
52+
each supported data type]({{< relref "content/operate/rc/databases/active-active/develop/data-types/" >}}) and [how to develop applications]({{< relref "content/operate/rc/databases/active-active/develop/develop-for-aa.md" >}}) with them on Redis Cloud.

content/operate/rc/databases/configuration/active-active-redis.md

Lines changed: 0 additions & 46 deletions
This file was deleted.

content/operate/rc/databases/import-data.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ You can import an existing dataset into your Redis Cloud instance from an existi
1414
{{< warning >}}
1515
Data imported into an existing database overwrites existing data.
1616
- If you import a dataset into the target database of an [Active-Passive setup]({{< relref "/operate/rc/databases/migrate-databases#sync-using-active-passive" >}}), the dataset will be overwritten by any changes to the source database.
17-
- If you import a dataset into one region in an [Active-Active database]({{< relref "/operate/rc/databases/configuration/active-active-redis" >}}), the dataset will also be replicated across regions.
17+
- If you import a dataset into one region in an [Active-Active database]({{< relref "/operate/rc/databases/active-active/" >}}), the dataset will also be replicated across regions.
1818
{{< /warning >}}
1919
<br/>
2020
{{< note >}}

0 commit comments

Comments
 (0)