Load balancer system for the discipline Distributed Systems - UNICAMP
Usage • Options • Requests • Capacity • Metrics
A load balancer simulator handles arriving requests and distributes them between three independent servers.
To run the project you have two options:
- Docker (Recommended)
If you have docker, you can build and run the project with simple commands
docker compose builddocker compose run --rm load-balancer- Manual
If you prefer you can install rust mannualy and run through cargo
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shcargo runIt is possible to define how the system behaves
- Random: The servers are chosen randomly.
- Round Robin: The servers are chosen uniformly, regardless of their workload.
- Smaller Queue: The server with the smallest request queue (i.e. the smallest workload) is chosen.
You can set the average number of requests arriving per second between 0 and 10.
Requests are defined by type and size.
-
Type
- CPU Bound: It demands more CPU computing.
- IO Bound: It demands more input/output waiting time.
- Mixed: A mixture of previous types.
-
Size
- Small:
100ms - Mid:
300ms - Large:
1000ms
- Small:
Currently, the maximum number of requests that each queue can store is hard-coded. However, you can easily modify this to test new scenarios.
- Server (each): 10 requests
- Pending list: 20 requests
- Total Requests: The total number of requests received.
- Processed: Number of successfully processed requests.
- Avarage Response Time: The average time taken to process a request since its arrival.
- Throughput: Number of requests processed per second.
