#message-broker #pub-sub #data #orchestration #base

bin+lib worterbuch-cluster-orchestrator

An orchestrator for running Wörterbuch as a distributed cluster

14 stable releases

Uses new Rust 2024

new 1.3.4 Apr 1, 2025
1.3.3 Mar 30, 2025
1.1.2 Feb 28, 2025

#1376 in Database interfaces

Download history 371/week @ 2025-02-25 385/week @ 2025-03-04 626/week @ 2025-03-11 18/week @ 2025-03-18 92/week @ 2025-03-25 140/week @ 2025-04-01

886 downloads per month

AGPL-3.0-or-later

105KB
2.5K SLoC

Rust 2K SLoC // 0.1% comments Pan 426 SLoC Shell 99 SLoC // 0.1% comments

Wörterbuch Cluster Orchestrator

This is the orchestration layer of a Wörterbuch server cluster. It takes care of leader election and putting the node it manages in the correct mode as required.

The orchestrator offers the following endpoints (in addition to worterbuch's usual client end points):

  • a UDP port through which it receives and sends the leader election and heartbeat messages to the other nodes
  • a REST endpoint from which clients can request the current leader configuration

Wörterbuch can be started in two modes, leader or follower mode.

In leader mode it loads its state from disk on startup and offers its regular client API end points, plus an additional TCP socket to which followers connect to receive the leader's current state + any subsequent state changes for state replication.

In follower mode worterbuch does not load state from disk, instead it connects to the leader's TCP port and receives the leader's state through it. It also does not accept any client connection, but instead receives any state changes directly from the leader directly through the same TCP connection. If the TCP connection fails, the follower must immediately shut down.

Dependencies

~24–40MB
~637K SLoC