Skip to content

Latest commit

 

History

History
31 lines (17 loc) · 866 Bytes

README.md

File metadata and controls

31 lines (17 loc) · 866 Bytes

rr-lb-go

This is a simple pet project of mine. A simple toy Hash based Load balancer.

How it works

The HTTP server receives a POST request which contains a random string which is to be written in the DATABASE (txt files act as databases). The server thus hashes the input and writes it to the database alongside the original data since hashes have a possibility of 16 characters: (0123456789ABCDEF).

recording-2024-10-07-13-24-08.mp4

Prerequisites

  • Golang installed

Using it

Choose either the hash-based or the round-robin

  • Open up two terminal tabs/instances
  • Navigate into either of te two
  • On tab/instance 1, run go run load-balancer.go
  • On tab/instance 2, run sh runme.sh

Check the databases/ database partitions

Contributions

I don't want them. Kindly, keep them to yourself