This repository has been archived by the owner on Jan 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
goerli-haproxy.cfg
113 lines (99 loc) · 3.94 KB
/
goerli-haproxy.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#---------------------------------------------------------------------
# Global settings
#---------------------------------------------------------------------
global
log stdout format raw local0
maxconn 20000
user haproxy
group haproxy
ssl-default-server-options force-tlsv12
ssl-default-bind-options force-tlsv12
ca-base /etc/ssl/certs
external-check
insecure-fork-wanted
#---------------------------------------------------------------------
# dedicated Prometheus page
#---------------------------------------------------------------------
frontend prometheus
mode http
bind *:8405
http-request use-service prometheus-exporter if { path /metrics }
timeout client 5m
no log
#---------------------------------------------------------------------
# common defaults that all the 'listen' and 'backend' sections will
# use if not designated in their block
#---------------------------------------------------------------------
defaults
mode tcp
option tcplog
log global
option dontlognull
timeout client 5m
resolvers localfirst
parse-resolv-conf
nameserver cloudflare 1.1.1.1:53
nameserver google 8.8.8.8:53
nameserver quad9 9.9.9.8:53
#---------------------------------------------------------------------
# main frontend which proxys to the backends
#---------------------------------------------------------------------
frontend main_https_listen
bind *:443
tcp-request inspect-delay 5s
tcp-request content accept if { req_ssl_hello_type 1 }
#---------------------------------------------------------------------
# Common HAProxy nodes configuration
#---------------------------------------------------------------------
# -------------------------------
# ACLs
# -------------------------------
acl acl_cl req.ssl_sni -i goerlicl-lb.example.com
acl acl_rpc req.ssl_sni -i goerli-lb.example.com
acl acl_ws req.ssl_sni -i goerliws-lb.example.com
# -------------------------------
# Conditions
# -------------------------------
use_backend backend_cl acl_cl
use_backend backend_rpc if acl_rpc
use_backend backend_ws if acl_ws
#---------------------------------------------------------------------
# Backends
#---------------------------------------------------------------------
# execution client RPC
backend backend_rpc
default-server init-addr libc,none resolvers localfirst no-tls-tickets check inter 10000 on-marked-down shutdown-sessions
timeout connect 5s
timeout server 120s
retries 2
balance first
option external-check
external-check path "/usr/bin:/bin"
external-check command /var/lib/haproxy/check-ecsync.sh
server goerli-a.example.com goerli-a.example.com:443
server goerli-b.example.com goerli-b.example.com:443 backup
# execution client WebSockets
backend backend_ws
default-server init-addr libc,none resolvers localfirst no-tls-tickets check inter 10000 on-marked-down shutdown-sessions
timeout connect 5s
timeout server 120s
timeout tunnel 3600s
retries 2
balance first
option external-check
external-check path "/usr/bin:/bin"
external-check command /var/lib/haproxy/check-ecsync.sh
server goerli-a.example.com goerliws-a.example.com:443
server goerli-b.example.com goerliws-b.example.com:443 backup
# consensus client
backend backend_cl
default-server init-addr libc,none resolvers localfirst no-tls-tickets check inter 10000 on-marked-down shutdown-sessions
timeout connect 5s
timeout server 120s
retries 2
balance first
option external-check
external-check path "/usr/bin:/bin"
external-check command /var/lib/haproxy/check-ccsync.sh
server goerlicl-a.example.com goerlicl-a.example.com:443
server goerlicl-b.example.com goerlicl-b.example.com:443 backup