Skip to content

Commit

Permalink
ha proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
jduimovich committed Sep 13, 2023
1 parent 19af3ca commit 02579a2
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 6 deletions.
54 changes: 54 additions & 0 deletions haproxy/haproxy copy.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
global
log /dev/log local0
log /dev/log local1 notice
daemon

# Default SSL material locations
ca-base /etc/ssl/certs
crt-base /etc/ssl/private

# Default ciphers to use on SSL-enabled listening sockets.
# For more information, see ciphers(1SSL).
ssl-default-bind-ciphers kEECDH+aRSA+AES:kRSA+AES:+AES256:RC4-SHA:!kEDH:!LOW:!EXP:!MD5:!aNULL:!eNULL

defaults
log global
mode http
option httplog
option dontlognull
timeout connect 30
timeout client 30
timeout server 30

frontend localnodes
bind *:8080
mode http
acl fib path_end -i /fib
acl is_health path /health
default_backend srvs_index

use_backend srvs_fib if fib
use_backend health-check if is_health

resolvers kube-dns
parse-resolv-conf
hold valid 10s

backend srvs_index
server fe1 frontend-gratuitous:8080 check
server fe2 frontend:8080 check

backend health-check
mode http
errorfile 503 /local-health/health.http

backend srvs_fib
mode http
balance roundrobin
option forwardfor
http-request set-header X-Forwarded-Port %[dst_port]
http-request add-header X-Forwarded-Proto https if { ssl_fc }
server f1 fib-go-gratuitous:8080 check
server f2 fib-node-gratuitous:8080 check
server f3 fib-go-gratuitous:8080 check
server f4 fib-node-gratuitous:8080 check
9 changes: 3 additions & 6 deletions haproxy/haproxy.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ resolvers kube-dns
hold valid 10s

backend srvs_index
server fe1 frontend-gratuitous:8080 check
server fe2 frontend:8080 check
server fe1 frontend:8080

backend health-check
mode http
Expand All @@ -48,7 +47,5 @@ backend srvs_fib
option forwardfor
http-request set-header X-Forwarded-Port %[dst_port]
http-request add-header X-Forwarded-Proto https if { ssl_fc }
server f1 fib-go-gratuitous:8080 check
server f2 fib-node-gratuitous:8080 check
server f3 fib-go-gratuitous:8080 check
server f4 fib-node-gratuitous:8080 check
server f1 fib-go:8080
server f2 fib-node:8080

0 comments on commit 02579a2

Please sign in to comment.