You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cleaning up mermaid code and made it a bit more readable in dark mode (#11726)
* Cleaning up mermaid code and made it a bit more readable in dark mode
* The half working solution
* Added documentation on how to use Mermaid in MDX.
Each region silo can be scaled independently, and is isolated from other regions. Within each region exists separate, dedicated infrastructure and applications as outlined in the [application overview](/architecture/#high-level-overview).
ControlSilo ->> ControlSilo : add integration credentials to request
55
+
ControlSilo ->> MsTeams : send notification request with credentials
56
+
MsTeams -->> ControlSilo : token expired!
57
+
ControlSilo ->> MsTeams : refresh token
58
+
MsTeams -->> ControlSilo : response
59
+
ControlSilo ->> ControlSilo : update stored token
60
+
ControlSilo ->> MsTeams : send notification with new token
61
+
MsTeams -->> ControlSilo : response
62
+
ControlSilo -->> RegionSilo : response
64
63
```
65
64
66
65
The integration proxy is implemented as a class that integrations requiring refresh tokens can sub-class. Currently the following integrations use the integration credential proxy:
@@ -141,13 +140,12 @@ For each mailbox with undelivered messages, we select a block of messages, and u
141
140
142
141
```mermaid
143
142
sequenceDiagram
143
+
participant Control Silo
144
144
145
-
participant Control Silo
146
-
147
-
Control Silo ->> Control Silo : find mailboxes with messages
148
-
Control Silo ->> Control Silo : filter out mailboxes with future delivery
149
-
Control Silo ->> Control Silo : update next delivery time for the next block
150
-
Control Silo ->> Control Silo : Spawn task to drain a mailbox
145
+
Control Silo ->> Control Silo : find mailboxes with messages
146
+
Control Silo ->> Control Silo : filter out mailboxes with future delivery
147
+
Control Silo ->> Control Silo : update next delivery time for the next block
148
+
Control Silo ->> Control Silo : Spawn task to drain a mailbox
151
149
```
152
150
153
151
### Webhook Delivery
@@ -158,21 +156,21 @@ Draining a mailbox involves sending as many messages from a given mailbox as we
158
156
159
157
```mermaid
160
158
sequenceDiagram
161
-
participant Control Silo
162
-
participant Region Silo
163
-
164
-
Control Silo ->> Control Silo : Fetch head block of mailbox
165
-
loop foreach message
166
-
Control Silo ->> Control Silo : if hook is above max attempts delete.
167
-
Control Silo ->> Region Silo : Deliver hook
168
-
alt success
169
-
Region Silo -->> Control Silo : 200-40x
170
-
Control Silo ->> Control Silo : delete hook
171
-
else error
172
-
Region Silo -->> Control Silo : 50x
173
-
Control Silo ->> Control Silo : increment attempt and reschedule
174
-
end
175
-
end
159
+
participant Control Silo
160
+
participant Region Silo
161
+
162
+
Control Silo ->> Control Silo : Fetch head block of mailbox
163
+
loop foreach message
164
+
Control Silo ->> Control Silo : if hook is above max attempts delete.
165
+
Control Silo ->> Region Silo : Deliver hook
166
+
alt success
167
+
Region Silo -->> Control Silo : 200-40x
168
+
Control Silo ->> Control Silo : delete hook
169
+
else error
170
+
Region Silo -->> Control Silo : 50x
171
+
Control Silo ->> Control Silo : increment attempt and reschedule
172
+
end
173
+
end
176
174
```
177
175
178
176
Notably, most 40x errors are considered 'successful' deliveries. The reason for this is that re-attempting a delivery of a webhook that initially had a 40x response will generally not result in a 200.
Control Silo ->> Control Silo : Remove user + save outbox message
54
+
Control Silo -->>- User : bye
55
+
Control Silo --)+ Region Silo : Publish outbox message
56
+
Region Silo ->>- Region Silo : Save tombstone
57
+
Region Silo --) Region Silo : Reconcile tombstone
58
+
```
46
59
47
60
In step 5 and 6 of the above diagram we reconcile the tombstone changes with the rest of the data in the region. Tombstones needs to be reconciled for each relation that the removed record had. For example, removing a user will:
0 commit comments