Clustering
Cluster Set Routes
Adds a route/routes to either the hub or leaf server cluster configuration. This operation behaves as a PATCH/upsert, meaning it will add new routes to the configuration while leaving existing routes untouched.
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.
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. This operation behaves as a PATCH/upsert, meaning it will insert or update the specified replication configurations while leaving other table replication configuration untouched. Learn more about HarperDB clustering here.
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
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
Set Node Replication
A more adeptly named alias for add and update node. This operation behaves as a PATCH/upsert, meaning it will insert or update the specified replication configurations while leaving other table replication configuration untouched. The database
(aka schema
) parameter is optional, it will default to data
.
Operation is restricted to super_user roles only
operation (required) - must always be
set_node_replication
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
table
,subscribe
andpublish
:database (optional) - the database to replicate from
table (required) - the table to replicate from
subscribe (required) - a boolean which determines if transactions on the remote table should be replicated on the local table
publish (required) - 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.
Operation is restricted to super_user roles only
operation (required) - must always be
cluster_status
Body
Response: 200
Cluster Network
Returns an object array of enmeshed nodes. Each node object will contain the name of the node, the amount of time (in milliseconds) it took for it to respond, the names of the nodes it is enmeshed with and the routes set in its config file. Learn more about HarperDB clustering here.
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.
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.
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
Purge Stream
Will purge messages from a stream
Operation is restricted to super_user roles only
operation (required) - must always be
purge_stream
database (required) - the name of the database where the streams table resides
table (required) - the name of the table that belongs to the stream
options (optional) - control how many messages get purged. Options are:
keep
- purge will keep this many most recent messagesseq
- purge all messages up to, but not including, this sequence
Body
Last updated