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
Copy file name to clipboardExpand all lines: README.md
+41
Original file line number
Diff line number
Diff line change
@@ -186,6 +186,29 @@ To accept webhook requests Agent must be configured by mapping an Optimizely Pro
186
186
with the associated secret used for validating the inbound request. An example webhook configuration can
187
187
be found in the the provided [config.yaml](./config.yaml).
188
188
189
+
When running Agent in High Availability (HA) mode, it's important to ensure that all nodes are updated promptly when a webhook event (datafile updated) is received. By default, only one Agent node or instance will receive the webhook notification. A pub-sub system can be used to ensure this.
190
+
191
+
Redis, a powerful in-memory data structure store, can be used as a relay to propagate the datafile webhook event to all other nodes in the HA setup. This ensures that all nodes are notified about the event and can update their datafiles accordingly.
192
+
193
+
To set up Redis as a relay, you need to enable the datafile synchronization in your Optimizely Agent configuration. The PubSub feature of Redis is used to publish the webhook notifications to all subscribed Agent nodes.
194
+
195
+
Here's an example of how you can enable the datafile synchronization with Redis:
196
+
197
+
```yaml
198
+
## synchronization should be enabled when features for multiple nodes like notification streaming are deployed
199
+
synchronization:
200
+
pubsub:
201
+
redis:
202
+
host: "localhost:6379"
203
+
password: ""
204
+
database: 0
205
+
## if datafile synchronization is enabled, then for each webhook API call
206
+
## the datafile will be sent to all available replicas to achieve better eventual consistency
207
+
datafile:
208
+
enable: true
209
+
default: "redis"
210
+
```
211
+
189
212
## Admin API
190
213
191
214
The Admin API provides system information about the running process. This can be used to check the availability
@@ -432,6 +455,24 @@ Optimizely Agent supports authorization workflows based on OAuth and JWT standar
432
455
433
456
Just as you can use Notification Listeners to subscribe to events of interest with Optimizely SDKs, you can use the Notifications endpoint to subscribe to events in Agent. For more information, see the [Notifications Guide](https://docs.developers.optimizely.com/experimentation/v4.0.0-full-stack/docs/agent-notifications).
434
457
458
+
When the Agent is operating in High Availability (HA) mode, you need to enable notification synchronization to get notifications from all nodes in an HA setup. A PubSub system (Redis) is now used to ensure consistent retrieval of notification events across all nodes in an HA setup.
459
+
Here's an example of how you can enable the notification synchronization with Redis:
460
+
461
+
```yaml
462
+
## synchronization should be enabled when features for multiple nodes like notification streaming are deployed
463
+
synchronization:
464
+
pubsub:
465
+
redis:
466
+
host: "localhost:6379"
467
+
password: ""
468
+
database: 0
469
+
## if notification synchronization is enabled, then the active notification event-stream API
470
+
## will get the notifications from available replicas
0 commit comments