MuteBefehl Wiki

Cluster

Several machines working as one network.

One node is the leader and decides, the others are workers and execute.

Setting it up

On the leader the defaults are sufficient; the API only has to be reachable for the workers:

mutecloud.toml (leader)
[api]
bind = "0.0.0.0:8770"
token = "shared-secret"

On every worker:

mutecloud.toml (worker)
[cluster]
role = "worker"
leader = "10.0.0.1:8770"
token = "shared-secret"
advertise = "10.0.0.2"

advertise is the address under which the game servers of this node are reachable. The proxy connects to that address.

The cluster connection is expected to remain inside a private network. If the leader is reachable under a public address, prefix it with a scheme: leader = "https://cloud.example.com" uses TLS for both the WebSocket and the template transfer. Without TLS a worker transmits its token only to addresses in private ranges; otherwise the synchronisation aborts with an explicit error.

Where things live

The leader owns groups, ranks, roles, tokens, network texts and the shared storage. A worker forwards any request concerning them to the leader, so administration is possible from any node.

Templates are pulled by each worker. It compares its revision with the leader every thirty seconds, downloads only what has changed, unpacks the archive next to the existing copy and swaps the directories afterwards. If a transfer fails, the previous template remains in place.

Placement

Groups run on every node unless told otherwise:

nodes = ["node-1"]

Placement of a new server follows the available memory. If no node has enough, the log reports it at most once every five minutes.

node          state of this node
node list     all nodes with memory and server count
node reload   re-read the configuration

When a node loses its connection, the webhook reports it and the players of that proxy are removed from the player list.

On this page