ad7d7e20fcae14a0d6904d3bd35890eda50637c9
maglevd
Health checker and gRPC control plane for VPP Maglev load balancing.
Build
make # builds bin/maglevd
make test # runs all tests
make proto # regenerates gRPC stubs from proto/maglev.proto
Requires Go 1.25+ and (for make proto) protoc with protoc-gen-go and protoc-gen-go-grpc.
Run
maglevd --config /etc/maglev/maglev.yaml --grpc-addr :9090
| Flag | Env | Default |
|---|---|---|
--config |
MAGLEV_CONFIG |
/etc/maglev/frontend.yaml |
--grpc-addr |
MAGLEV_GRPC_ADDR |
:9090 |
--log-level |
MAGLEV_LOG_LEVEL |
info |
Send SIGHUP to reload the config without restarting. Backends whose health-check config is
unchanged continue probing uninterrupted.
maglevd requires CAP_NET_RAW to open raw ICMP sockets.
Minimal config
maglev:
healthchecks:
http:
type: http
port: 80
params:
path: /healthz
interval: 2s
timeout: 3s
backends:
web0: {address: 192.0.2.10, healthcheck: http}
web1: {address: 192.0.2.11, healthcheck: http}
frontends:
web:
address: 192.0.2.1
protocol: tcp
port: 80
backends: [web0, web1]
See docs/config-guide.md for the full configuration reference.
Docker
docker build -t maglevd .
docker run --cap-add NET_RAW -v /etc/maglev:/etc/maglev maglevd
Description
Languages
Go
79%
TypeScript
12.8%
CSS
2.9%
Makefile
2.2%
RobotFramework
2.2%
Other
0.8%