Ingress
Simple load balancing across three replicas.
Images are clickable.
Manifests
services:
replicated:
image: hashicorp/http-echo
deploy:
mode: replicated
replicas: 3
labels:
- "millau.enabled=true"
- "millau.hosts=*"
- "millau.port=9000"
command: ["-listen=:9000", "-text=backend"]
ports:
- "9000"
networks:
- millau
other:
image: hashicorp/http-echo
command: ["-listen=:9000", "-text=other"]
ports:
- "9000"
networks:
- millau
networks:
millau:
external: true
Features
Load Balancing
curl -i localhost:8080
returns HTTP 200
and responds from the backend
replicas due to any host matching.
No Load Balancing
The service other
is not controlled by Millau.
Host and Path Matching
curl -i localhost:8080
returns HTTP 200
and responds from the backend
replicas due to any host matching. By default, millau.path=/
.