| Did you know ... | Search Documentation: |
| Pack asadb -- flaskserver/docs/CLUSTER.md |
database file: main primaryNode: node-1 replicaNodes: [node-2] pool: 0
The pool field follows the useful SiriDB concept of grouping servers, but is
currently metadata only. AsaDB does not yet distribute one SQL query across
multiple files.
On node 1:
curl -X POST https://node-1.example/api/v1/cluster/nodes \
-H "Authorization: Bearer $ADMIN_TOKEN" \
-H "Content-Type: application/json" \
-d '{"id":"node-2","url":"https://node-2.example"}'
Register the same physical ID on the replica with primaryNode=node-1 and
replicaNodes=["node-2"].
curl -X POST https://node-1.example/api/v1/replication/main \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"logicalDatabase":"app","targetNode":"node-2"}'
Poll the returned job ID.
Set replicationLogicalDatabase on a primary database-file record and set
ASADB_REPLICATION_INTERVAL_SECONDS to a positive interval. The maintenance
service schedules one snapshot job per configured replica when no equivalent
job is already queued or running.
Set the interval to 0 to keep replication manual-only.