|
1 | | -## When to use RDI |
| 1 | +### When to use RDI |
2 | 2 |
|
3 | | -You should use RDI when: |
| 3 | +RDI is a good fit when: |
4 | 4 |
|
| 5 | +- You want to use Redis as the target database for caching data. |
| 6 | +- You want to transfer data to Redis from a *single* source database. |
5 | 7 | - You must use a slow database as the system of record for the app. |
6 | 8 | - The app must always *write* its data to the slow database. |
7 | | -- You already intend to use Redis for the app cache. |
8 | | -- The data changes frequently in small increments. |
9 | 9 | - Your app can tolerate *eventual* consistency of data in the Redis cache. |
| 10 | +- You want a self-managed solution or AWS based solution. |
| 11 | +- The source data changes frequently in small increments. |
| 12 | +- There are no more than 10K changes per second in the source database. |
| 13 | +- The total data size is not larger than 100GB. |
10 | 14 | - RDI throughput during |
11 | 15 | [full sync]({{< relref "/integrate/redis-data-integration/data-pipelines#pipeline-lifecycle" >}}) would not exceed 30K records per second and during |
12 | 16 | [CDC]({{< relref "/integrate/redis-data-integration/data-pipelines#pipeline-lifecycle" >}}) |
13 | 17 | would not exceed 10K records per second. |
| 18 | +- You don’t need to perform join operations on the data from several tables |
| 19 | + into a nested Redis JSON object. |
| 20 | +- RDI supports the data transformations you need for your app. |
| 21 | +- Your data caching needs are too complex or demanding to implement and maintain yourself. |
| 22 | +- Your database administrator has reviewed RDI's requirements for the source database and |
| 23 | + confirmed that they are acceptable. |
14 | 24 |
|
15 | | -## When not to use RDI |
| 25 | +### When not to use RDI |
16 | 26 |
|
17 | | -You should *not* use RDI when: |
| 27 | +RDI is not a good fit when: |
18 | 28 |
|
19 | 29 | - You are migrating an existing data set into Redis only once. |
20 | | -- Your app needs *immediate* cache consistency rather than *eventual* consistency. |
| 30 | +- Your app needs *immediate* cache consistency (or a hard limit on latency) rather |
| 31 | + than *eventual* consistency. |
| 32 | +- You need *transactional* consistency between the source and target databases. |
21 | 33 | - The data is ingested from two replicas of Active-Active at the same time. |
22 | 34 | - The app must *write* data to the Redis cache, which then updates the source database. |
23 | 35 | - Your data set will only ever be small. |
24 | 36 | - Your data is updated by some batch or ETL process with long and large transactions - RDI will fail |
25 | 37 | processing these changes. |
| 38 | +- You need complex stream processing of data (aggregations, sliding window processing, complex |
| 39 | + custom logic). |
| 40 | +- You need to write data to multiple targets from the same pipeline (Redis supports other |
| 41 | + ways to replicate data across Redis databases such as replicaOf and Active Active). |
| 42 | +- Your database administrator has rejected RDI's requirements for the source database. |
26 | 43 |
|
27 | | -## Decision tree for using RDI |
| 44 | +### Decision tree for using RDI |
28 | 45 |
|
29 | 46 | Use the decision tree below to determine whether RDI is a good fit for your architecture: |
30 | 47 |
|
31 | 48 | ```decision-tree {id="when-to-use-rdi"} |
32 | 49 | id: when-to-use-rdi |
33 | 50 | scope: rdi |
34 | | -rootQuestion: systemOfRecord |
| 51 | +indentWidth: 25 |
| 52 | +rootQuestion: cacheTarget |
35 | 53 | questions: |
36 | | - systemOfRecord: |
| 54 | + cacheTarget: |
37 | 55 | text: | |
38 | | - Does your app require a disk-based database as the system of record? |
| 56 | + Do you want to use Redis as the target database for caching data? |
39 | 57 | whyAsk: | |
40 | | - RDI is designed to keep Redis in sync with a primary database. If you don't need a primary database, RDI is not necessary. |
| 58 | + RDI is specifically designed to keep Redis in sync with a primary database. If you don't need Redis as a cache, RDI is not the right tool. |
41 | 59 | answers: |
42 | | - yes: |
43 | | - value: "Yes" |
44 | | - nextQuestion: writeLocation |
45 | 60 | no: |
46 | 61 | value: "No" |
47 | 62 | outcome: |
48 | | - label: "RDI is not necessary for your use case" |
49 | | - id: notNecessary |
| 63 | + label: "❌ RDI only works with Redis as the target database" |
| 64 | + id: noRedisCache |
50 | 65 | sentiment: "negative" |
51 | | - writeLocation: |
| 66 | + yes: |
| 67 | + value: "Yes" |
| 68 | + nextQuestion: singleSource |
| 69 | + singleSource: |
52 | 70 | text: | |
53 | | - Does your app write data directly to the disk-based database? |
| 71 | + Are you transferring data from a single source database? |
54 | 72 | whyAsk: | |
55 | | - RDI requires the primary database to be the system of record. If your app writes to Redis first, RDI won't work. |
| 73 | + RDI is designed to work with a single source database. Multiple sources or Active-Active replicas create conflicting change events. |
56 | 74 | answers: |
| 75 | + no: |
| 76 | + value: "No" |
| 77 | + outcome: |
| 78 | + label: "❌ RDI won't work with multiple source databases" |
| 79 | + id: multipleSourcesOrActiveActive |
| 80 | + sentiment: "negative" |
57 | 81 | yes: |
58 | 82 | value: "Yes" |
59 | | - nextQuestion: consistency |
| 83 | + nextQuestion: systemOfRecord |
| 84 | + systemOfRecord: |
| 85 | + text: | |
| 86 | + Does your app always *write* to the source database and not to Redis? |
| 87 | + whyAsk: | |
| 88 | + RDI requires the source database to be the authoritative source of truth. If your app writes to Redis first, RDI won't work. |
| 89 | + answers: |
60 | 90 | no: |
61 | 91 | value: "No" |
62 | 92 | outcome: |
63 | | - label: "RDI won't work - your app must write to the primary database" |
64 | | - id: wrongWritePattern |
| 93 | + label: "❌ RDI doesn't support syncing data from Redis back to the source database" |
| 94 | + id: notSystemOfRecord |
65 | 95 | sentiment: "negative" |
| 96 | + yes: |
| 97 | + value: "Yes" |
| 98 | + nextQuestion: consistency |
66 | 99 | consistency: |
67 | 100 | text: | |
68 | 101 | Can your app tolerate eventual consistency in the Redis cache? |
69 | 102 | whyAsk: | |
70 | | - RDI provides eventual consistency, not immediate consistency. If your app needs real-time cache consistency, RDI is not suitable. |
| 103 | + RDI provides eventual consistency, not immediate consistency. If your app needs real-time cache consistency or hard latency limits, RDI is not suitable. |
71 | 104 | answers: |
72 | | - yes: |
73 | | - value: "Yes" |
74 | | - nextQuestion: throughput |
75 | 105 | no: |
76 | 106 | value: "No" |
77 | 107 | outcome: |
78 | | - label: "RDI is not suitable - you need immediate cache consistency" |
| 108 | + label: "❌ RDI does not provide immediate cache consistency" |
79 | 109 | id: needsImmediate |
80 | 110 | sentiment: "negative" |
81 | | - throughput: |
| 111 | + yes: |
| 112 | + value: "Yes" |
| 113 | + nextQuestion: deployment |
| 114 | + deployment: |
82 | 115 | text: | |
83 | | - Will your throughput stay within RDI limits (≤30K records/sec during full sync, ≤10K records/sec during CDC)? |
| 116 | + Do you want a self-managed solution or an AWS-based solution? |
84 | 117 | whyAsk: | |
85 | | - RDI has throughput limits. Exceeding these limits will cause processing failures and data loss. |
| 118 | + RDI is available as a self-managed solution or as an AWS-based managed service. If you need a different deployment model, RDI may not be suitable. |
86 | 119 | answers: |
| 120 | + no: |
| 121 | + value: "No" |
| 122 | + outcome: |
| 123 | + label: "❌ RDI may not be suitable - check deployment options" |
| 124 | + id: deploymentMismatch |
| 125 | + sentiment: "negative" |
87 | 126 | yes: |
88 | 127 | value: "Yes" |
89 | | - nextQuestion: dataPattern |
| 128 | + nextQuestion: dataChangePattern |
| 129 | + dataChangePattern: |
| 130 | + text: | |
| 131 | + Does your source data change frequently in small increments? |
| 132 | + whyAsk: | |
| 133 | + RDI captures changes from the database transaction log. Large batch transactions or ETL processes can cause RDI to fail. |
| 134 | + answers: |
90 | 135 | no: |
91 | 136 | value: "No" |
92 | 137 | outcome: |
93 | | - label: "RDI throughput limits will be exceeded" |
94 | | - id: exceedsLimits |
| 138 | + label: "❌ RDI will fail with batch/ETL processes and large transactions" |
| 139 | + id: batchProcessing |
95 | 140 | sentiment: "negative" |
96 | | - dataPattern: |
| 141 | + yes: |
| 142 | + value: "Yes" |
| 143 | + nextQuestion: changeRate |
| 144 | + changeRate: |
97 | 145 | text: | |
98 | | - Is your data updated frequently in small increments (not by batch/ETL with large transactions)? |
| 146 | + Are there fewer than 10K changes per second in the source database? |
99 | 147 | whyAsk: | |
100 | | - RDI captures changes from the database transaction log. Large batch transactions or ETL processes can cause RDI to fail. |
| 148 | + RDI has throughput limits. Exceeding these limits will cause processing failures and data loss. |
101 | 149 | answers: |
| 150 | + no: |
| 151 | + value: "No" |
| 152 | + outcome: |
| 153 | + label: "❌ RDI throughput limits will be exceeded" |
| 154 | + id: exceedsChangeRate |
| 155 | + sentiment: "negative" |
102 | 156 | yes: |
103 | 157 | value: "Yes" |
104 | 158 | nextQuestion: dataSize |
| 159 | + dataSize: |
| 160 | + text: | |
| 161 | + Is your total data size smaller than 100GB? |
| 162 | + whyAsk: | |
| 163 | + RDI has practical limits on the total data size it can manage. Very large datasets may exceed these limits. |
| 164 | + answers: |
105 | 165 | no: |
106 | 166 | value: "No" |
107 | 167 | outcome: |
108 | | - label: "RDI will fail with batch/ETL processes and large transactions" |
109 | | - id: batchProcessing |
| 168 | + label: "❌ RDI may not be suitable - your data set is probably too large" |
| 169 | + id: dataTooLarge |
110 | 170 | sentiment: "negative" |
111 | | - dataSize: |
| 171 | + yes: |
| 172 | + value: "Yes" |
| 173 | + nextQuestion: joins |
| 174 | + joins: |
112 | 175 | text: | |
113 | | - Is your data set large enough to benefit from caching? |
| 176 | + Do you need to perform join operations on data from several tables into a nested Redis JSON object? |
114 | 177 | whyAsk: | |
115 | | - RDI adds operational complexity. If your data set is small, you may not need caching at all. |
| 178 | + RDI has limitations with complex join operations. If you need to combine data from multiple tables into nested structures, you may need custom transformations. |
116 | 179 | answers: |
117 | 180 | yes: |
118 | 181 | value: "Yes" |
119 | | - nextQuestion: dataSource |
| 182 | + outcome: |
| 183 | + label: "❌ RDI may not be suitable - complex joins are not well supported" |
| 184 | + id: complexJoins |
| 185 | + sentiment: "negative" |
| 186 | + no: |
| 187 | + value: "No" |
| 188 | + nextQuestion: transformations |
| 189 | + transformations: |
| 190 | + text: | |
| 191 | + Does RDI support the data transformations you need for your app? |
| 192 | + whyAsk: | |
| 193 | + RDI provides built-in transformations, but if you need custom logic beyond what RDI supports, you may need a different approach. |
| 194 | + answers: |
120 | 195 | no: |
121 | 196 | value: "No" |
122 | 197 | outcome: |
123 | | - label: "RDI is not necessary - your data set is too small" |
124 | | - id: tooSmall |
| 198 | + label: "❌ RDI may not be able to perform the required data transformations" |
| 199 | + id: unsupportedTransformations |
125 | 200 | sentiment: "negative" |
126 | | - dataSource: |
| 201 | + yes: |
| 202 | + value: "Yes" |
| 203 | + nextQuestion: adminReview |
| 204 | + adminReview: |
127 | 205 | text: | |
128 | | - Is your data ingested from a single source (not from two Active-Active replicas simultaneously)? |
| 206 | + Has your database administrator reviewed RDI's requirements for the source database |
| 207 | + and confirmed they are acceptable? |
129 | 208 | whyAsk: | |
130 | | - RDI cannot handle data ingested from two Active-Active replicas at the same time, as this creates conflicting change events. |
| 209 | + RDI has specific requirements for the source database (binary logging, permissions, etc.). Your DBA must confirm these are acceptable before proceeding. |
131 | 210 | answers: |
| 211 | + no: |
| 212 | + value: "No" |
| 213 | + outcome: |
| 214 | + label: "❌ RDI requirements for the source database can't be met" |
| 215 | + id: adminRejected |
| 216 | + sentiment: "negative" |
132 | 217 | yes: |
133 | 218 | value: "Yes" |
134 | 219 | outcome: |
135 | 220 | label: "✅ RDI is a good fit for your use case" |
136 | 221 | id: goodFit |
137 | 222 | sentiment: "positive" |
138 | | - no: |
139 | | - value: "No" |
140 | | - outcome: |
141 | | - label: "RDI won't work with Active-Active replicas" |
142 | | - id: activeActive |
143 | | - sentiment: "negative" |
144 | 223 | ``` |
0 commit comments