{"id":29228414,"url":"https://github.com/restatedev/distributed-restate-announcement-demos","last_synced_at":"2026-02-14T07:31:26.773Z","repository":{"id":278158978,"uuid":"931626209","full_name":"restatedev/distributed-restate-announcement-demos","owner":"restatedev","description":"This repository contains a set of demos and experiments around Restate's distributed deployments.","archived":false,"fork":false,"pushed_at":"2025-02-18T13:06:09.000Z","size":8,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-03T10:11:42.647Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/restatedev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-12T15:40:05.000Z","updated_at":"2025-03-02T15:37:25.000Z","dependencies_parsed_at":"2025-02-18T10:35:17.255Z","dependency_job_id":"dc037497-5ab0-467d-9234-768d69d3ea35","html_url":"https://github.com/restatedev/distributed-restate-announcement-demos","commit_stats":null,"previous_names":["restatedev/distributed-restate-announcement-demos"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/restatedev/distributed-restate-announcement-demos","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/restatedev%2Fdistributed-restate-announcement-demos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/restatedev%2Fdistributed-restate-announcement-demos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/restatedev%2Fdistributed-restate-announcement-demos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/restatedev%2Fdistributed-restate-announcement-demos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/restatedev","download_url":"https://codeload.github.com/restatedev/distributed-restate-announcement-demos/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/restatedev%2Fdistributed-restate-announcement-demos/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29439492,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T07:24:13.446Z","status":"ssl_error","status_checked_at":"2026-02-14T07:23:58.969Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-03T10:10:53.112Z","updated_at":"2026-02-14T07:31:26.768Z","avatar_url":"https://github.com/restatedev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Restate 1.2 Announcement Demos: Distributed Restate\n\nThis repository contains two demos showcasing distributed deployments with Restate. \nThe first one demonstrates high availability, and the second one shows how to scale up from a single node to a cluster, and reconfigure clusters on the fly.\n\n## Prerequisites\nYou need the following tools installed:\n- Node.js and npm to run the TypeScript services used in this demo. \n- Docker and Docker Compose to run the Restate cluster.\n\n## Demo 1: High Availability Demo\n\nThis demo shows how Restate can handle node failures and still be available for writes.\nIt also shows how the cluster recovers when the nodes are brought back up, maintaining consistency at all times.\nFinally, it shows how the cluster stalls when there are not enough nodes available to maintain the replication factor.\n\n### Pre-demo setup\n\nInstall the npm dependencies and start the service:\n```shell\nnpm install \u0026\u0026 npm run app-dev\n```\n\nGo to the folder with the docker compose file for this demo and start the Restate cluster:\n```shell\ncd availability-demo\ndocker compose up\n```\n\nRegister the service\n```shell\nrestate deployments register http://host.docker.internal:9080\n```\nYou can also do this via the UI at http://localhost:9070, if you don't have the CLI installed.\n\nStart the three counter clients in three different terminal windows, to start sending requests:\n```shell\nnpm run client\n```\nThis client will try sending requests to node1 by default. If this node is down, it tries node2, and then node3.\n\n```shell\nnpm run client2\n```\nThis client will try sending requests to node2 by default. If this node is down, it tries node3, and then node1.\n```shell\nnpm run client3\n```\nThis client will try sending requests to node3 by default. If this node is down, it tries node1, and then node2.\n\n**Note:** in a real-world scenario, you would have a load balancer in front of the nodes, and the clients would be configured to send requests to the load balancer.\nFor the sake of the demo, to show clearly which node is down, we are using the clients to send requests to specific nodes.\n\n### Demo\nCheck the partitioning and leaders per partition:\n\n```shell\ndocker compose exec node1 restatectl status\n```\nYou can use `restatectl status` if you have `restatectl` installed locally.\n\nHave a look at a partition that has node3 as the leader. \nWe will now kill this node and see how the leader changes. \nThe cluster maintains write availability, since the replication factor is 2, and there are still two nodes available.\n\n```shell\ndocker compose kill node3\n```\n\nCheck how the leaders changed for the partitions that before had node3 as leader:\n\n```shell\ndocker compose exec node1 restatectl status\n```\n\nRestart the node:\n```shell\ndocker compose restart node3\n```\n\nYou will see that the node becomes available again and gets added to the cluster. \n\nNow kill two nodes and to see how the cluster stalls when we lose write availability (# nodes \u003c replication factor):\n\n```shell\ndocker compose kill node2\ndocker compose kill node3\n```\n\nBring back the nodes, and see how the cluster recovers and starts processing again:\n\n```shell\ndocker compose restart node2\ndocker compose restart node3\n```\n\n## Demo 2: Scale up from one node to a cluster\n\nThis demo shows how to scale up a Restate deployment from a single node to a cluster, and how to reconfigure the cluster on the fly.\n\n### Pre-demo setup\n\nInstall the npm dependencies and start the service:\n```shell\nnpm install \u0026\u0026 npm run app-dev\n```\n\nGo to the folder with the docker compose file for this demo and start the first node of the Restate cluster:\n\n```shell\ncd scale-demo\ndocker compose up -d node1\n```\n\nRegister the service\n```shell\nrestate deployments register http://host.docker.internal:9080\n```\nYou can also do this via the UI at http://localhost:9070, if you don't have the CLI installed.\n\nStart the counter client in a different terminal window, to start sending requests:\n```shell\nnpm run client\n```\n\n### Demo\n\nShow the status:\n```shell\ndocker compose exec node1 restatectl status\n```\nYou can use `restatectl status` if you have `restatectl` installed locally.\n\nSpin up the other nodes:\n\n```shell\ndocker compose up -d node2\n```\n\n```shell\ndocker compose up -d node3\n```\n\nReconfigure the cluster to have log replication set to 2:\n```shell\ndocker compose exec node1 restatectl config set --log-replication 2\n```\n\nShow that these new nodes joined the cluster:\n```shell\ndocker compose exec node1 restatectl status\n```\nRerun until applied-lsn is the same, or 1 less, for all nodes.\n\n\nThen kill node1:\n```shell\ndocker compose kill node1\n```\n\nShow that the cluster is still available and that the leaders have changed:\n```shell\ndocker compose exec node2 restatectl status\n```\nNote that this command is pointed at node2, since node1 is down.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frestatedev%2Fdistributed-restate-announcement-demos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frestatedev%2Fdistributed-restate-announcement-demos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frestatedev%2Fdistributed-restate-announcement-demos/lists"}