Skip to content

Sutchu/loadbalancer-simulation-model

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Load Balancer Simulator

This project contains a load balancer simulator implemented in Python. It includes three types of load balancers: Part1LoadBalancer, Part2LoadBalancer, and PDLoadBalancer. You can find the implementations of these load balancers in the src/load_balancers directory.

Requirements

The only external requirement for this project is matplotlib. You can install it by running:

pip install -r requirements.txt

Running the Code

To execute the code, use the following command:

python main.py <loadbalancer_class_name> [<input_traffic_json_path>]

If <input_traffic_json_path> is not provided, the simulator will run with 'ExampleTraffic.json' as default input.

Here <loadbalancer_class_name> can be any one of the three available load balancer implementations:

Part1LoadBalancer
Part2LoadBalancer
PDLoadBalancer

For example, to run the simulator with the 'Part1LoadBalancer' and custom input traffic, use:

python main.py Part1LoadBalancer custom_input.json

Running Tests

This project includes integration tests for Simulation with dummy load balancer. To run them, use:

python -m unittest test/integration_tests/test_simulation.py

Please ensure you run the tests from the project's root directory.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages