Skip to content

kanhayaKy/load-balancer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Load Balancer - Python

How To ?

  1. Start the loadbalancer by running the file lb.py python3 lb.py image

  2. Start the backend servers by running the file be.py python3 be.py <port> image

  3. You can start multiple instances of the server by running it on different ports

  4. Make a request to the loadbalancer

image

Docs

  • lb.py contains the loadbalancer that runs a TCPServer and forwards the requests to the list of healthy servers
  • be.py contains a demo backend server that again starts a TCPServer at the specified port and responds to requests with a generic message
  • health.py contains the health check loop that checks the health of the available servers every x seconds
  • strategy Contains the ServerSelectionStrategy base class to choose the next server from the list of availabe ones

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages