Use the same executable for a single node, a replicated cluster, or a Kubernetes
StatefulSet. Select the topology with environment variables. Every setup uses
port 7200 for the binary protocol and port 8080 for the web UI, REST API,
and /healthz. Graph entities and Cypher queries use the same ring and ports
as key/value operations.
Single node
A single-node deployment has a durable log and its own web console. Use it for local development, small services, and edge devices.
bin/scalaxy --address 127.0.0.1:7200 --http-address 127.0.0.1:8080
# or with Docker:
docker run -p 8080:8080 -p 7200:7200 -v scalaxy-data:/var/lib/scalaxy scalaxy
Cluster
A ring of N nodes. Each key is owned by exactly one node (consistent hashing with virtual nodes); writes replicate synchronously to the next node in ring order, and reads fail over to replica holders when an owner is unreachable.
export SCALAXY_PEERS="node-0=scalaxy-0:7200:8080,node-1=scalaxy-1:7200:8080,node-2=scalaxy-2:7200:8080"
export SCALAXY_REPLICATE_TO="node-1=scalaxy-1:7200"
degraded until the node rejoins.Kubernetes
A StatefulSet of three replicas with stable pod identity (scalaxy-0 … scalaxy-2), one PersistentVolumeClaim per node, and peer discovery through a headless service. Readiness and liveness probes hit /healthz; the whole thing runs as a non-root user.
kubectl apply -f deploy/kubernetes/scalaxy.yaml
kubectl -n scalaxy port-forward svc/scalaxy 8080:80 # web console
See the Kubernetes guide for the full manifest walkthrough.