This is a simple pet project of mine. A simple toy Hash based Load balancer.
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
- Golang installed
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
I don't want them. Kindly, keep them to yourself