Skip to content

Conversation

@Om-Nejakar
Copy link

Fixes issue:
Closes #6822

Changes:

  • Added a new C++ file networking/src/load_balancing.cpp.
  • Implemented two load-balancing algorithms:
    1. Round Robin (index rotation using modulo)
    2. Least Connections (linear scan over vector)
  • Included a small main() demonstrating usage of both algorithms and expected output.
  • Added basic input-safety checks (handle empty server list / empty connections).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Load Balancing algorithms under Networking Algorithms

2 participants