Last active
August 29, 2015 14:08
-
-
Save cultureulterior/02444e406380c1d3105d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
frontend superhero | |
bind *:80 | |
# From my aws2json | |
{{with $d := file "/tmp/aws.json" | parseJSON}} | |
stats show-desc {{$d.instance_id}} | |
{{end}} | |
acl superman hdr(host) -i -m beg superman | |
acl batman hdr(host) -i -m beg batman | |
use_backend maintenance if {{if key "maintenance"}}TRUE{{else}}FALSE{{end}} | |
use_backend superman if superman | |
use_backend batman if batman | |
backend batman | |
balance roundrobin check {{range service "batman"}} | |
server {{.Node}} {{.Address}}:{{.Port}} maxconn 1000 {{end}} | |
backend superman | |
balance roundrobin check {{range service "superman"}} | |
server {{.Node}} {{.Address}}:{{.Port}} maxconn 1000 {{end}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment