Liking cljdoc? Tell your friends :D

lb.cluster.membership

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
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
raw docstring

cluster-sizeclj

(cluster-size)

Get number of alive nodes in the cluster.

Get number of alive nodes in the cluster.
sourceraw docstring

configure!clj

(configure! new-config)

Update membership configuration.

Update membership configuration.
sourceraw docstring

default-configclj

Default membership configuration.

Default membership configuration.
sourceraw docstring

get-alive-nodesclj

(get-alive-nodes)

Get set of alive node IDs.

Get set of alive node IDs.
sourceraw docstring

get-all-nodesclj

(get-all-nodes)

Get map of all known nodes (alive + suspected + dead).

Get map of all known nodes (alive + suspected + dead).
sourceraw docstring

get-local-nodeclj

(get-local-node)

Get this node's info.

Get this node's info.
sourceraw docstring

get-node-idclj

(get-node-id)

Get this node's ID.

Get this node's ID.
sourceraw docstring

get-node-infoclj

(get-node-info node-id)

Get NodeInfo for a specific node.

Get NodeInfo for a specific node.
sourceraw docstring

handle-alive!clj

(handle-alive! {:keys [sender payload]})

Handle alive message (refutes suspicion).

Handle alive message (refutes suspicion).
sourceraw docstring

handle-join!clj

(handle-join! {:keys [sender payload]})

Handle node join message.

Handle node join message.
sourceraw docstring

handle-leave!clj

(handle-leave! {:keys [sender]})

Handle graceful node leave.

Handle graceful node leave.
sourceraw docstring

handle-message!clj

(handle-message! msg send-fn)

Route a membership-related message to the appropriate handler.

Route a membership-related message to the appropriate handler.
sourceraw docstring

handle-ping!clj

(handle-ping! {:keys [sender payload]})

Handle incoming ping message. Returns ping-ack message.

Handle incoming ping message. Returns ping-ack message.
sourceraw docstring

handle-ping-ack!clj

(handle-ping-ack! {:keys [sender payload]})

Handle incoming ping acknowledgment.

Handle incoming ping acknowledgment.
sourceraw docstring

handle-ping-req!clj

(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.
sourceraw docstring

handle-suspect!clj

(handle-suspect! {:keys [payload]})

Handle suspicion message about a node.

Handle suspicion message about a node.
sourceraw docstring

init!clj

(init! node-id address & {:keys [metadata] :or {metadata {}}})

Initialize membership with this node's info.

Initialize membership with this node's info.
sourceraw docstring

is-alive?clj

(is-alive? node-id)

Check if a node is considered alive.

Check if a node is considered alive.
sourceraw docstring

is-dead?clj

(is-dead? node-id)

Check if a node is confirmed dead.

Check if a node is confirmed dead.
sourceraw docstring

is-suspected?clj

(is-suspected? node-id)

Check if a node is suspected.

Check if a node is suspected.
sourceraw docstring

join-cluster!clj

(join-cluster! seeds send-fn)

Join a cluster by contacting seed nodes.

Join a cluster by contacting seed nodes.
sourceraw docstring

membership-statsclj

(membership-stats)

Get membership statistics.

Get membership statistics.
sourceraw docstring

refute-suspicion!clj

(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.
sourceraw docstring

shutdown!clj

(shutdown! send-fn)

Shutdown membership and notify peers of graceful leave.

Shutdown membership and notify peers of graceful leave.
sourceraw docstring

start-failure-detector!clj

(start-failure-detector! send-fn)

Start the background failure detection loop.

Start the background failure detection loop.
sourceraw docstring

stop-failure-detector!clj

(stop-failure-detector!)

Stop the failure detection loop.

Stop the failure detection loop.
sourceraw docstring

subscribe!clj

(subscribe! callback)

Subscribe to membership events. Returns unsubscribe function.

Subscribe to membership events. Returns unsubscribe function.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close