Clustering
Cluster Set Routes
Adds a route/routes to either the hub or leaf server cluster configuration.
Operation is restricted to super_user roles only
operation (required) - must always be
cluster_set_routes
server (required) - must always be
hub
orleaf
, in most cases you should usehub
hereroutes (required) - must always be an objects array with a host and port:
host - the host of the remote instance you are clustering to
port - the clustering port of the remote instance you are clustering to, in most cases this is the value in
clustering.hubServer.cluster.network.port
on the remote instanceharperdb-config.yaml
Body
Response: 200
Cluster Get Routes
Gets all the hub and leaf server routes from the config file.
Operation is restricted to super_user roles only
operation (required) - must always be
cluster_get_routes
Body
Response: 200
Cluster Delete Routes
Removes route(s) from hub and/or leaf server routes array in config file. Returns a deletion success message and arrays of deleted and skipped records.
Operation is restricted to super_user roles only
operation (required) - must always be
cluster_delete_routes
routes required - Must be an array of route object(s)
Body
Response: 200
Add Node
Registers an additional HarperDB instance with associated subscriptions. Learn more about HarperDB clustering here: https://harperdb.io/docs/clustering/.
Operation is restricted to super_user roles only
operation (required) - must always be
add_node
node_name (required) - the node name of the remote node
subscriptions (required) - The relationship created between nodes. Must be an object array and include
schema
,table
,subscribe
andpublish
:schema - the schema to replicate from
table - the table to replicate from
subscribe - a boolean which determines if transactions on the remote table should be replicated on the local table
publish - a boolean which determines if transactions on the local table should be replicated on the remote table
start_time (optional) - How far back to go to get transactions from node being added. Must be in UTC YYYY-MM-DDTHH:mm:ss.sssZ format
Body
Response: 200
Update Node
Modifies an existing HarperDB instance registration and associated subscriptions. Learn more about HarperDB clustering here: https://harperdb.io/docs/clustering/.
Operation is restricted to super_user roles only
operation (required) - must always be
update_node
node_name (required) - the node name of the remote node you are updating
subscriptions (required) - The relationship created between nodes. Must be an object array and include
schema
,table
,subscribe
andpublish
:schema - the schema to replicate from
table - the table to replicate from
subscribe - a boolean which determines if transactions on the remote table should be replicated on the local table
publish - a boolean which determines if transactions on the local table should be replicated on the remote table
Body
Response: 200
Cluster Status
Returns an array of status objects from a cluster. A status object will contain the clustering node name, whether or not clustering is enabled, and a list of possible connections. Learn more about HarperDB clustering here: https://harperdb.io/docs/clustering/.
Operation is restricted to super_user roles only
operation (required) - must always be
cluster_status
Body
Response: 200
Cluster Network
Operation is restricted to super_user roles only
operation (required)- must always be
cluster_network
timeout (optional) - the amount of time in milliseconds to wait for a response from the network. Must be a number
connected_nodes (optional) - omit
connected_nodes
from the response. Must be a boolean. Defaults tofalse
routes (optional) - omit
routes
from the response. Must be a boolean. Defaults tofalse
Body
Response: 200
Remove Node
Removes a HarperDB instance and associated subscriptions from the cluster. Learn more about HarperDB clustering here: https://harperdb.io/docs/clustering/.
Operation is restricted to super_user roles only
operation (required) - must always be
remove_node
name (required) - The name of the node you are de-registering
Body
Response: 200
Configure Cluster
Bulk create/remove subscriptions for any number of remote nodes. Resets and replaces any existing clustering setup. Learn more about HarperDB clustering here: https://harperdb.io/docs/clustering/.
Operation is restricted to super_user roles only
operation (required) - must always be
configure_cluster
connections (required) - must be an object array with each object containing
node_name
andsubscriptions
for that node
Body
Response: 200
Last updated