Skip to main content
Swytch Documentation
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Membership and Crashed Nodes

An operator MUST remove a crashed node from membership when it will not rejoin. Swytch does not remove a member because it stops responding. Unremoved crashed members accumulate until surviving nodes consider themselves a minority partition and refuse safe-mode writes.

Why unreachable nodes remain members

A node cannot distinguish a crashed peer from a peer behind a network partition. A timeout establishes that the peer is unreachable; it does not establish that the peer has stopped running or that its history can be forgotten. Retaining membership preserves the metadata needed when that peer rejoins and exchanges its history.

Graceful departure removes membership. A crash or forced termination may leave the entry behind. Process health, discovery addresses, and the membership table describe different things: removing a Pod or a DNS record does not establish that its membership entry was removed.

For example, if a five-member cluster loses three nodes and their entries remain, the two survivors still count themselves against five members. They refuse safe-mode writes. Waiting longer does not remove those entries.

Remove a crashed member

First establish through the host or workload lifecycle that the old process has stopped and will not resume. Keep membership for a partitioned node that will reconnect. Removing a member is an explicit decision to stop retaining its participation, not a way to classify every unreachable peer as dead.

Connect to a surviving node with redis-cli, using credentials permitted to read and modify __swytch:members. Replace the host and port and add the authentication and TLS options required by your deployment:

redis-cli --no-raw -h 127.0.0.1 -p 6379

Inspect the roster

Run this command in the interactive client:

HGETALL __swytch:members

Membership is a hash whose fields are node IDs and whose values are advertised peer addresses. The IDs are binary; redis-cli displays them as quoted strings with escapes. For example:

1) "\x01\x00\x00\x00\x00\x00\x00\x00"
2) "10.0.0.1:7379"
3) "\x02\x00\x00\x00\x00\x00\x00\x00"
4) "10.0.0.2:7379"

Match the ID and address to the crashed process. A replacement process can have a different ID; preserve its entry.

Delete the selected entry

Copy the crashed node’s quoted ID exactly from HGETALL, including its escapes. If 10.0.0.2:7379 in the example is the crashed member, run these commands in the same interactive client:

HDEL __swytch:members "\x02\x00\x00\x00\x00\x00\x00\x00"
HEXISTS __swytch:members "\x02\x00\x00\x00\x00\x00\x00\x00"

HDEL returns 1 when it removes the entry, or 0 if it was already absent on that node. HEXISTS should return 0 afterward. The interactive client decodes the quoted escapes back into the original bytes. Delete the selected field, not the entire membership key.

Internal __swytch:* keys bypass the application availability preflight. Membership repair can therefore proceed while safe-mode application writes are refused. Keep the application’s safety policy unchanged.

Verify recovery

Membership changes propagate through effects. Repeat the roster inspection against each surviving node and verify the removed ID is absent. Then retry a known application write under safe and check its result. Remaining network failures or unavailable subscribers can still prevent work; removal of one entry does not prove all required peers are reachable.

Include this check after crashes, forced termination, and failed rollouts. Use availability policies for configuration and partition behavior for transaction participation and rejoining histories.