This XTDB module is based on the http-server module and adds supports for multiple nodes.
Creating nodes can done using a POST to /_xtdb/create-node
with the name of
the name given as the node
parameter:
curl -X POST \
-H "Content-Type: application/edn" \
-H "Accept: application/edn" \
-d '{:node "test"}' $XTDB_URL/_xtdb/create-node
Deleting is done with a POST to /_xtdb/create-node
with the name of the name
also given as the node
parameter. This will delete all data of this node on
disk:
curl -X POST \
-H "Content-Type: application/edn" \
-H "Accept: application/edn" \
-d '{:node "test"}' $XTDB_URL/_xtdb/delete-node
The rest of the API is the same but the node name needs to be added as path
after _xtdb
:
curl -X GET \
-H "Accept: application/edn" \
$XTDB_URL/_xtdb/test/status
There following environment variables can be used with xtdb-http-multinode container
This variable can be used to specify another location for XTDB instance files. The default value is "/var/lib/xtdb".
The RocksDB log level. This can be DEBUG, INFO, WARN, ERROR, FATAL or HEADER. The default is WARN.
The RocksDB max log file size in bytes. The default is 1048576 (1 MiB).
Setting this variable to 1 or "true" will disable removing the indexes if an older XTDB index version is detected.
If the containers detects a volume that was previously used by the standard XTDB container it will automatically migrate that node to be the first node of the multinode container with the name specified by XTDB_MIGRATION_NODE_NAME. If the environment variable isn’t specified it will default to "_dev".