{"id":20909906,"url":"https://github.com/escalopa/raft-kv","last_synced_at":"2026-04-21T23:02:09.463Z","repository":{"id":261135333,"uuid":"857120265","full_name":"escalopa/raft-kv","owner":"escalopa","description":"A raft-based key-value store","archived":false,"fork":false,"pushed_at":"2025-01-03T21:55:49.000Z","size":298,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-19T15:20:04.570Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","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/escalopa.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":"2024-09-13T21:02:11.000Z","updated_at":"2025-01-03T21:55:52.000Z","dependencies_parsed_at":"2024-12-07T20:19:33.112Z","dependency_job_id":"fc7ddaa1-d485-4b01-a2d0-214022c8c511","html_url":"https://github.com/escalopa/raft-kv","commit_stats":null,"previous_names":["escalopa/raft-me-up"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/escalopa%2Fraft-kv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/escalopa%2Fraft-kv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/escalopa%2Fraft-kv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/escalopa%2Fraft-kv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/escalopa","download_url":"https://codeload.github.com/escalopa/raft-kv/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243301122,"owners_count":20269286,"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","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":"2024-11-18T14:13:11.776Z","updated_at":"2025-12-28T23:18:47.328Z","avatar_url":"https://github.com/escalopa.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# raft-kv 🗃️\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/escalopa/raft-kv)](https://goreportcard.com/report/github.com/escalopa/raft-kv)\n[![GitHub issues](https://img.shields.io/github/issues/escalopa/raft-kv.svg)](https://github.com/escalopa/raft-kv/issues)\n[![GitHub pull requests](https://img.shields.io/github/issues-pr/escalopa/raft-kv.svg)](https://github.com/escalopa/raft-kv/pulls)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nA **raft** based **key-value** store.\n\n![UI](./static/demo.png)\n\n## Motivation 💫\n\n- Learn Raft in depth\n\n## Demo ❤️‍🔥\n\n**[YOUTUBE](https://youtu.be/01LryhHyKDk)**\n\n## Prerequisites 📚\n\n- [task](https://taskfile.dev/#/installation)\n- [docker-compose](https://docs.docker.com/compose/install/)\n\n## Run 🚀\n\nStart the raft cluster\n\n```bash\ntask docker-up\n```\n\nStart the UI\n\n```bash\ntask ui\n```\n\n### Endpoint 🧭\n\n| App       | Endpoint                |\n|-----------|-------------------------|\n| UI        | \u003chttp://localhost:3000\u003e |\n| Dozzle    | \u003chttp://localhost:8080\u003e |\n| Portainer | \u003chttp://localhost:9000\u003e |\n\n## API 📖\n\n- [raft](./api/raft/raft.proto)\n- [kv](./api/kv/kv.proto)\n\n## Config ⚙️\n\n**[2X]** = Value used in the code is randomly selected within the interval [VALUE, 2 * VALUE).\n\n| Config                      | Description                                                                                                              | Default     |\n|-----------------------------|--------------------------------------------------------------------------------------------------------------------------|-------------|\n| LOG_LEVEL                   | The log level for the zap logger                                                                                         | INFO        |\n| RAFT_ID                     | Unique node identifier within the cluster                                                                                | NULL        |\n| RAFT_CLUSTER                | Comma-separated list of servers in the format `[RAFT_ID@HOST:PORT]`                                                      | NULL        |\n| RAFT_REQUEST_VOTE_TIMEOUT   | Timeout (in ms) for the gRPC RequestVote method                                                                          | 150         |\n| RAFT_APPEND_ENTRIES_TIMEOUT | Timeout (in ms) for the gRPC AppendEntries method                                                                        | 150         |\n| RAFT_COMMIT_PERIOD          | Interval (in ms) at which committed messages are applied to the state machine **[2X]**                                   | 50          |\n| RAFT_START_DELAY            | Initial delay (in ms) before starting the Raft protocol, allowing time for cluster nodes to initialize **[2X]**          | 1500        |\n| RAFT_ELECTION_TIMEOUT       | Duration (in ms) to wait for a leader's heartbeat before transitioning to candidate state **[2X]**                       | 300         |\n| RAFT_STALE_PERIOD           | Maximum duration (in ms) between the leader's contact with a follower before declaring the follower unreachable **[2X]** | 200         |\n| RAFT_HEARTBEAT_PERIOD       | Frequency (in ms) of heartbeat messages sent to followers **[2X]**                                                       | 50          |\n| RAFT_HEARTBEAT_BATCH_SIZE   | Maximum number of log entries to include in a single heartbeat message                                                   | 10000       |\n| BADGER_ENTRY_PATH           | Filesystem path for storing the Raft log entries                                                                         | /data/entry |\n| BADGER_STATE_PATH           | Filesystem path for storing the Raft protocol state                                                                      | /data/state |\n| BADGER_KV_PATH              | Filesystem path for storing the key-value state machine data                                                             | /data/kv    |  \n\n---\n\n![Alt](https://repobeats.axiom.co/api/embed/e5c91d2fd6b283c642a7088217bb805553f0b974.svg \"analytics-image\")\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fescalopa%2Fraft-kv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fescalopa%2Fraft-kv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fescalopa%2Fraft-kv/lists"}