Skip to content

Commit 949f1cf

Browse files
authored
Merge pull request #2038 from redis/DOC-5647
RC: Add active-active throughput formula and examples
2 parents c2c4354 + 850bc6e commit 949f1cf

File tree

1 file changed

+130
-8
lines changed

1 file changed

+130
-8
lines changed

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

Lines changed: 130 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -139,15 +139,137 @@ By default, you're shown basic settings, which include:
139139
- **Throughput**: When you create an Active-Active database, you define the throughput for each instance. The total operations per second combines the total read ops/sec and applies the write ops/sec for each region across every region.
140140

141141
{{<image filename="images/rc/active-active-throughput-detail.png" width="75%" alt="When you create an Active-Active database, you define throughput for each region." >}}
142+
143+
The total ops/sec for each region is calculated as follows:
144+
145+
```sh
146+
Region ops/sec = Local read ops/sec +
147+
Sum of write ops/sec from all regions
148+
```
149+
150+
The total ops/sec for the database is the sum of the ops/sec for each region.
142151

143-
Because each instance needs the ability to write to every other instance, write operations significantly affect the total, as shown in the following table:
144-
145-
| Number of regions | Read operations | Write operations | Total operations |
146-
|:-----------------:|:---------------:|:----------------:|:----------------:|
147-
| Two | 1,000 each | 1,000 each | 6,000<br/>(2,000 reads; 4,000 writes) |
148-
| Two | 1,500 each | 1,000 each | 7,000<br/>(3,000 reads; 4,000 writes) |
149-
| Two | 1,000 each | 1,500 each | 8,000<br/>(2,000 reads; 6,000 writes) |
150-
| Three | 1,000 each | 1,000 each | 12,000<br/>(3,000 reads; 9,000 writes) |
152+
Because each instance needs the ability to write to every other instance, write operations significantly affect the total number of ops/sec.
153+
154+
Select a tab to see examples of throughput calculations for different Active-Active configurations.
155+
156+
{{< multitabs id="rc-aa-throughput-examples"
157+
tab1="Two regions, balanced between regions"
158+
tab2="Two regions, read/write heavy in one region"
159+
tab3="Three regions, balanced between regions"
160+
tab4="Three regions, different read/write in each region" >}}
161+
162+
For this database, we have two regions where read and write operations are balanced between the regions, as described in the table below:
163+
164+
| Region | Local read ops/sec | Local write ops/sec |
165+
|:------:|:------------------:|:-------------------:|
166+
| Region 1 | 2000 | 1000 |
167+
| Region 2 | 2000 | 1000 |
168+
169+
The total ops/sec for this database is calculated as follows:
170+
171+
```text
172+
Region 1 ops/sec = 2000 (local read) +
173+
1000 (local write) +
174+
1000 (write from Region 2) = 4000 ops/sec
175+
176+
Region 2 ops/sec = 2000 (local read) +
177+
1000 (local write) +
178+
1000 (write from Region 1) = 4000 ops/sec
179+
180+
Total ops/sec = 4000 (Region 1) + 4000 (Region 2)
181+
= 8000 ops/sec
182+
```
183+
184+
-tab-sep-
185+
186+
For this database, we have two regions where one region has more read and write operations than the other region, as described in the table below:
187+
188+
| Region | Local read ops/sec | Local write ops/sec |
189+
|:------:|:------------------:|:-------------------:|
190+
| Region 1 | 2000 | 1000 |
191+
| Region 2 | 4000 | 2000 |
192+
193+
The total ops/sec for this database is calculated as follows:
194+
195+
```text
196+
Region 1 ops/sec = 2000 (local read) +
197+
1000 (local write) +
198+
2000 (write from Region 2) = 5000 ops/sec
199+
200+
Region 2 ops/sec = 4000 (local read) +
201+
2000 (local write) +
202+
1000 (write from Region 1) = 7000 ops/sec
203+
204+
Total ops/sec = 5000 (Region 1) + 7000 (Region 2)
205+
= 12000 ops/sec
206+
```
207+
208+
-tab-sep-
209+
210+
For this database, we have three regions where read and write operations are balanced between the regions, as described in the table below:
211+
212+
| Region | Local read ops/sec | Local write ops/sec |
213+
|:------:|:------------------:|:-------------------:|
214+
| Region 1 | 2000 | 1000 |
215+
| Region 2 | 2000 | 1000 |
216+
| Region 3 | 2000 | 1000 |
217+
218+
The total ops/sec for this database is calculated as follows:
219+
220+
```text
221+
Region 1 ops/sec = 2000 (local read) +
222+
1000 (local write) +
223+
1000 (write from Region 2) +
224+
1000 (write from Region 3) = 5000 ops/sec
225+
226+
Region 2 ops/sec = 2000 (local read) +
227+
1000 (local write) +
228+
1000 (write from Region 1) +
229+
1000 (write from Region 3) = 5000 ops/sec
230+
231+
Region 3 ops/sec = 2000 (local read) +
232+
1000 (local write) +
233+
1000 (write from Region 1) +
234+
1000 (write from Region 2) = 5000 ops/sec
235+
236+
Total ops/sec = 5000 (Region 1) + 5000 (Region 2) + 5000 (Region 3)
237+
= 15000 ops/sec
238+
```
239+
240+
-tab-sep-
241+
242+
For this database, we have three regions where read and write operations are different between the regions, as described in the table below:
243+
244+
| Region | Local read ops/sec | Local write ops/sec |
245+
|:------:|:------------------:|:-------------------:|
246+
| Region 1 | 3000 | 1000 |
247+
| Region 2 | 4000 | 3000 |
248+
| Region 3 | 1000 | 2000 |
249+
250+
The total ops/sec for this database is calculated as follows:
251+
252+
```text
253+
Region 1 ops/sec = 3000 (local read) +
254+
1000 (local write) +
255+
3000 (write from Region 2) +
256+
2000 (write from Region 3) = 9000 ops/sec
257+
258+
Region 2 ops/sec = 4000 (local read) +
259+
3000 (local write) +
260+
1000 (write from Region 1) +
261+
2000 (write from Region 3) = 10000 ops/sec
262+
263+
Region 3 ops/sec = 1000 (local read) +
264+
2000 (local write) +
265+
1000 (write from Region 1) +
266+
3000 (write from Region 2) = 7000 ops/sec
267+
268+
Total ops/sec = 9000 (Region 1) + 10000 (Region 2) + 7000 (Region 3)
269+
= 26000 ops/sec
270+
```
271+
272+
{{< /multitabs >}}
151273

152274
For Search and query databases, the estimated throughput from the [Sizing calculator](https://redis.io/redisearch-sizing-calculator/) is the total amount of throughput you need. When setting throughput for your Active-Active database, use the total amount for each region and divide it depending on your read (query) and write (update) needs for each region. For example, if the total amount of throughput needed is 50000 ops/sec, you could set each region to have 20000 ops/sec for reads (queries) and 30000 ops/sec for writes (updates).
153275

0 commit comments

Comments
 (0)