This project is a simple implementation of a load balancer and backend servers.
- Python 3.x
- Clone the repository to your local machine.
- Navigate to the project directory in your terminal.
- Run the backend servers. You can start a servers on a multiple ports by running
python3 start_be_servers.py
. You can configure details for the instances inconfig.json
. - Run the load balancer by running
python3 lb.py
.
- Send a request to the load balancer from a separate terminal window. You can do this by running
curl localhost:<load_balancer_port>
. - The load balancer should forward your request to one of the backend servers and then forward the server's response back to you.
The load balancer utilizes a round-robin algorithm to evenly distribute incoming requests among the available servers. This ensures each server gets an equal share of the load, preventing any single server from becoming a bottleneck.
WIP
WIP
For a detailed reflection on the development process and key learnings from this project, check out LearningExperience.md.
This is a basic implementation of a load balancer and does not include many features that a real-world load balancer would have, such as health checks, session persistence, and SSL termination.
This project is a solution to the Load Balancer challenge on Coding Challenges.
This project is licensed under the terms of the MIT license.