Implementation of the Raft consensus protocol in C#
This is currently just at test to have a working basic implementation without any focus on performance or features.
Currently the server and client have basic functions to start up and reach quorum and the client can send commands that are distributed and applied.
The log i minimal with no optimisations and there is no persistant storage.
The only transport is an in-memory debug transport and all servers run in the same application.
- Testing
- How does the cluster handle disconnects
- How does it handle reconnects
- Can it resync a peer
- What happens with more servers
- What happens when we no longer can commit due to to few clients
- Add persistant storage
- Logfile
- StateMachine
- Configuration
- Add http transport and the ability to use separate applications and machines
- Add join and leave mechanics so the cluster configuration can be changes without downtime
- Add the ability to enforce leader even with one peer for recovery
- Add TTL for messages where the client waits longer than the server to avoid a client giving up while the server commits the command
- Add a way for a leader to realize it cannot commit due to loss of peers and can communicate this to clients
- Experiment with auto adjustable timeouts so a fast stable network could have shorter roundtrips for commit while an unstable will take longer time but still get the job done
- Implement snapshots for faster replay on new clients and the ability to truncate the log