{"id":19839348,"url":"https://github.com/redislabs/raft","last_synced_at":"2025-07-07T15:40:39.729Z","repository":{"id":37006215,"uuid":"122676777","full_name":"RedisLabs/raft","owner":"RedisLabs","description":"C implementation of the Raft Consensus protocol, BSD licensed","archived":false,"fork":false,"pushed_at":"2023-09-08T06:18:20.000Z","size":996,"stargazers_count":71,"open_issues_count":0,"forks_count":18,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-06T17:01:34.305Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RedisLabs.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":"2018-02-23T21:55:28.000Z","updated_at":"2025-03-31T21:01:31.000Z","dependencies_parsed_at":"2024-11-12T12:33:10.153Z","dependency_job_id":null,"html_url":"https://github.com/RedisLabs/raft","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedisLabs%2Fraft","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedisLabs%2Fraft/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedisLabs%2Fraft/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedisLabs%2Fraft/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RedisLabs","download_url":"https://codeload.github.com/RedisLabs/raft/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251932513,"owners_count":21667157,"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-12T12:21:56.738Z","updated_at":"2025-05-01T19:30:18.195Z","avatar_url":"https://github.com/RedisLabs.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Daily CI](https://github.com/RedisLabs/raft/actions/workflows/daily.yml/badge.svg)](https://github.com/RedisLabs/raft/actions/workflows/daily.yml)\n[![codecov](https://codecov.io/gh/RedisLabs/raft/branch/master/graph/badge.svg?token=66M19HJ7K9)](https://codecov.io/gh/RedisLabs/raft)\n\nA complete implementation of the [Raft Consensus Algorithm](https://raft.github.io) as a C library, licensed under BSD.\n\nThis is a fork of the original library created by Willem-Hendrik Thiart, which is now actively maintained by Redis Ltd. and used as part of [RedisRaft](https://github.com/redislabs/redisraft).\n\nSee [raft.h](https://github.com/redislabs/raft/blob/master/include/raft.h) for full API documentation.\n\nMain Features\n=============\n\nThe library implements all basic features of Raft as well as some extensions, including:\n\n* Leader election\n* Log replication and FSM interface\n* Compaction and snapshot support\n* Cluster membership changes\n* Quorum check and step-down by leader\n* Pre-vote\n* Leadership transfer\n\nThe library is completely abstract and it is up to the caller to implement things like:\n* RPC and networking\n* Log storage and access\n* Generation of snapshots from FSM state\n\nGetting Started\n===============\n\nTo build and run basic tests:\n\n```\nmake tests\n```\n\nIf you prefer, you can also use cmake:\n\n```\nmkdir build\ncd build\ncmake ..\nmake\nmake test\n```\n\nTests\n=====\n\nThe library uses the following testing methods:\n\n* A simulator (virtraft2) is used to test the Raft invariants on unreliable networks\n* All bugs have regression tests\n* Many unit tests\n\nvirtraft2\n---------\n\nThis cluster simulator checks the following:\n\n* Log Matching (servers must have matching logs)\n* State Machine Safety (applied entries have the same ID)\n* Election Safety (only one valid leader per term)\n* Current Index Validity (does the current index have an existing entry?)\n* Entry ID Monotonicity (entries aren't appended out of order)\n* Committed entry popping (committed entries are not popped from the log)\n* Log Accuracy (does the server's log match mirror an independent log?)\n* Deadlock detection (does the cluster continuously make progress?)\n\nChaos generated by virtraft2:\n\n* Random bi-directional partitions between nodes\n* Message dropping\n* Message duplication\n* Membership change injection\n* Random compactions\n\nRun the simulator using:\n\n```\nmkdir .env\nvirtualenv .env\nsource .env/bin/activate\npip install -r tests/requirements.txt\nmake test_virtraft\n```\n\nRequirements\n---------\n* Python 3.9 or later","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredislabs%2Fraft","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredislabs%2Fraft","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredislabs%2Fraft/lists"}