Cluster#
On a node of a two-node cluster, the Administrative Portal shows the status of the cluster: which node holds the serving role, under which lease, in which failover mode, and the state of both nodes. Only the node that serves clients serves the portal, so the page always comes from that node. It reads everything from the metabase, which both nodes write their state to, so it shows the other node without connecting to it.
The page only shows the cluster; it changes nothing.
To open it, select from the main menu and then Cluster. The entry is shown only on
a cluster node, and only to a login that holds the VIEW SERVER STATE permission. While it is open, the page reads the
status again as often as the nodes write their state, every five seconds by default, and the REFRESH button
reads it at once. Times are shown in the time zone of the browser.
The cluster#
Field |
Description |
|---|---|
Cluster name |
The DNS name clients reach the cluster by, in full, as the metabase stores it: given when the cluster was
provisioned, or later with
qua_cluster_set_name.
Not recorded for a cluster provisioned before the name was recorded; |
Cluster id |
The identifier of the cluster in the metabase. |
Read at (metabase clock) |
When the page read the cluster, by the clock of the metabase server. |
Failover mode |
Manual: another node takes the serving role over only when an operator authorizes it. Automatic: another node takes it over once the lease has expired. Automatic failover mode is not supported. Run production clusters in manual failover mode. |
Lease holder |
The node that holds the lease, which is the node that serves clients, named as in the node table below and
followed by the id of its instance, for example |
Lease |
How long the lease is still valid. While the role is moving, the lease can also be Expired, Released at a clean stop or Released for a planned failover. |
Lease deadline |
When the lease expires unless its holder renews it. |
Fencing token |
The number of the lease. It grows by one with every acquisition, and the metabase refuses a change sent under an older number. |
Role changes |
How many times the holder of the lease has changed. The first acquisition in a new cluster counts, so a cluster that never failed over shows 1. |
Held for |
How long the holder has held the lease. |
Last automatic takeover |
When a node last took the serving role over automatically from a node that failed. Taking the lease the serving node released at a clean stop does not count, although the role moves. |
Automatic takeover blocked until |
After an automatic takeover, the next one waits this long; an operator can still authorize a takeover. |
Planned failover |
While a planned failover is in progress: the node it moves the role to, named like the lease holder, its operation id and when its reservation ends. |
Metadata version |
The version of the metadata in the metabase. It changes with every change of definitions, permissions or topology. |
A node is down after |
A node that has not written its state to the metabase for this long is shown as down. |
The page warns when the cluster is a pilot, which is not fit for production - that is, when either node runs as a
pilot - and when one node runs as a pilot and the other does not. Each node reads whether it runs as a pilot from its
own configuration when it starts, so the two can differ. The page also warns when the two nodes run different builds
and when the two lease rows disagree. They disagree for a moment while the role changes; if the
warning stays, the lease rows are damaged. When the lease rows are missing from the metabase, the page says so. In
either case, stop both nodes and reset the cluster with dbo.ClusterReset on the metabase, as described in
Cluster operations and recovery.
The nodes#
Column |
Description |
|---|---|
Node |
The node, by the name of its instance followed by the host it runs on, for example |
Status |
Up or Down, and how long ago the node last wrote its state to the metabase. A node that never wrote it is Never reported. Both the time a node writes its state and the time the page reads it come from the clock of the metabase server, so the clocks of the nodes do not affect whether a node is shown as up or down. |
Ready to take over |
For the standby: Ready, or why it is not ready. |
Master key |
Whether the instance master key is usable on the node. A node whose master key is not usable is marked: it is not ready to take the serving role over. |
Role |
The role and state of a node that is up, in the words SQL Server uses for an availability replica - such as
|
Metadata |
For the standby, how far the metadata it loaded lags behind the metabase: Current, the number of changes it has not loaded yet, at least a number of changes when it loaded the metadata under an earlier lease, or Unknown. The serving node makes every change itself, so it has no lag and is shown as Source of the metadata. A node that is down holds no metadata, so its lag is Unknown, shown dimmed; it loads the metadata again when it starts. |
Build |
The build the node runs, marked when it differs from the serving node’s. |
Pilot mode |
Whether the node runs as a pilot, marked when it differs from the serving node. For a node that is down, the setting it last ran with, which also counts for the pilot warnings until the node starts again. |
Incarnation |
The identifier of the node’s current process; it changes at every restart of the node. |
When the table is wider than the window, scroll it sideways.
The standby is ready to take the serving role over when it has reported, is up, waits as a standby, can use the instance master key and runs the same build as the serving node.
During and after a failover#
While the serving role moves to the other node, no node answers on the cluster’s web port for a while. The portal then shows a notice in its header that the server cannot be reached and that it waits for the server to become ready, and it checks the server’s readiness, at first after a second and then less often, up to every 15 seconds. Meanwhile:
A page that was loading data waits, and loads it as soon as the server is ready again.
A change - a save, a delete, the start of a job - is not sent again. The portal tells you that the server could not be reached while the change was being sent: it may or may not have been applied, so check it before you repeat it.
This page refreshes itself: it reports that the server cannot be reached and tries again on its own. The list of running jobs in the header keeps the jobs it showed and checks them again once the server answers.
When the server is still unreachable three minutes after the outage started, the pages stop waiting and show the error, and the notice says that the server is still unreachable; click it to sign out. The portal keeps checking; once the server answers again, the notice says that some data was not loaded - click it to reload the page. Long operations run as jobs on the server and do not depend on the portal staying connected. The same happens on any installation while the Querona service restarts.
Each node keeps its own portal sessions. After the serving role moves to the other node, the first request of a portal that was open is refused, and the portal shows the sign-in page with the message that the session has ended. After signing in again, the portal returns to the page that was open. A login that uses multi-factor authentication types its code again. The same happens on any installation after the Querona service restarts or when a session expires.
A node that loses the serving role stops serving the portal and the API at once, also on connections a browser or an API client keeps open between requests:
A request that is running when the node stops is broken: the connection ends without a response, and a statement it runs is cancelled. Its outcome is unknown, as for a client of a SQL Server failover cluster instance during a failover; check whether a change was applied before you make it again.
A request that reaches the node afterwards is answered with
503 Service Unavailable, aRetry-Afterheader andConnection: close. Nothing of it ran, so it can be sent again; the new connection reaches the node that serves. The portal treats this answer like a server that cannot be reached, as described above: it waits and loads the data again, and does not send a change again.The node ends every portal and API session it held. A transaction left open in the query editor or the data editor does not survive, and the session cannot continue even if the same node takes the serving role again.
API integrations should treat 503 from the cluster web port like a refused connection: wait and send the request
again.
In the API#
A login that holds VIEW SERVER STATE reads the same status with GET /api/1.0/cluster. The health details of
the serving node, GET /api/1.0/health, carry the state of the node itself; see Health endpoints.
What clients and tools see#
A cluster looks to clients and tools like a SQL Server failover cluster instance: one server name that stays the same whichever node serves.
Surface |
Value on a cluster node |
|---|---|
|
The first label of the cluster name, in the case it is stored in: |
|
The host name of the node that serves. It changes when the serving role moves. |
|
|
One row per node: the host name the node last reported (NULL for a node that never reported), |
|
|
0: a cluster is not an availability group. |
The first label is used because a server name is at most 128 characters, while a DNS name may be 253. A cluster
provisioned before the cluster name was recorded has no name to report: its nodes report their own host names, which
change on failover, and each node logs a warning when it starts. qua_cluster_set_name records the name.