SWIM-style cluster membership management.
Implements failure detection using:
References:
SWIM-style cluster membership management. Implements failure detection using: - Direct ping probes - Indirect ping-req through other members - Suspicion mechanism with timeout before declaring dead References: - SWIM: Scalable Weakly-consistent Infection-style Process Group Membership Protocol - Serf/Memberlist (HashiCorp) for practical implementation patterns
(cluster-size)Get number of alive nodes in the cluster.
Get number of alive nodes in the cluster.
(configure! new-config)Update membership configuration.
Update membership configuration.
Default membership configuration.
Default membership configuration.
(get-alive-nodes)Get set of alive node IDs.
Get set of alive node IDs.
(get-all-nodes)Get map of all known nodes (alive + suspected + dead).
Get map of all known nodes (alive + suspected + dead).
(get-node-info node-id)Get NodeInfo for a specific node.
Get NodeInfo for a specific node.
(handle-alive! {:keys [sender payload]})Handle alive message (refutes suspicion).
Handle alive message (refutes suspicion).
(handle-join! {:keys [sender payload]})Handle node join message.
Handle node join message.
(handle-leave! {:keys [sender]})Handle graceful node leave.
Handle graceful node leave.
(handle-message! msg send-fn)Route a membership-related message to the appropriate handler.
Route a membership-related message to the appropriate handler.
(handle-ping! {:keys [sender payload]})Handle incoming ping message. Returns ping-ack message.
Handle incoming ping message. Returns ping-ack message.
(handle-ping-ack! {:keys [sender payload]})Handle incoming ping acknowledgment.
Handle incoming ping acknowledgment.
(handle-ping-req! {:keys [sender payload]} send-fn)Handle indirect ping request. Ping the target on behalf of requester.
Handle indirect ping request. Ping the target on behalf of requester.
(handle-suspect! {:keys [payload]})Handle suspicion message about a node.
Handle suspicion message about a node.
(init! node-id address & {:keys [metadata] :or {metadata {}}})Initialize membership with this node's info.
Initialize membership with this node's info.
(is-alive? node-id)Check if a node is considered alive.
Check if a node is considered alive.
(is-dead? node-id)Check if a node is confirmed dead.
Check if a node is confirmed dead.
(is-suspected? node-id)Check if a node is suspected.
Check if a node is suspected.
(join-cluster! seeds send-fn)Join a cluster by contacting seed nodes.
Join a cluster by contacting seed nodes.
(membership-stats)Get membership statistics.
Get membership statistics.
(refute-suspicion! send-fn)Refute suspicion about this node by broadcasting alive message with incremented incarnation.
Refute suspicion about this node by broadcasting alive message with incremented incarnation.
(shutdown! send-fn)Shutdown membership and notify peers of graceful leave.
Shutdown membership and notify peers of graceful leave.
(start-failure-detector! send-fn)Start the background failure detection loop.
Start the background failure detection loop.
(stop-failure-detector!)Stop the failure detection loop.
Stop the failure detection loop.
(subscribe! callback)Subscribe to membership events. Returns unsubscribe function.
Subscribe to membership events. Returns unsubscribe function.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |