Skip to main content

Add-ZrServer

Adds a server to the active supervisor workspace, growing the cluster: the new server takes on the same homogeneous share of every store, and partitions redistribute onto it. Scale-out is lossless.

Syntax

Add-ZrServer
-Address <string>
[-Token <string>]
[-NoStart]
[-Managers <string[]>] [-Port <int>] [-TimeoutSec <int>]
[-WhatIf] [-Confirm]

Description

The scaling unit is the server, never the individual node. Add-ZrServer claims a blank, reachable server into the workspace and makes it run the same share of every store the other servers run — so cluster membership grows and the partition map expands and redistributes automatically. For each store it extends the canonical store definition with the new server's node layout, propagates the updated definition across the workspace so config stays consistent everywhere, forks and starts the new server's nodes, then appends the server to the workspace roster with an optimistic-concurrency (CAS) update.

New nodes are started only when the store is already running; a stopped store just gets the extra config so the new nodes come up on the next Start-ZrStore. Use -NoStart to write config only regardless.

Supervisor mode only — the workspace must resolve to supervisor mode, the new server must be reachable, and it must not already belong to a different workspace. In attach mode, scale nodes with your orchestrator (kubectl scale / compose) instead. This operation is lossless: it is the safe direction of elastic scaling (contrast Remove-ZrServer).

Parameters

ParameterTypeRequiredDescription
-AddressstringYesManagement address of the server to add, e.g. machine-d:7801. Position 0.
-TokenstringNoAdmin bearer token for a secured workspace.
-NoStartswitchNoFork the new server's node configs but do not start them (write config only).
-Managersstring[]NoManagement Service endpoints to target; when omitted the active workspace's managers are used.
-PortintNoManagement Service port for bare-host managers. Default 7801.
-TimeoutSecintNoPer-request timeout in seconds. Default 30.

Supports -WhatIf and -Confirm.

Examples

Add a machine to the active workspace; every store grows onto it and partitions rebalance.

Add-ZrServer -Address machine-d:7801

Add a server writing its config only, deferring node startup to the next Start-ZrStore.

Add-ZrServer -Address machine-d:7801 -NoStart