Skip to main content

Remove-ZrServer

Removes a server from the active supervisor workspace, shrinking the cluster. Scale-in is not yet drain-safe — keys in evicted partitions can be lost — so -Force is required.

Syntax

Remove-ZrServer
-Address <string>
[-Token <string>]
[-Force]
[-Managers <string[]>] [-Port <int>] [-TimeoutSec <int>]
[-WhatIf] [-Confirm]

Description

The symmetric of Add-ZrServer. It gracefully stops the leaving server's node processes (so each partition fails over to a surviving replica on another machine), drops the server from every store's canonical definition and propagates that to the remaining servers, removes it from the workspace roster (CAS), and releases its binding so the machine becomes blank again. Membership shrinks and the elastic partition map recomputes down.

Two guards apply. An RF-floor guard refuses the removal if it would leave fewer machines than a store's replication factor (each replica must land on a distinct machine). More importantly, scale-in is not yet drain-safe: shrinking the partition map evicts the resharded-away partitions rather than migrating their keys, so keys that lived only in them can be lost (verified). For both reasons the cmdlet refuses to proceed without -Force, which acknowledges the data-loss risk and overrides the RF-floor guard. Quiesce writes and back up affected stores first. Supervisor mode only.

Parameters

ParameterTypeRequiredDescription
-AddressstringYesManagement address of the server to remove, e.g. machine-d:7801. Position 0.
-TokenstringNoAdmin bearer token for a secured workspace.
-ForceswitchNoProceed with the removal. Required because scale-in is not drain-safe (keys in evicted partitions can be lost) and to override the RF-floor guard. Acknowledges reduced fault tolerance.
-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

Attempt to remove a server — without -Force this is refused with an explanation of the data-loss and RF-floor risks.

Remove-ZrServer -Address machine-d:7801

Remove a server after quiescing writes and backing up, accepting the scale-in risk.

Remove-ZrServer -Address machine-d:7801 -Force