Created
May 9, 2018 00:53
-
-
Save haani-niyaz/baeaebec8bd5ec7b148a7359107fc19e to your computer and use it in GitHub Desktop.
How to use DNS name backends in haproxy
This file contains 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
global | |
log 127.0.0.1 local2 | |
pidfile /var/run/haproxy.pid | |
user haproxy | |
group haproxy | |
maxconn 1000 | |
defaults | |
log global | |
mode http | |
option httplog | |
option dontlognull | |
timeout connect 50000ms | |
timeout client 50000ms | |
timeout server 50000ms | |
resolvers dns | |
nameserver dns-0 10.255.255.131:53 | |
nameserver dns-1 10.255.255.132:53 | |
frontend api | |
bind *:9000 | |
bind *:443 | |
mode tcp | |
option tcplog | |
default_backend api-backend | |
backend api-backend | |
balance roundrobin | |
mode tcp | |
server site-1 api1.com.au:443 resolvers dns check verify none inter 1000 | |
server site-2 api2.com.au:443 resolvers dns check verify none inter 1000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment