Skip to content

This project implements a modified version of the Raft consensus algorithm with Leader Lease using gRPC in Python.

Notifications You must be signed in to change notification settings

sahilgoswami0901/Raft-Consensus-Algorithm

Repository files navigation

Modified Raft.py with Leader Lease using gRPC

This project implements a modified version of the Raft consensus algorithm with Leader Lease using gRPC in Python.

Installation

Prerequisites

  • Python 3.6 or higher

Installation

Clone the repository

git clone https://github.com/sahilgoswami0901/Raft-Consensus-Algorithm.git
chmod +x setup.sh
./setup.sh
chmod +x clean_logs.sh

Usage

To clean up any previous logs

./clean_logs.sh

To start a Raft node:

python3 RaftNode.py

Run the above command in 5 different terminals, and enter the following server id in each terminal:

  • 50051
  • 50052
  • 50053
  • 50054
  • 50055

To start a Raft client:

python3 RaftClient.py

The client can send the following commands to the Raft cluster:

  • SET key value to set a key-value pair
  • GET key to get the value of a key

About

This project implements a modified version of the Raft consensus algorithm with Leader Lease using gRPC in Python.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published