How hhoangsonnw/azure-load-balancer works
CloudAdapt is a Go L7 load-balancing testbed. A client sends a workload request to the proxy; the proxy classifies and size-checks it, selects an eligible worker, and forwards it. Workers serve light, CPU, or I/O workloads and expose readiness and metrics endpoints. Health probes control worker eligibility. The README also describes planned routing baselines and HALB, seeded k6 comparisons, analysis, Prometheus/Grafana, and Azure validation; these are shown as product branches, not verified runtime integrations. Unsampled subsystems use only paths present in the tree.
Main entry points: worker/main.go Worker Application · proxy/main.go Proxy Application · registry.go Route Selection · proxy.go Request Proxy
Components 19
Proxy Routing
- Proxy Application
cmd/proxy/main.go - Proxy Configuration
internal/router/config.go - Request Proxy
internal/router/proxy.go - Route Selection
internal/router/registry.go - Backend Registry
internal/router/registry.go - Round Robin
internal/router/round_robin.go - Health Checker
internal/health/checker.go - Routing Policies
internal/router
Worker Runtime
- Worker Application
cmd/worker/main.go - Workload Routes
cmd/worker/workload.go - Readiness Endpoints
cmd/worker/workload.go - Worker Metrics
cmd/worker/workload.go
Load Evaluation
- k6 Load Generator
experiments/k6 - Experiment Analysis
experiments/analysis
Operations
- Prometheus
observability - Grafana
observability - Azure Validation
infra/terraform - Worker Lab
deploy/compose.yaml
Other components
- HTTP Client
Connections 22
- HTTP Client → Proxy Application: sends requests
README.md - Proxy Application → Proxy Configuration: loads config
cmd/proxy/main.go - Proxy Application → Health Checker: starts probes
cmd/proxy/main.go - Proxy Application → Request Proxy: creates handler
cmd/proxy/main.go - Request Proxy → Route Selection: chooses backend
internal/router/proxy.go - Route Selection → Backend Registry: reads eligible
internal/router/registry.go - Route Selection → Round Robin: dispatches pick
internal/router/registry.go - Health Checker → Backend Registry: updates eligibility
internal/health/checker.go - Health Checker → Readiness Endpoints: probes readiness
internal/health/checker.go - Request Proxy → Workload Routes: forwards request
README.md - Worker Application → Workload Routes: registers routes
cmd/worker/main.go - Worker Application → Readiness Endpoints: registers routes
cmd/worker/main.go - Worker Application → Worker Metrics: registers routes
cmd/worker/main.go - HTTP Client → Worker Application: starts worker
README.md - Workload Routes → Worker Metrics: records requests
cmd/worker/workload.go - k6 Load Generator → HTTP Client: generates load
README.md - Experiment Analysis → k6 Load Generator: analyzes runs
README.md - Worker Metrics → Prometheus: scrapes metrics
README.md - Prometheus → Grafana: supplies dashboards
README.md - Routing Policies → Route Selection: planned policies
README.md - Worker Lab → Worker Application: runs workers
README.md - Azure Validation → Worker Lab: planned validation
README.md