Packages
cloister
0.4.2
0.18.1
0.18.0
0.17.3
0.17.2
0.17.1
0.17.0
0.16.0
0.15.0
0.14.0
0.13.0
0.12.5
0.12.4
0.12.3
0.12.2
0.12.1
0.12.0
0.11.0
0.10.3
0.10.2
0.10.1
0.10.0
0.9.0
0.8.0
0.7.5
0.7.4
0.7.3
0.7.2
0.7.1
0.7.0
0.6.5
0.6.4
0.6.3
retired
0.6.2
retired
0.6.1
retired
0.6.0
retired
0.5.0
0.4.4
0.4.3
0.4.2
0.4.1
0.4.0
0.3.9
0.3.8
0.3.7
0.3.6
0.3.5
0.3.4
0.3.3
0.3.2
0.3.1
0.3.0
0.2.2
0.2.1
0.2.0
0.1.4
0.1.3
0.1.2
0.1.1
0.1.0
The helper application to manage cluster, that uses hash ring to route requests to nodes. Automatically keeps track of connected nodes, provides helpers to determine where the term is to be executed, to multicast to all the nodes in the cluster and to retrieve current state of the cluster.
Current section
Files
Jump to
Current section
Files
stuff/configuration.md
# Cloister Configuration
_Cloister_ is another cluster support library that aims to be a drop-in for cluster support in distributed environment.
It relies mainly on configuration because it’s started as a separate application _before_ the main _OTP_ application that uses it and relies on startup phases to block until the consensus is reached. For the very fine tuning, one might put `:cloister` into `:included_applications` _and_ embed `Cloister.Manager` manually into the supervision tree. See `Cloister.Application.start_phase/3` for the inspiration on how to wait till consensus is reached.
On a bird view, the config might look like:
```elixir
config :cloister,
# OTP application this cloister runs for
otp_app: :my_app, # default: :cloister
# the way the cloister knows how to build cluster
sentry: :"cloister.local", # service name
# or node list (default `[node()]`)
# sentry: ~w[c1@127.0.0.1 c2@127.0.0.1]a
# number of nodes to consider consensus
consensus: 3, # default
# listener to be called when the ring is changed
listener: MyApp.Listener, # default: Stub
# monitor to handle ring changes
monitor: MyApp.Monitor, # default: Stub
# monitor options to pass to a monitor when created
monitor_opts: [
name: MyMonitor # default: monitor.name
]
# additional modules to include into `Manager`’s supervision tree
additional_modules: [Cloister.Void], # useful for tests / dev
# the name of the `HashRing` to be used
# if set, the _HashRing_ is assumed to be managed externally
ring: :cloister, # default
# manager configuration, used when cloister app is not started
manager: [
name: Cloister.Manager, # default
state: [
otp_app: :my_app, # default: :cloister
additional_modules: [] # additional modules as above
]
]
```