This project implements the Raft consensus algorithm, which is used for managing a replicated log across a distributed system. Raft is designed to be understandable and is often used in systems requiring fault tolerance and consistency. In this project we are adding the data (file metadata) to redis.
The architecture consists of the following components:
- Node: Represents a single instance in the distributed system.
- Raft Protocol: Implements the core functionalities of leader election and log management.
- Client Interface: Allows clients to interact with the Raft cluster.
- Go (version 1.16 or higher)
- Redis (for storing logs and states)
- Any necessary dependencies listed in
go.mod
- Clone the repository: git clone https://github.com/tnlmao/sarva.git cd your-repo-name
- Install Dependencies go mod tidy
- Start Application go run main.go
- Upload a file and Trigger the endpoint