Created
March 19, 2021 22:25
-
-
Save jamcole/5ed6d8f5cccc5562a74b50449dd2a2f1 to your computer and use it in GitHub Desktop.
simple tcp example (only the frontend and backend sections are meaningful)
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
global | |
log 127.0.0.1 local2 | |
chroot /var/lib/haproxy | |
pidfile /var/run/haproxy.pid | |
maxconn 4000 | |
user haproxy | |
group haproxy | |
daemon | |
# turn on stats unix socket | |
stats socket /var/lib/haproxy/stats | |
# utilize system-wide crypto-policies | |
ssl-default-bind-ciphers PROFILE=SYSTEM | |
ssl-default-server-ciphers PROFILE=SYSTEM | |
defaults | |
mode tcp | |
log global | |
option httplog | |
option dontlognull | |
option http-server-close | |
option forwardfor except 127.0.0.0/8 | |
option redispatch | |
retries 3 | |
timeout http-request 10s | |
timeout queue 1m | |
timeout connect 10s | |
timeout client 1m | |
timeout server 1m | |
timeout http-keep-alive 10s | |
timeout check 10s | |
maxconn 3000 | |
frontend main_80 | |
bind localhost:80 | |
default_backend minikube_80 | |
frontend main_443 | |
bind localhost:443 | |
default_backend minikube_443 | |
backend minikube_80 | |
option tcp-check | |
balance roundrobin | |
server app1 minikube:80 check | |
backend minikube_443 | |
option tcp-check | |
balance roundrobin | |
server app1 minikube:443 check |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment