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
http { | |
server { | |
listen 80; | |
location / { | |
proxy_pass http://my_upstream; | |
} | |
location /api/ { | |
proxy_pass http://api_servers; | |
} |
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
_service._proto.name. TTL class SRV priority weight port target |
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
$ sudo apt update | |
$ sudo apt install -y autoconf automake build-essential git libcurl4-openssl-dev libev-dev libpthread-stubs0-dev pkg-config | |
$ git clone https://github.com/haproxytech/spoa-mirror | |
$ cd spoa-mirror | |
$ ./scripts/bootstrap | |
$ ./configure | |
$ make all | |
$ sudo cp ./src/spoa-mirror /usr/local/bin/ |
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
kubectl apply -f https://raw.githubusercontent.com/haproxytech/kubernetes-ingress/master/deploy/haproxy-ingress.yaml |
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
frontend www.mysite.com | |
bind 10.0.0.3:80 | |
bind 10.0.0.3:443 ssl crt /etc/ssl/certs/mysite.pem | |
default_backend web_servers |
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
defaults | |
log-format "<format-string>" |
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 | |
h1-case-adjust content-length Content-Length |
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
defaults | |
mode {protocol} | |
balance {balanceMode} | |
timeout client {clTO} | |
timeout connect {cTO} | |
timeout server {sTO} | |
timeout http-keep-alive {kaTO} | |
listen ::{service}-{servicePort} | |
acl down nbsrv(hc-{servicePort}) lt 1 |
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
backend cart_service | |
server blue-cart-service cart-blue.ec2.tup.internal:8025 check weight 0 backup | |
server green-cart-service cart-green.ec2.tup.internal:8025 check weight 100 |
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
stats socket /var/run/haproxy.sock mode 600 expose-fd listeners level user |