1
Deploy the Restate cluster using Docker
To deploy a 3-node distributed Restate cluster, create a file The cluster uses the
docker-compose.yml
and run docker compose up
.docker-compose.yml
replicated
Bifrost provider and replicates log writes to a minimum of two nodes.
Since we are running with 3 nodes, the cluster can tolerate one node failure without becoming unavailable.
By default, partition state is replicated to all workers (though each partition has only one acting leader at a time).The replicated
metadata cluster consists of all nodes since they all run the metadata-server
role.
Since the replicated
metadata cluster requires a majority quorum to operate, the cluster can tolerate one node failure without becoming unavailable.Take a look at the cluster deployment documentation for more information on how to configure and deploy a distributed Restate cluster.In this example we also deployed a Minio server to host the cluster snapshots bucket. Visit Snapshots to learn more about whis is strongly recommended for all clusters.2
Check the cluster status
You can check the status of the cluster by running the
restatectl status
command on any of the started Restate servers.
Note, it might take a few seconds until the cluster has fully started and the status is available.3
Start a local Restate service
Follow the Quickstart guide to create a simple Restate service.
4
Register the service endpoint
You can register the service endpoint at any of the started Restate nodes since they all run the Or alternatively you can open the Restate UI at http://localhost:9080 and register the service endpoint there.
admin
role.5
Invoke the service
You can invoke the registered service at any of the started Restate nodes since they all run the ingress.
6
Kill and restart Restate servers
Try killing and restarting one of the Restate nodes and see how the cluster reacts.
7
Create snapshots
Try instructing the partition processors to create a snapshot of their state in the object store bucket:Navigate to the Minio console at http://localhost:9000 and browse the bucket contents (default credentials:
minioadmin
/minioadmin
).8
🎉Congratulations, you managed to run your first distributed Restate cluster and simulated some failures!
- Try to configure a 5-node Restate cluster that can tolerate up to two node failures.
- Trim the logs (either manually, or by setting up automatic trimming) before adding more nodes.
- Try to deploy a 3-node Restate cluster using Kubernetes.