-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
haproxy.cfg
186 lines (176 loc) · 7.21 KB
/
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
#---------------------------------------------------------------------
# Example configuration for a possible web application. See the
# full configuration options online.
#
# https://www.haproxy.org/download/1.8/doc/configuration.txt
#
#---------------------------------------------------------------------
#---------------------------------------------------------------------
# Global settings
#---------------------------------------------------------------------
global
# to have these messages end up in /var/log/haproxy.log you will
# need to:
#
# 1) configure syslog to accept network log events. This is done
# by adding the '-r' option to the SYSLOGD_OPTIONS in
# /etc/sysconfig/syslog
#
# 2) configure local2 events to go to the /var/log/haproxy.log
# file. A line like the following can be added to
# /etc/sysconfig/syslog
#
# local2.* /var/log/haproxy.log
#
## log 127.0.0.1 local2
log stdout format raw local0 info
# chroot /var/lib/haproxy
# pidfile /var/run/haproxy.pid
maxconn 10000
## user haproxy
## group haproxy
daemon
# turn on stats unix socket
stats socket /var/lib/haproxy/stats
# stats socket /var/run/api.sock user haproxy group haproxy mode 660 level admin expose-fd listeners
# utilize system-wide crypto-policies
ssl-default-bind-ciphers PROFILE=SYSTEM
ssl-default-server-ciphers PROFILE=SYSTEM
#---------------------------------------------------------------------
# common defaults that all the 'listen' and 'backend' sections will
# use if not designated in their block
#---------------------------------------------------------------------
defaults
mode http
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 10000
#---------------------------------------------------------------------
# main frontend which proxys to the backends
#---------------------------------------------------------------------
frontend main
bind *:80
mode http
default_backend app
frontend stats
bind *:8404
stats enable
stats uri /
stats refresh 10s
#---------------------------------------------------------------------
# round robin balancing between the various backends
#---------------------------------------------------------------------
backend app
balance roundrobin
server ruben01 coderic-ruben-1:80 check
server ruben02 coderic-ruben-2:80 check
server ruben03 coderic-ruben-3:80 check
server ruben04 coderic-ruben-4:80 check
server ruben05 coderic-ruben-5:80 check
server ruben06 coderic-ruben-6:80 check
server ruben07 coderic-ruben-7:80 check
server ruben08 coderic-ruben-8:80 check
server ruben09 coderic-ruben-9:80 check
server ruben10 coderic-ruben-10:80 check
server ruben11 coderic-ruben-11:80 check
server ruben12 coderic-ruben-12:80 check
server ruben13 coderic-ruben-13:80 check
server ruben14 coderic-ruben-14:80 check
server ruben15 coderic-ruben-15:80 check
server ruben16 coderic-ruben-16:80 check
server ruben17 coderic-ruben-17:80 check
server ruben18 coderic-ruben-18:80 check
server ruben19 coderic-ruben-19:80 check
server ruben20 coderic-ruben-20:80 check
server ruben21 coderic-ruben-21:80 check
server ruben22 coderic-ruben-22:80 check
server ruben23 coderic-ruben-23:80 check
server ruben24 coderic-ruben-24:80 check
server ruben25 coderic-ruben-25:80 check
server ruben26 coderic-ruben-26:80 check
server ruben27 coderic-ruben-27:80 check
server ruben28 coderic-ruben-28:80 check
server ruben29 coderic-ruben-29:80 check
server ruben30 coderic-ruben-30:80 check
server ruben31 coderic-ruben-31:80 check
server ruben32 coderic-ruben-32:80 check
server ruben33 coderic-ruben-33:80 check
server ruben34 coderic-ruben-34:80 check
server ruben35 coderic-ruben-35:80 check
server ruben36 coderic-ruben-36:80 check
server ruben37 coderic-ruben-37:80 check
server ruben38 coderic-ruben-38:80 check
server ruben39 coderic-ruben-39:80 check
server ruben40 coderic-ruben-40:80 check
server ruben41 coderic-ruben-41:80 check
server ruben42 coderic-ruben-42:80 check
server ruben43 coderic-ruben-43:80 check
server ruben44 coderic-ruben-44:80 check
server ruben45 coderic-ruben-45:80 check
server ruben46 coderic-ruben-46:80 check
server ruben47 coderic-ruben-47:80 check
server ruben48 coderic-ruben-48:80 check
server ruben49 coderic-ruben-49:80 check
server ruben50 coderic-ruben-50:80 check
server ruben51 coderic-ruben-51:80 check
server ruben52 coderic-ruben-52:80 check
server ruben53 coderic-ruben-53:80 check
server ruben54 coderic-ruben-54:80 check
server ruben55 coderic-ruben-55:80 check
server ruben56 coderic-ruben-56:80 check
server ruben57 coderic-ruben-57:80 check
server ruben58 coderic-ruben-58:80 check
server ruben59 coderic-ruben-59:80 check
server ruben60 coderic-ruben-60:80 check
server ruben61 coderic-ruben-61:80 check
server ruben62 coderic-ruben-62:80 check
server ruben63 coderic-ruben-63:80 check
server ruben64 coderic-ruben-64:80 check
server ruben65 coderic-ruben-65:80 check
server ruben66 coderic-ruben-66:80 check
server ruben67 coderic-ruben-67:80 check
server ruben68 coderic-ruben-68:80 check
server ruben69 coderic-ruben-69:80 check
server ruben70 coderic-ruben-70:80 check
server ruben71 coderic-ruben-71:80 check
server ruben72 coderic-ruben-72:80 check
server ruben73 coderic-ruben-73:80 check
server ruben74 coderic-ruben-74:80 check
server ruben75 coderic-ruben-75:80 check
server ruben76 coderic-ruben-76:80 check
server ruben77 coderic-ruben-77:80 check
server ruben78 coderic-ruben-78:80 check
server ruben79 coderic-ruben-79:80 check
server ruben80 coderic-ruben-80:80 check
server ruben81 coderic-ruben-81:80 check
server ruben82 coderic-ruben-82:80 check
server ruben83 coderic-ruben-83:80 check
server ruben84 coderic-ruben-84:80 check
server ruben85 coderic-ruben-85:80 check
server ruben86 coderic-ruben-86:80 check
server ruben87 coderic-ruben-87:80 check
server ruben88 coderic-ruben-88:80 check
server ruben89 coderic-ruben-89:80 check
server ruben90 coderic-ruben-90:80 check
server ruben91 coderic-ruben-91:80 check
server ruben92 coderic-ruben-92:80 check
server ruben93 coderic-ruben-93:80 check
server ruben94 coderic-ruben-94:80 check
server ruben95 coderic-ruben-95:80 check
server ruben96 coderic-ruben-96:80 check
server ruben97 coderic-ruben-97:80 check
server ruben98 coderic-ruben-98:80 check
server ruben99 coderic-ruben-99:80 check
server ruben100 coderic-ruben-100:80 check