Skip to content

dekkers/xtdb-http-multinode

Repository files navigation

xtdb-http-multinode

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

configuration

There following environment variables can be used with xtdb-http-multinode container

XTDB_DATA_DIR

This variable can be used to specify another location for XTDB instance files. The default value is "/var/lib/xtdb".

XTDB_ROCKSDB_LOG_LEVEL

The RocksDB log level. This can be DEBUG, INFO, WARN, ERROR, FATAL or HEADER. The default is WARN.

XTDB_ROCKSDB_LOG_MAX_FILE_SIZE

The RocksDB max log file size in bytes. The default is 1048576 (1 MiB).

XTDB_ROCKSDB_LOG_FILE_NUM

The number of RocksDB log files to keep. The default is 5.

XTDB_DISABLE_AUTO_UPGRADE

Setting this variable to 1 or "true" will disable removing the indexes if an older XTDB index version is detected.

XTDB_MIGRATION_NODE_NAME

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".

JAVA_TOOL_OPTIONS

This are the options for the JVM. This by default set to -Xms128M -Xmx512M -XX:MaxDirectMemorySize=512M -XX:+ExitOnOutOfMemoryError.