-
Notifications
You must be signed in to change notification settings - Fork 4
/
haproxy.cfg
455 lines (409 loc) · 18.1 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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
#---------------------------------------------------------------------
# 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
tune.chksize 32768
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
#---------------------------------------------------------------------
# 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 3000
#---------------------------------------------------------------------
# __ __ ____ ____ _ _ ___
# | \/ |/ ___/ ___| | | | |_ _|
# | |\/| | | \___ \ | | | || |
# | | | | |___ ___) | | |_| || |
# |_| |_|\____|____/ \___/|___|
#---------------------------------------------------------------------
# Rules for MCS UI load balancing and HA on MapR : my.mapr01.fr
#---------------------------------------------------------------------
frontend mapr-mcs-ui-ha-my.mapr01.fr
bind *:8443
option tcplog
mode tcp
default_backend mapr-mcs-ui-my.mapr01.fr
backend mapr-mcs-ui-my.mapr01.fr
mode tcp
option ssl-hello-chk
balance first
server node1 10.68.7.91:8443 check
server node2 10.68.7.92:8443 check
server node3 10.68.7.93:8443 check
server node4 10.68.7.94:8443 check
server node5 10.68.7.95:8443 check
#---------------------------------------------------------------------
# __ __ _ ____ ____ ____ _ ____ ____
# | \/ | / \ | _ \| _ \ / ___| | | | _ \ | __ )
# | |\/| | / _ \ | |_) | |_) | | | | | | | | | | _ \
# | | | |/ ___ \| __/| _ < | |___ | |___ | |_| | | |_) |
# |_| |_/_/ \_\_| |_| \_\ \____| |_____| |____/ |____/
#---------------------------------------------------------------------
# Rules for MAPR CLDB on MapR cluster : my.mapr01.fr
#---------------------------------------------------------------------
frontend mapr-cldb-ha-my.mapr01.fr
bind *:7222
option tcplog
mode tcp
default_backend mapr-cldb-ha-my.mapr01.fr
backend mapr-cldb-ha-my.mapr01.fr
mode tcp
balance first
server node3 10.68.7.93:7222 check
server node4 10.68.7.94:7222 check
server node5 10.68.7.95:7222 check
frontend mapr-cldb-ui-ha-my.mapr01.fr
mode http
bind *:7221
default_backend mapr-cldb-ui-ha-my.mapr01.fr
backend mapr-cldb-ui-ha-my.mapr01.fr
balance static-rr
option httpchk get /cldb.jsp
http-check expect string MASTER_READ_WRITE
default-server inter 3s fall 3 rise 2
server node3 10.68.7.93:7221 check
server node4 10.68.7.94:7221 check
server node5 10.68.7.95:7221 check
#---------------------------------------------------------------------
# ____ _ _ _ _ _ ___
# | _ \ _ __(_) | | | | | |_ _|
# | | | | '__| | | | | | | || |
# | |_| | | | | | | | |_| || |
# |____/|_| |_|_|_| \___/|___|
#---------------------------------------------------------------------
# Rules for Drill load balancing and HA on MapR : my.mapr01.fr
#---------------------------------------------------------------------
frontend drill-console-my.mapr01.fr
mode http
bind *:8047
default_backend mapr-nodes-drillbits-my.mapr01.fr
backend mapr-nodes-drillbits-my.mapr01.fr
balance static-rr
server node1 10.68.7.91:8047 check
server node2 10.68.7.92:8047 check
server node3 10.68.7.93:8047 check
server node4 10.68.7.94:8047 check
server node5 10.68.7.95:8047 check
#---------------------------------------------------------------------
# ____ __ __
# | _ \ ___ ___ ___ _ _ _ __ ___ ___ | \/ | __ _ _ __
# | |_) / _ \/ __|/ _ \| | | | '__/ __/ _ \ | |\/| |/ _` | '__|
# | _ < __/\__ \ (_) | |_| | | | (_| __/ | | | | (_| | |
# |_| \_\___||___/\___/ \__,_|_| \___\___| |_| |_|\__, |_|
# |___/
#---------------------------------------------------------------------
# Rules for Resource Manager on MapR cluster : my.mapr01.fr
#---------------------------------------------------------------------
frontend resource-mgr-my.mapr01.fr
mode http
bind *:8088
default_backend resource-mgr-my.mapr01.fr
backend resource-mgr-my.mapr01.fr
balance static-rr
server node3 10.68.7.93:8088 check
server node4 10.68.7.94:8088 check
server node5 10.68.7.95:8088 check
#---------------------------------------------------------------------
# _ _ _ _ ____
# | | | (_)___| |_ ___ _ __ _ _ / ___| _ ____ __
# | |_| | / __| __/ _ \| '__| | | | \___ \| '__\ \ / /
# | _ | \__ \ || (_) | | | |_| | ___) | | \ V /
# |_| |_|_|___/\__\___/|_| \__, | |____/|_| \_/
# |___/
#---------------------------------------------------------------------
# Rules for History Server on MapR cluster : my.mapr01.fr
#---------------------------------------------------------------------
frontend history-srv-my.mapr01.fr
mode tcp
option tcplog
bind *:10020
default_backend history-srv-my.mapr01.fr
backend history-srv-my.mapr01.fr
balance static-rr
server node1 10.68.7.91:10020 check
server node2 10.68.7.92:10020 check backup
frontend history-srv-UI-my.mapr01.fr
mode http
bind *:19888
default_backend history-srv-UI-my.mapr01.fr
backend history-srv-UI-my.mapr01.fr
balance static-rr
server node1 10.68.7.91:19888 check
server node2 10.68.7.92:19888 check backup
#---------------------------------------------------------------------
# ____ _ _ _ _ _
# / ___| _ __ __ _ _ __| | __ | | | (_)___| |_ ___ _ __ _ _
# \___ \| '_ \ / _` | '__| |/ / | |_| | / __| __/ _ \| '__| | | |
# ___) | |_) | (_| | | | < | _ | \__ \ || (_) | | | |_| |
# |____/| .__/ \__,_|_| |_|\_\ |_| |_|_|___/\__\___/|_| \__, |
# |_| |___/
#---------------------------------------------------------------------
# Rules for Spark History on MapR cluster : my.mapr01.fr
#---------------------------------------------------------------------
frontend spark-history-srv-my.mapr01.fr
mode http
bind *:18080
default_backend spark-history-srv-my.mapr01.fr
backend spark-history-srv-my.mapr01.fr
balance static-rr
server node1 10.68.7.94:18080 check
server node2 10.68.7.95:18080 check
#---------------------------------------------------------------------
# _ _ _ ____ ____
# | | | (_)_ _____ / ___| ___ _ ____ _____ _ __ |___ \
# | |_| | \ \ / / _ \ \___ \ / _ \ '__\ \ / / _ \ '__| __) |
# | _ | |\ V / __/ ___) | __/ | \ V / __/ | / __/
# |_| |_|_| \_/ \___| |____/ \___|_| \_/ \___|_| |_____|
#---------------------------------------------------------------------
# Rules for Hive Server 2 on MapR cluster : my.mapr01.fr
#---------------------------------------------------------------------
frontend hiveserver2-ha-my.mapr01.fr
bind *:10000
option tcplog
mode tcp
default_backend hiveserver2-ha-my.mapr01.fr
backend hiveserver2-ha-my.mapr01.fr
mode tcp
balance first
server node3 10.68.7.91:10000 check
server node4 10.68.7.92:10000 check
#---------------------------------------------------------------------
# _ _ _ __ __ _ ____
#| | | (_)_ _____ | \/ | ___| |_ __ _ / ___| _ ____ __
#| |_| | \ \ / / _ \ | |\/| |/ _ \ __/ _` | \___ \| '__\ \ / /
#| _ | |\ V / __/ | | | | __/ || (_| | ___) | | \ V /
#|_| |_|_| \_/ \___| |_| |_|\___|\__\__,_| |____/|_| \_/
#---------------------------------------------------------------------
# Rules for Hive Metaserver load balancing and HA on MapR : my.mapr01.fr
#---------------------------------------------------------------------
frontend hivemeta-ha-my.mapr01.fr
bind *:9083
option tcplog
mode tcp
default_backend hivemeta-ha-my.mapr01.fr
backend hivemeta-ha-my.mapr01.fr
mode tcp
balance first
server node1 10.68.7.91:9083 check
server node2 10.68.7.92:9083 check
#---------------------------------------------------------------------
# _ _ __ ___
# | | | |_ _ ___ / / |_ _|_ ___ _
# | |_| | | | |/ _ \ / / | |\ \ / / | | |
# | _ | |_| | __/ / / | | \ V /| |_| |
# |_| |_|\__,_|\___| /_/ |___| \_/ \__, |
# |___/
#---------------------------------------------------------------------
# Rules for Hue & Ivy load balancing and HA on MapR : my.mapr01.fr
#---------------------------------------------------------------------
frontend hue-console-my.mapr01.fr
mode http
bind *:8888
default_backend hue-console-my.mapr01.fr
backend hue-console-my.mapr01.fr
balance static-rr
server node1 10.68.7.91:8888 check
server node2 10.68.7.92:8888 check
#---------------------------------------------------------------------
# _ _ _ __
# __ _____| |__ | |__ __| |/ _|___
# \ \ /\ / / _ \ '_ \| '_ \ / _` | |_/ __|
# \ V V / __/ |_) | | | | (_| | _\__ \
# \_/\_/ \___|_.__/|_| |_|\__,_|_| |___/
#---------------------------------------------------------------------
# Rules for WebHDFS load balancing and HA on MapR : my.mapr01.fr
#---------------------------------------------------------------------
frontend WebHDFS-console-my.mapr01.fr
mode http
bind *:14000
default_backend WebHDFS-console-my.mapr01.fr
backend WebHDFS-console-my.mapr01.fr
balance static-rr
server node1 10.68.7.91:14000 check
server node2 10.68.7.92:14000 check
#---------------------------------------------------------------------
# ___ ___ ________ _____
# / _ \ / _ \__ /_ _| ____|
# | | | | | | |/ / | || _|
# | |_| | |_| / /_ | || |___
# \___/ \___/____|___|_____|
#---------------------------------------------------------------------
# Rules for OOZIE load balancing and HA on MapR : my.mapr01.fr
#---------------------------------------------------------------------
frontend oozie-console-my.mapr01.fr
mode http
bind *:11000
default_backend oozie-console-my.mapr01.fr
backend oozie-console-my.mapr01.fr
balance static-rr
server node1 10.68.7.91:11000 check
server node2 10.68.7.92:11000 check
#---------------------------------------------------------------------
# ____ ___ ___ ___ ____ ____
# / ___| / _ \ / _ \ / _ \| _ \ |___ \
# \___ \| | | | | | | | | | |_) | __) |
# ___) | |_| | |_| | |_| | __/ / __/
# |____/ \__\_\\___/ \___/|_| |_____|
#---------------------------------------------------------------------
# Rules for Sqoop 2 load balancing and HA on MapR : my.mapr01.fr
#---------------------------------------------------------------------
frontend sqoop2-console-my.mapr01.fr
mode http
bind *:12000
default_backend sqoop2-console-my.mapr01.fr
backend sqoop2-console-my.mapr01.fr
balance static-rr
server node1 10.68.7.91:12000 check
server node2 10.68.7.92:12000 check
#---------------------------------------------------------------------
# _ _ ____ _____ _ _ __ _ ____
# | | | | __ ) |_ _| |__ _ __(_)/ _| |_/ ___| ___ _ ____ _____ _ __
# | |_| | _ \ | | | '_ \| '__| | |_| __\___ \ / _ \ '__\ \ / / _ \ '__|
# | _ | |_) | | | | | | | | | | _| |_ ___) | __/ | \ V / __/ |
# |_| |_|____/ |_| |_| |_|_| |_|_| \__|____/ \___|_| \_/ \___|_|
#---------------------------------------------------------------------
# Rules for Hbase ThriftServer load balancing and HA on MapR : my.mapr01.fr
#---------------------------------------------------------------------
frontend hbThriftServerUI-console-my.mapr01.fr
mode http
bind *:9095
default_backend hbThriftServerUI-console-my.mapr01.fr
backend hbThriftServerUI-console-my.mapr01.fr
balance static-rr
server node1 10.68.7.91:9095 check
server node2 10.68.7.92:9095 check
frontend hbThriftServer-ha-my.mapr01.fr
bind *:9090
option tcplog
mode tcp
default_backend hbThriftServer-ha-my.mapr01.fr
backend hbThriftServer-ha-my.mapr01.fr
mode tcp
balance first
server node1 10.68.7.91:9090 check
server node2 10.68.7.92:9090 check
#---------------------------------------------------------------------
# ____ _ _ _ ____ ______ __
# / ___| _ __ __ _ _ __| | __ | | (_)_ ___ _ / ___|| _ \ \ / /
# \___ \| '_ \ / _` | '__| |/ / | | | \ \ / / | | | \___ \| |_) \ \ / /
# ___) | |_) | (_| | | | < | |___| |\ V /| |_| | ___) | _ < \ V /
# |____/| .__/ \__,_|_| |_|\_\ |_____|_| \_/ \__, | |____/|_| \_\ \_/
# |_| |___/
#---------------------------------------------------------------------
# Rules for Spark Livy Server load balancing and HA on MapR : my.mapr01.fr
#---------------------------------------------------------------------
frontend livyserver-console-my.mapr01.fr
mode http
bind *:8998
default_backend livyserver-console-my.mapr01.fr
backend livyserver-console-my.mapr01.fr
balance static-rr
server node1 10.68.7.91:8998 check
server node2 10.68.7.92:8998 check
#---------------------------------------------------------------------
# __ __ ____ ___ _
# | \/ | _ _ / ___| / _ \ | |
# | |\/| | | | | | \___ \ | | | | | |
# | | | | | |_| | ___) | | |_| | | |___
# |_| |_| \__, | |____/ \__\_\ |_____|
# |___/
#---------------------------------------------------------------------
# Rules for MySQL load balancing and HA on MapR : my.mapr01.fr
#---------------------------------------------------------------------
frontend mysql-ha-my.mapr01.fr
bind *:3306
option tcplog
mode tcp
default_backend mysql-ha-my.mapr01.fr
backend mysql-ha-my.mapr01.fr
mode tcp
balance first
server node1 10.68.7.91:3306 check
server node5 10.68.7.95:3306 check backup
#---------------------------------------------------------------------
#---------------------------------------------------------------------
# ____ _ _ _ _ _ ____
# / ___|| |_ __ _| |_ ___ | | | | / \ | _ \ _ __ _____ ___ _
# \___ \| __/ _` | __/ __| | |_| | / _ \ | |_) | '__/ _ \ \/ / | | |
# ___) | || (_| | |_\__ \ | _ |/ ___ \| __/| | | (_) > <| |_| |
# |____/ \__\__,_|\__|___/ |_| |_/_/ \_\_| |_| \___/_/\_\\__, |
# |___/
#---------------------------------------------------------------------
#---------------------------------------------------------------------
listen stats *:1936
stats enable
stats uri /
stats hide-version
stats auth openvpn:mapr
#---------------------------------------------------------------------
# OPTIONAL
# _ _ _____ _____ ____ ____
# | | | |_ _|_ _| _ \| _ \
# | |_| | | | | | | |_) | | | |
# | _ | | | | | | __/| |_| |
# |_| |_| |_| |_| |_| |____/
#---------------------------------------------------------------------
# Rules for Apache HTTPD on MapR cluster : my.mapr01.fr
#---------------------------------------------------------------------
frontend httpd.mapr01.fr
mode http
bind *:80
default_backend httpd.mapr01.fr
backend httpd.mapr01.fr
balance static-rr
server node1 10.68.7.91:80 check backup
server node2 10.68.7.92:80 check backup
server node3 10.68.7.93:80 check backup
server node4 10.68.7.94:80 check backup
server node5 10.68.7.95:80 check
#---------------------------------------------------------------------
# OPTIONAL
# __________ ____ ____ _____ _ ___ _ _
# |__ / ____| _ \| _ \| ____| | |_ _| \ | |
# / /| _| | |_) | |_) | _| | | | || \| |
# / /_| |___| __/| __/| |___| |___ | || |\ |
# /____|_____|_| |_| |_____|_____|___|_| \_|
#---------------------------------------------------------------------
# Rules for Apache Zeppelin on MapR cluster : my.mapr01.fr
#---------------------------------------------------------------------
frontend zeppelin.mapr01.fr
mode http
bind *:8080
default_backend zeppelin.mapr01.fr
backend zeppelin.mapr01.fr
balance static-rr
server node5 10.68.7.95:8080 check