https://github.com/ivanprodaiko94/raft-protocol-implementation-client
http client for raft
https://github.com/ivanprodaiko94/raft-protocol-implementation-client
consensus consensus-algorithm distributed distributed-systems raft raft-consensus raft-protocol ucu
Last synced: 6 months ago
JSON representation
http client for raft
- Host: GitHub
- URL: https://github.com/ivanprodaiko94/raft-protocol-implementation-client
- Owner: IvanProdaiko94
- Created: 2019-05-17T10:44:28.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-06-11T08:07:44.000Z (over 6 years ago)
- Last Synced: 2025-04-09T19:54:47.605Z (6 months ago)
- Topics: consensus, consensus-algorithm, distributed, distributed-systems, raft, raft-consensus, raft-protocol, ucu
- Language: Go
- Homepage: https://github.com/IvanProdaiko94/raft-protocol-implementation
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# raft-protocol-implementation
Raft protocol implementation as part of "Distributed databases" course in UCU## Raft decomposes the consensus problem into three relatively independent subproblems:
- **Leader election**: a new leader must be chosen when an existing leader fails.
- **Log replication**: the leader must accept log entries
- **Safety**: the key safety property for Raft is the State Machine Safety Property. If any server has applied a particular
log entry to its state machine, then no other server may apply a different command for the same log index. The solution involves an
additional restriction on the election mechanism.## Raft guarantees that each of these properties is true at all times.
- **Election Safety**: at most one leader can be elected in a given term.
- **Leader Append-Only**: a leader never overwrites or deletes entries in its log; it only appends new entries.
- **Log Matching**: if two logs contain an entry with the same index and term, then the logs are identical in all entries
up through the given index.
- **Leader Completeness**: if a log entry is committed in a given term, then that entry will be present in the logs
of the leaders for all higher-numbered terms.
- **State Machine Safety**: if a server has applied a log entry at a given index to its state machine, no other server
will ever apply a different log entry for the same index.## Curl
```bash
curl -L -d '{"action":"Create", "data":{"x": "123"}}' -H "Content-Type: application/json" -X POST http://localhost:8080/append
```