Skip to content

DiedCloud/heiko

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Run with Docker Compose

Start one balancer, three workers, and one load generator:

docker compose up --build

Service URLs:

Workers are internal compose services and register themselves in the balancer:

  • worker-1: weight 1, cost rate 1.0
  • worker-2: weight 2, cost rate 1.2
  • worker-3: weight 1, cost rate 0.8

Generate one request through the generator:

Invoke-RestMethod `
  -Method Post `
  -Uri http://127.0.0.1:8200/traffic/once `
  -ContentType application/json `
  -Body '{"profile":"mixed"}'

Start background traffic:

Invoke-RestMethod `
  -Method Post `
  -Uri http://127.0.0.1:8200/traffic/start `
  -ContentType application/json `
  -Body '{"profile":"mixed","rate_per_second":5,"total_requests":100}'

Check stats:

Invoke-RestMethod http://127.0.0.1:8000/stats
Invoke-RestMethod http://127.0.0.1:8200/stats

Stop services:

docker compose down

About

Diploma project - Cost aware load balancer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors