clustering
Version, currently 3.1.120 versions
- 3.1.1latestApr 19, 2021
- 3.1.0not indexedApr 21, 2021
- 3.0.0not indexedApr 21, 2021
- 2.0.4not indexedApr 21, 2021
- 2.0.3not indexedApr 21, 2021
- 2.0.2not indexedApr 21, 2021
- 2.0.1not indexedApr 21, 2021
- 2.0.0not indexedApr 21, 2021
- 1.0.2not indexedApr 21, 2021
- 1.0.1not indexedApr 21, 2021
- 1.0.0not indexedApr 21, 2021
- 0.3.3not indexedApr 21, 2021
- 0.3.2not indexedApr 21, 2021
- 0.3.1not indexedApr 21, 2021
- 0.2.2not indexedApr 21, 2021
- 0.2.1not indexedApr 21, 2021
- 0.2.0not indexedApr 21, 2021
- 0.1.2not indexedApr 21, 2021
- 0.1.1not indexedApr 21, 2021
- 0.1.0not indexedApr 21, 2021
github.com/place-labs/clustering
Class that implements basic clustering via etcd
Installation
# Add this to your shard.yml
dependencies:
clustering:
github: place-labs/clustering
version: ~> 3.1.1Then run:
shards installshard.yml
- Crystal
>= 0.35.1, < 2.0.0- License
- MIT
- Author
- Caspian Baska
- Target
pocfrom src/example/main.cr
Dependencies
Runtime Dependencies
- etcd~> 1.2github: place-labs/crystal-etcd
- ulid~> 0.1github: place-labs/ulid
- hound-dog~> 2.6github: place-labs/hound-dog
- log_helper*github: spider-gazelle/log_helper
Development Dependencies
- ameba*github: crystal-ameba/amebadev
README
clustering
Clustering class implements simple clustering logic through etcd as a distributed consistent key-value store.
A on_stable callback is fired for the leader once the cluster has stabilized.
Running $ shards build will create a simple proof of concept app, run it with ./bin/poc
Usage
The stabilize : Array(NamedTuple(ip: String, port: Int32)) -> Void arg of Clustering defines the class's stabilization logic that is fired upon cluster join, leave, and election events.
The array of node data is all of the nodes in the cluster.
Implementation
A single etcd lease is granted per node so if a node drops out of the cluster, all associated key/values will expire from the cluster.
Watchfeeds
There are 4 etcd watchfeeds
- election: notify nodes still in cluster that there is no longer a leader
- readiness: propagate readiness against a cluster version
- version: set by leader when there's a change in cluster state, nodes must 'ready' themselves to this signal
- discovery: keeps track of nodes in etcd under a service namespace
Dependencies
- etcd
~> v3.3
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
3.1.1- Tagged
- Apr 19, 2021
- Commit
0ca09f948adb- Crystal
>= 0.35.1, < 2.0.0- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/place-labs/clustering
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 15, 2026
- Synced
- Aug 15, 2026
- Versions
- 20