@@ -15,155 +15,12 @@ summary: Redis Data Integration keeps Redis in sync with the primary database in
1515type : integration
1616weight : 5
1717---
18+ ``` decision-tree
19+ ```
1820
1921RDI is designed to support apps that must use a disk based database as the system of record
2022but must also be fast and scalable. This is a common requirement for mobile and web
2123apps with a rapidly-growing number of users; the performance of the main database is fine at first
2224but it will soon struggle to handle the increasing demand without a cache.
2325
24- ## When to use RDI
25-
26- You should use RDI when:
27-
28- - You must use a slow database as the system of record for the app.
29- - The app must always * write* its data to the slow database.
30- - You already intend to use Redis for the app cache.
31- - The data changes frequently in small increments.
32- - Your app can tolerate * eventual* consistency of data in the Redis cache.
33- - RDI throughput during
34- [ full sync] ({{< relref "/integrate/redis-data-integration/data-pipelines#pipeline-lifecycle" >}}) would not exceed 30K records per second and during
35- [ CDC] ({{< relref "/integrate/redis-data-integration/data-pipelines#pipeline-lifecycle" >}})
36- would not exceed 10K records per second.
37-
38- ## When not to use RDI
39-
40- You should * not* use RDI when:
41-
42- - You are migrating an existing data set into Redis only once.
43- - Your app needs * immediate* cache consistency rather than * eventual* consistency.
44- - The data is ingested from two replicas of Active-Active at the same time.
45- - The app must * write* data to the Redis cache, which then updates the source database.
46- - Your data set will only ever be small.
47- - Your data is updated by some batch or ETL process with long and large transactions - RDI will fail
48- processing these changes.
49-
50- ## Decision tree for using RDI
51-
52- Use the decision tree below to determine whether RDI is a good fit for your architecture:
53-
54- ``` decision-tree {id="when-to-use-rdi"}
55- id: when-to-use-rdi
56- scope: rdi
57- rootQuestion: systemOfRecord
58- questions:
59- systemOfRecord:
60- text: |
61- Does your app require a disk-based database as the system of record?
62- whyAsk: |
63- RDI is designed to keep Redis in sync with a primary database. If you don't need a primary database, RDI is not necessary.
64- answers:
65- yes:
66- value: "Yes"
67- nextQuestion: writeLocation
68- no:
69- value: "No"
70- outcome:
71- label: "RDI is not necessary for your use case"
72- id: notNecessary
73- sentiment: "negative"
74- writeLocation:
75- text: |
76- Does your app write data directly to the disk-based database?
77- whyAsk: |
78- RDI requires the primary database to be the system of record. If your app writes to Redis first, RDI won't work.
79- answers:
80- yes:
81- value: "Yes"
82- nextQuestion: consistency
83- no:
84- value: "No"
85- outcome:
86- label: "RDI won't work - your app must write to the primary database"
87- id: wrongWritePattern
88- sentiment: "negative"
89- consistency:
90- text: |
91- Can your app tolerate eventual consistency in the Redis cache?
92- whyAsk: |
93- RDI provides eventual consistency, not immediate consistency. If your app needs real-time cache consistency, RDI is not suitable.
94- answers:
95- yes:
96- value: "Yes"
97- nextQuestion: throughput
98- no:
99- value: "No"
100- outcome:
101- label: "RDI is not suitable - you need immediate cache consistency"
102- id: needsImmediate
103- sentiment: "negative"
104- throughput:
105- text: |
106- Will your throughput stay within RDI limits (≤30K records/sec during full sync, ≤10K records/sec during CDC)?
107- whyAsk: |
108- RDI has throughput limits. Exceeding these limits will cause processing failures and data loss.
109- answers:
110- yes:
111- value: "Yes"
112- nextQuestion: dataPattern
113- no:
114- value: "No"
115- outcome:
116- label: "RDI throughput limits will be exceeded"
117- id: exceedsLimits
118- sentiment: "negative"
119- dataPattern:
120- text: |
121- Is your data updated frequently in small increments (not by batch/ETL with large transactions)?
122- whyAsk: |
123- RDI captures changes from the database transaction log. Large batch transactions or ETL processes can cause RDI to fail.
124- answers:
125- yes:
126- value: "Yes"
127- nextQuestion: dataSize
128- no:
129- value: "No"
130- outcome:
131- label: "RDI will fail with batch/ETL processes and large transactions"
132- id: batchProcessing
133- sentiment: "negative"
134- dataSize:
135- text: |
136- Is your data set large enough to benefit from caching?
137- whyAsk: |
138- RDI adds operational complexity. If your data set is small, you may not need caching at all.
139- answers:
140- yes:
141- value: "Yes"
142- nextQuestion: dataSource
143- no:
144- value: "No"
145- outcome:
146- label: "RDI is not necessary - your data set is too small"
147- id: tooSmall
148- sentiment: "negative"
149- dataSource:
150- text: |
151- Is your data ingested from a single source (not from two Active-Active replicas simultaneously)?
152- whyAsk: |
153- RDI cannot handle data ingested from two Active-Active replicas at the same time, as this creates conflicting change events.
154- answers:
155- yes:
156- value: "Yes"
157- outcome:
158- label: "✅ RDI is a good fit for your use case"
159- id: goodFit
160- sentiment: "positive"
161- no:
162- value: "No"
163- outcome:
164- label: "RDI won't work with Active-Active replicas"
165- id: activeActive
166- sentiment: "negative"
167- ```
168-
169-
26+ {{< embed-md "rdi-when-to-use.md" >}}
0 commit comments