Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

LoadBalancer

A Java-based Round Robin Load Balancer that distributes incoming requests evenly across multiple servers using a simple rotation algorithm.

Why I Built This

I built this project to get a better understanding of how requests are distributed across servers. Load balancing is a common concept in backend systems, and this was a simple way to explore how the Round Robin algorithm works in practice using Java.

Features

  • Round Robin request distribution
  • Dynamic server addition
  • Even workload distribution across servers
  • Circular server rotation
  • Lightweight and easy-to-understand implementation
  • Object-oriented design using separate classes

Technologies Used

  • Java
  • Java Collections Framework
  • ArrayList
  • Object-Oriented Programming (OOP)

How to Run

  1. Clone the repository
git clone https://github.com/JavaLabs-io/LoadBalancer.git
  1. Open the project in VS Code or any Java IDE

  2. Run Main.java

Sample Output

Added: Server A
Added: Server B
Added: Server C

Request 1 -> Server A
Request 2 -> Server B
Request 3 -> Server C
Request 4 -> Server A
Request 5 -> Server B
Request 6 -> Server C

Future Improvements

  • Remove server functionality
  • Weighted Round Robin implementation
  • Server health checks
  • REST API integration

Part of JavaLabs-IO

This project is part of JavaLabs-IO — a collection of Java backend systems, simulations, tools, and experimental software projects.

About

A Java implementation of Round Robin Load Balancing, where requests are distributed evenly across available servers in a repeating sequence.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages