Link Search Menu Expand Document
Start for Free

Standby Nodes (Feature Preview)

This page describes Standby Nodes in Stardog - a useful feature for maintaining HA clusters.

Page Contents
  1. Overview
  2. Managing a Standby Node

Overview

The notion of a standby node was introduced in Stardog 6.2.3. A standby node runs next to the Stardog cluster and periodically requests updates. The standby does not service any user requests, neither reads nor writes. Its purpose is to stay very closely synchronized with the cluster but without disturbing the cluster with the more difficult join event. By only drifting from full synchronization by limited time windows it allows for two important features:

  1. The standby node can safely run database and server backups while taking minimal CPU cycles from servicing user requests on cluster nodes.

  2. The standby node can be upgraded to a full node and thereby quickly join the cluster because it is already closely in sync.

This latter point is important for maintaining HA clusters. If one node goes down a standby node can be promoted to a real, functional node quickly quickly restoring the cluster to full strength.

Managing a Standby Node

To start a cluster node as a standby node simply add the following line to stardog.properties:

pack.standby=true
pack.standby.node.sync.interval=5m

This will configure the node to be in standby mode and to wait 5 minutes between synchronization attempts. The interval begins when the synchronization completes, e.g. If a synchronization takes 3 minutes it will be 8 minutes before the next synchronization attempt.

Once a standby node is running it can be converted to a full node with the cluster standby-join command.

$ stardog-admin --server http://<standby node IP>:5820 cluster standby-join

Note that you cannot use the IP address of a full cluster node nor that of a load balancer directing requests to full cluster nodes. You must point directly to the standby node. Once upgraded it may take a bit of time for the node to fully join the cluster. Its progress can be monitored with stardog-admin cluster status.

Another feature of a standby node is the ability to pause synchronization. To request a pause of synchronization run the cluster standby-pause command:

$ stardog-admin --server http://<standby node IP>:5820 cluster standby-pause

This tells the standby node that you want to pause it, however it does not mean it is paused. Pausing can take some time if the node is in the middle of a large synchronization event. The status of pausing can be monitored with the cluster standby-status command:

$ stardog-admin --server http://<standby node IP>:5820 cluster standby-status

A node is not safely paused until the state PAUSED is returned. To resume synchronization run the cluster standby-resume:

$ stardog-admin --server http://<standby node IP>:5820 cluster standby-resume