FoundationDB
FoundationDB is a distributed database designed to handle large volumes of data across multiple machines. It combines ACID transactions with the scalability of NoSQL systems, providing high performance, fault tolerance, and straightforward horizontal scaling. It is the recommended backend for distributed deployments of Stalwart.
The FoundationDB client library must be installed on the host before Stalwart can connect to a FoundationDB cluster.
Configuration
The FoundationDB backend is selected by choosing the FoundationDb variant on the DataStore object (found in the WebUI under Settings › Storage › Data Store). The variant exposes the following fields:
clusterFile: filesystem path to the FoundationDB cluster configuration file. If unset, the default/etc/foundationdb/fdb.clusteris used.transactionTimeout: duration after which a transaction times out if not completed.transactionRetryLimit: maximum number of transaction retries before giving up.transactionRetryDelay: maximum delay between transaction retries.machineId: optional identifier for the machine, useful for logging and cluster-aware behaviour.datacenterId: optional identifier for the data centre hosting the machine, used when tuning cross-datacentre replication.
FoundationDB is also available as a backend for the blob store, search store, and in-memory store; the same set of cluster-file and transaction fields is exposed on each of those objects under the FoundationDb variant.