{"id":15824196,"url":"https://github.com/sjefvanleeuwen/orleans-morstead-etcd","last_synced_at":"2025-08-16T15:17:36.573Z","repository":{"id":115780495,"uuid":"273884453","full_name":"sjefvanleeuwen/orleans-morstead-etcd","owner":"sjefvanleeuwen","description":"A persistent storage provider for Microsoft Orleans that scales on clusters. It is based on etcd.","archived":false,"fork":false,"pushed_at":"2020-07-13T19:15:56.000Z","size":525,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-24T02:02:31.735Z","etag":null,"topics":["c-sharp","cluster","clusters","csharp","etcd","key-value","orleans","persistance","persistence","persistence-layer","storage"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sjefvanleeuwen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2020-06-21T10:47:12.000Z","updated_at":"2024-09-11T10:03:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"9d137127-1cf7-4d5c-b417-7581b219aaf5","html_url":"https://github.com/sjefvanleeuwen/orleans-morstead-etcd","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/sjefvanleeuwen/orleans-morstead-etcd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjefvanleeuwen%2Forleans-morstead-etcd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjefvanleeuwen%2Forleans-morstead-etcd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjefvanleeuwen%2Forleans-morstead-etcd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjefvanleeuwen%2Forleans-morstead-etcd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sjefvanleeuwen","download_url":"https://codeload.github.com/sjefvanleeuwen/orleans-morstead-etcd/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjefvanleeuwen%2Forleans-morstead-etcd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270729239,"owners_count":24635391,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-16T02:00:11.002Z","response_time":91,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["c-sharp","cluster","clusters","csharp","etcd","key-value","orleans","persistance","persistence","persistence-layer","storage"],"created_at":"2024-10-05T08:40:44.577Z","updated_at":"2025-08-16T15:17:36.532Z","avatar_url":"https://github.com/sjefvanleeuwen.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Morstead etcd Orleans Storage Provider\n\u003cdiv align=center\u003e\n\u003cimg src=\"doc/img/orleans-logo-full.png\" alt=\"morstead\" width=\"200\"/\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\n\u003cimg src=\"doc/img/morstead.svg\" alt=\"morstead\" width=\"300\"/\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\n\u003cimg src=\"doc/img/etcd-stacked-color.svg\" alt=\"morstead\" width=\"60\"/\u003e\n\u003c/div\u003e\n\u003cbr/\u003e\n\n[![nuget](https://img.shields.io/nuget/v/Orleans.Persistence.Morstead.Etcd)](https://www.nuget.org/packages/Orleans.Persistence.Morstead.Etcd/)\n![.NET Core](https://github.com/sjefvanleeuwen/orleans-morstead-etcd/workflows/.NET%20Core/badge.svg)\n\n## What is it?\n\nA persistent storage provider for Microsoft Orleans that scales on clusters. It is based on etcd. \n\netcd is a distributed key value store that provides a reliable way to store data across a cluster of machines. It’s open-source and available on GitHub. etcd gracefully handles leader elections during network partitions and will tolerate machine failure, including the leader.\n\nYour applications can read and write data into etcd. A simple use-case is to store database connection details or feature flags in etcd as key value pairs. These values can be watched, allowing your app to reconfigure itself when they change.\n\nAdvanced uses take advantage of the consistency guarantees to implement database leader elections or do distributed locking across a cluster of workers.\n\netcd has a focus on being:\n\n* Simple: well-defined, user-facing API (gRPC)\n* Secure: automatic TLS with optional client cert authentication\n* Fast: benchmarked 10,000 writes/sec\n* Reliable: properly distributed using Raft\n\n## Status\n\nThe current MVP provides the following:\n\n* Single Node etcd, tested using a unittest. It is in early alpha stage but should be usable.\n\n**Grain Persistence**\n* ReadStateAsync\n* WriteStateAsync\n* ~~ClearStateAsync~~ (soon)\n\nThe next items that will be worked on in the roadmap (ordered by priority):\n\n* Reminders storage provider\n* Cluster storage provider\n\nItems that might be worked on in the future but not on the roadmap:\n\n* Transactions\n* Stream providers\n\nThis project is open to pull requests.\n\n## Setup\n\nThe setup comparable to other orleans storage providers and is build using .NET Standard 2.0.3\n\n### Install nuget package\n\n```\ndotnet add package Orleans.Persistence.Morstead.Etcd --version 0.0.1-alpha\n```\nor visit the nuget for other options on: https://www.nuget.org/packages/Orleans.Persistence.Morstead.Etcd\n\n### Adding the provider to your project\n\nconfiguration single node (default etcd settings) for development.\n```csharp\npublic void Configure(ISiloBuilder siloBuilder)\n{\n    siloBuilder\n        .AddMorsteadEtcdGrainStorage(name: \"storage\",options=\u003e {\n            // etcd nodes\n            options.ConnectionString = \"http://localhost:2379\";\n        });\n}\n```\n\nconfiguration example multiple nodes (default etcd settings) for horizontal scale-out.\n```csharp\npublic void Configure(ISiloBuilder siloBuilder)\n{\n    siloBuilder\n        .AddMorsteadEtcdGrainStorage(name: \"storage\",options=\u003e {\n            // etcd nodes\n            options.ConnectionString = \"https://localhost:23790,https://localhost:23791,https://localhost:23792\";\n        });\n}\n```\n\n### Setup an etcd cluster\n\nFor testing and development deployments, the quickest and easiest way is to set up a [local cluster](https://etcd.io/docs/v3.1.12/dev-guide/local_cluster/). For a production deployment, refer to the [clustering](https://etcd.io/docs/v3.1.12/op-guide/clustering/) section.\n\n#### Windows setup single node\n\nThis package installs etcd as a service, and makes etcdctl (the command line client) available in the path.\nThe default port when starting etcd is 2379. Note: this is an unsecure setup without CA's.\n\n```\nExample: choco install etcd -y\"\n```\n\n##### Open a Powershell\n\n```powershell\nPS C:\\ProgramData\\etcd\u003e ./etcd\n[WARNING] Deprecated '--logger=capnslog' flag is set; use '--logger=zap' flag instead\n2020-06-21 11:58:52.465423 I | etcdmain: etcd Version: 3.4.9\n2020-06-21 11:58:52.468424 I | etcdmain: Git SHA: 54ba95891\n2020-06-21 11:58:52.469422 I | etcdmain: Go Version: go1.12.17\n2020-06-21 11:58:52.469422 I | etcdmain: Go OS/Arch: windows/amd64\n2020-06-21 11:58:52.469422 I | etcdmain: setting maximum number of CPUs to 12, total number of available CPUs is 12\n2020-06-21 11:58:52.470423 N | etcdmain: failed to detect default host (default host not supported on windows_amd64)\n2020-06-21 11:58:52.471452 W | etcdmain: no data-dir provided, using default data-dir ./default.etcd\n[WARNING] Deprecated '--logger=capnslog' flag is set; use '--logger=zap' flag instead\n2020-06-21 11:58:52.478453 I | embed: name = default\n2020-06-21 11:58:52.479426 I | embed: data dir = default.etcd\n2020-06-21 11:58:52.479426 I | embed: member dir = default.etcd\\member\n2020-06-21 11:58:52.479426 I | embed: heartbeat = 100ms\n2020-06-21 11:58:52.479426 I | embed: election = 1000ms\n2020-06-21 11:58:52.481423 I | embed: snapshot count = 100000\n2020-06-21 11:58:52.481423 I | embed: advertise client URLs = http://localhost:2379\n2020-06-21 11:58:52.494452 I | wal: releasing file lock to rename \"default.etcd\\\\member\\\\wal.tmp\" to \"default.etcd\\\\member\\\\wal\"\n2020-06-21 11:58:52.505426 I | etcdserver: starting member 8e9e05c52164694d in cluster cdf818194e3a8c32\nraft2020/06/21 11:58:52 INFO: 8e9e05c52164694d switched to configuration voters=()\nraft2020/06/21 11:58:52 INFO: 8e9e05c52164694d became follower at term 0\nraft2020/06/21 11:58:52 INFO: newRaft 8e9e05c52164694d [peers: [], term: 0, commit: 0, applied: 0, lastindex: 0, lastterm: 0]\nraft2020/06/21 11:58:52 INFO: 8e9e05c52164694d became follower at term 1\nraft2020/06/21 11:58:52 INFO: 8e9e05c52164694d switched to configuration voters=(10276657743932975437)\n2020-06-21 11:58:52.513424 W | auth: simple token is not cryptographically signed\n2020-06-21 11:58:52.523424 I | etcdserver: starting server... [version: 3.4.9, cluster version: to_be_decided]\n2020-06-21 11:58:52.523424 E | etcdserver: cannot monitor file descriptor usage (cannot get FDUsage on windows)\n2020-06-21 11:58:52.524423 I | etcdserver: 8e9e05c52164694d as single-node; fast-forwarding 9 ticks (election ticks 10)\nraft2020/06/21 11:58:52 INFO: 8e9e05c52164694d switched to configuration voters=(10276657743932975437)\n2020-06-21 11:58:52.525426 I | etcdserver/membership: added member 8e9e05c52164694d [http://localhost:2380] to cluster cdf818194e3a8c32\n2020-06-21 11:58:52.525426 I | embed: listening for peers on 127.0.0.1:2380\nraft2020/06/21 11:58:53 INFO: 8e9e05c52164694d is starting a new election at term 1\nraft2020/06/21 11:58:53 INFO: 8e9e05c52164694d became candidate at term 2\nraft2020/06/21 11:58:53 INFO: 8e9e05c52164694d received MsgVoteResp from 8e9e05c52164694d at term 2\nraft2020/06/21 11:58:53 INFO: 8e9e05c52164694d became leader at term 2\nraft2020/06/21 11:58:53 INFO: raft.node: 8e9e05c52164694d elected leader 8e9e05c52164694d at term 2\n2020-06-21 11:58:53.517425 I | etcdserver: setting up the initial cluster version to 3.4\n2020-06-21 11:58:53.519428 N | etcdserver/membership: set the initial cluster version to 3.4\n2020-06-21 11:58:53.519428 I | embed: ready to serve client requests\n2020-06-21 11:58:53.521427 I | etcdserver: published {Name:default ClientURLs:[http://localhost:2379]} to cluster cdf818194e3a8c32\n2020-06-21 11:58:53.521427 I | etcdserver/api: enabled capabilities for version 3.4\n2020-06-21 11:58:53.521427 N | embed: serving insecure client requests on 127.0.0.1:2379, this is strongly discouraged!\n```\n\n## Notes\n\nThe configuration options are subject to change in next releases.\n\n## Performance of etcd\n\nTaken from an article from Core.OS, some performance comparisons are available on how etcd measures\nup agains Consul and Gatekeeper. \n\n*Note: The following information is measured in 2017 and taken from source: https://coreos.com/blog/performance-of-etcd.html*\n\n### Disk bandwidth\n\nThe chart below shows how scaling client concurrency impacts disk writes.\n\n![disk-bandwidth](./doc/img/etcd/2017Q1-00-sector-writes-1M.png)\n\n### Network\n\nThe chart below shows total network utilization for all servers and clients. For the most part, etcd has the lowest network usage, aside from Consul clients receiving slightly less data.\n\n![network](./doc/img/etcd/2017Q1-00-network-traffic-1M.png)\n\n### CPU\n\nThe graph below shows the server CPU utilization when scaling clients. etcd CPU utilization scales as expected both on average and for maximum load; as more connections are added, CPU load increases in turn.\n\n![client-scaling](./doc/img/etcd/2017Q1-00-cpu-1M-client-scaling.png)\n\n### Memory\n\nThe graph below shows the effect of adding more keys into a cluster on its total memory footprint. Most notably, etcd uses less than half the amount of memory as Zookeeper or Consul once an appreciable number of keys are in the store. \n\n![memory](./doc/img/etcd/2017Q1-00-memory-1M-by-key.png)\n\n### Latency distribution\n\nGiven the best throughput for the store, the latency should be at a local minima and stable; queuing effects will delay additional concurrent operations. Likewise, ideally latencies would remain low and stable as total keys increases; if requests become unpredictable, there may be cascading timeouts, flapping monitoring alerts, or failures. However, judging by the latency measurements shown below, only etcd has both the lowest average latencies and tight, stable bounds at scale.\n\n![latency](./doc/img/etcd/2017Q1-00-latency-1M.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsjefvanleeuwen%2Forleans-morstead-etcd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsjefvanleeuwen%2Forleans-morstead-etcd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsjefvanleeuwen%2Forleans-morstead-etcd/lists"}