Consistent-hashing token range coordinator for StackSaga microservice transaction retries.
292
StackSaga Ring Coordinator is the dedicated infrastructure service responsible for coordinating 64-bit Murmur3 consistent-hashing token ranges across microservice orchestrator instances (Retry Nodes) in the StackSaga distributed transaction ecosystem.
Instead of building and maintaining a custom Spring Boot application, developers and DevOps teams can run this pre-built, production-grade official image directly.
| Tag | Base OS | C Library | Recommended Use |
|---|---|---|---|
stacksaga/ring-coordinator:alpinestacksaga/ring-coordinator:<version>-alpine | Alpine Linux | musl | Lightweight (Default): Rapid startup and minimal image footprint (~180MB). Recommended for dev, test, and resource-constrained environments. |
stacksaga/ring-coordinator:lateststacksaga/ring-coordinator:<version> | Ubuntu Jammy | glibc | Enterprise Production: 100% compatible with APM profilers (Dynatrace, Datadog, New Relic) and native Netty epoll performance. |
Every component in the StackSaga retry subsystem relies on synchronized clocks for time-windowed token partition grants:
TZ=Etc/UTC by default.chrony, systemd-timesyncd, or cloud NTP).The Ring Coordinator includes a built-in real-time dashboard and observability endpoints to monitor live cluster activities, connected slave nodes, token range allocations, and connected retry nodes:
| Endpoint | Format | Description |
|---|---|---|
/dashboard (or /) | HTML | Interactive real-time web dashboard displaying live cluster topology, active slave nodes, assigned token ranges, and connected retry nodes. |
/banner (or /) | Plain Text | ASCII status banner providing instant cluster diagnostics via curl in terminal or CI/CD scripts. |
/api/live/stream | text/event-stream | Reactive Server-Sent Events (SSE) stream emitting real-time cluster state updates every second. |
/api/live/snapshot | JSON | Instant JSON snapshot of live coordinator state, slave connections, and token ranges. |
/actuator/health | JSON | Spring Boot Actuator health probe endpoint. |
/actuator/metrics | JSON | Performance and JVM runtime metrics. |
curl -s http://localhost:8080/banner
Master and Slave run embedded together inside a single container — ideal for local microservice development:
docker run -d \
--name ring-coordinator \
-p 7777:7777 \
-p 8080:8080 \
-e STACKSAGA_COORDINATOR_INSTANCE_TYPE=master,slave \
-e STACKSAGA_TARGET_SERVICES=* \
-e STACKSAGA_CLUSTER=dev-cluster \
-e STACKSAGA_REGION=default \
stacksaga/ring-coordinator:alpine
7777: RSocket TCP port (connect your application orchestrators here).8080: Live visual dashboard (http://localhost:8080/) and Actuator endpoints.docker-compose.yml:
services:
ring-coordinator:
image: stacksaga/ring-coordinator:alpine
container_name: stacksaga-ring-coordinator
ports:
- "7777:7777" # RSocket server (Microservices connect here)
- "8080:8080" # Live Dashboard & Health Endpoints
environment:
- TZ=Etc/UTC
- STACKSAGA_COORDINATOR_INSTANCE_TYPE=master,slave
- STACKSAGA_TARGET_SERVICES=*
- STACKSAGA_CLUSTER=dev-cluster
- STACKSAGA_REGION=default
volumes:
- /etc/localtime:/etc/localtime:ro
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/actuator/health"]
interval: 5s
timeout: 3s
retries: 10
start_period: 10s
restart: unless-stopped
Run with:
docker compose up -d
A single Master coordinates a dynamically scalable pool of Slaves.
docker-compose.scalable.yml:
services:
coordinator-master:
image: stacksaga/ring-coordinator:alpine
container_name: stacksaga-master
hostname: coordinator-master
ports:
- "7777:7777" # Master RSocket
- "8080:8080" # Master Live Dashboard
environment:
- TZ=Etc/UTC
- STACKSAGA_COORDINATOR_INSTANCE_TYPE=master
- STACKSAGA_TARGET_SERVICES=*
- STACKSAGA_CLUSTER=production-cluster
- STACKSAGA_REGION=default
volumes:
- /etc/localtime:/etc/localtime:ro
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/actuator/health"]
interval: 5s
timeout: 3s
retries: 10
start_period: 10s
restart: unless-stopped
coordinator-slave:
image: stacksaga/ring-coordinator:alpine
depends_on:
coordinator-master:
condition: service_healthy
environment:
- TZ=Etc/UTC
- STACKSAGA_COORDINATOR_INSTANCE_TYPE=slave
- STACKSAGA_TARGET_SERVICES=*
- STACKSAGA_CLUSTER=production-cluster
- STACKSAGA_REGION=default
- STACKSAGA_MASTER_HOST=coordinator-master
- STACKSAGA_MASTER_PORT=7777
volumes:
- /etc/localtime:/etc/localtime:ro
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/actuator/health"]
interval: 5s
timeout: 3s
retries: 10
start_period: 10s
restart: unless-stopped
Deploy with 3 Slaves:
docker compose -f docker-compose.scalable.yml up -d --scale coordinator-slave=3
Scale to 5 Slaves dynamically:
docker compose -f docker-compose.scalable.yml up -d --scale coordinator-slave=5
Note for Production: Switch
image: stacksaga/ring-coordinator:alpinetoimage: stacksaga/ring-coordinator:latestfor enterprise production deployments with APM profilers.
| Environment Variable | Property Name | Default | Description |
|---|---|---|---|
STACKSAGA_COORDINATOR_INSTANCE_TYPE | stacksaga.coordinator.instance-type | master,slave | Role to run: master, slave, or master,slave (hybrid). |
STACKSAGA_TARGET_SERVICES | stacksaga.coordinator.target-services | * | Comma-separated target service names or * for all. |
STACKSAGA_INDEX_BASED | stacksaga.coordinator.deploy.index-based | false | Enable Kubernetes StatefulSet ordinal detection (Pod-0 is Master). |
STACKSAGA_MASTER_HOST | stacksaga.coordinator.slave.target-master.host | localhost | Master host for Slave nodes to connect to. |
STACKSAGA_MASTER_PORT | stacksaga.coordinator.slave.target-master.port | 7777 | Master port for Slave nodes to connect to. |
RSOCKET_PORT | spring.rsocket.server.port | 7777 | Port for the embedded RSocket TCP server. |
SERVER_PORT | server.port | 8080 | Port for the live dashboard and health endpoints. |
STACKSAGA_CLUSTER | stacksaga.instance.cluster | default-cluster | Virtual cluster identifier. |
STACKSAGA_REGION | stacksaga.instance.region | default | Deployment region identifier. |
STACKSAGA_COORDINATOR_DASHBOARD_ENABLED | stacksaga.coordinator.dashboard.enabled | true | Enable or disable the live visual dashboard and SSE stream. |
STACKSAGA_COORDINATOR_DASHBOARD_PATH | stacksaga.coordinator.dashboard.path | /dashboard | Base web path where the live HTML dashboard is served. |
STACKSAGA_COORDINATOR_DASHBOARD_EXPOSE_ROOT | stacksaga.coordinator.dashboard.expose-root | true | Expose dashboard & banner at root path (/). |
docker pull stacksaga/ring-coordinator:latest