Giter Club home page Giter Club logo

distr-redis-microservice's Introduction

Distributed Redis Implementation with Go, HAProxy and Docker

This project is a simple implementation of a distributed Redis system using Go, HAProxy and Docker. The project is divided into three main parts:

  1. Redis Cluster: A Redis cluster with 3 master nodes
  2. Go Client: A Go client that connects to the Redis cluster and performs some operations
  3. HAProxy Load Balancer: A HAProxy load balancer that distributes the requests to the Redis cluster

Running the project

To run the project, you need to have Docker installed on your machine. Then, you can run the following commands:

  1. Build the Docker images:
docker-compose build
  1. Run the Docker containers:
docker-compose up -d
  1. Check the logs:
docker-compose logs haproxy

Testing the project

To test the project, you can run the following command:

curl --location 'localhost:8081/key' --head
er 'Content-Type: application/json' --data '{"key": "hello", "value": "world"}'

Endpoints

The project has the following endpoints:

  1. GET /key: Get the value of a key
  2. POST /key: Set the value of a key
  3. DELETE /key: Delete a key
  4. GET /health: Check the health of the Redis cluster

distr-redis-microservice's People

Contributors

cr34t1ve avatar

Watchers

 avatar Ephraim Duncan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.