Stalwart Keep
Stalwart Keep carries cluster events as well as short-lived state, which makes it the recommended coordinator for a Stalwart cluster. A cluster that already uses Keep as its in-memory store needs no other service.
Keep does not store events. A node that is not connected when an event is published does not receive it, but Keep numbers each subscription’s events, so the node learns that it may have missed some. Stalwart responds as described in Coordinator outages: the node discards its caches and checks its queues.
Configuration
Section titled “Configuration”Keep coordination is selected on the Coordinator object (found in the WebUI under Settings › Cluster › Coordinator). With Keep as the in-memory store, the Default variant reuses its connection:
{ "@type": "Default"}The Keep variant opens a separate connection, and has the same fields as the Keep in-memory store. It is used when coordination should run on a different Keep deployment, or alongside another in-memory store. Even then, the in-memory store must be a shared one, because the registry refuses a coordinator while the in-memory store is the local default.
The following coordinator connects to a separate Keep cluster over TLS with raw public keys:
{ "@type": "Keep", "hosts": { "10.0.1.1:7000": true, "10.0.1.2:7000": true, "10.0.1.3:7000": true }, "clusterDiscovery": true, "secret": {"@type": "EnvironmentVariable", "variableName": "KEEP_SECRET"}, "tls": { "@type": "RawPublicKeys", "keyPath": "/etc/stalwart/keep/node.key", "serverKeysPath": "/etc/stalwart/keep/servers.pem" }}Connecting Stalwart describes these settings and the choice of streamMode.