forked from HariSekhon/HAProxy-configs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
apache-drill.cfg
66 lines (59 loc) · 2.21 KB
/
apache-drill.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
# vim:ts=4:sts=4:sw=4:et
#
# Author: Hari Sekhon
# Date: 2017-12-16 10:32:58 +0000 (Sat, 16 Dec 2017)
#
# https://github.com/harisekhon/haproxy-configs
#
# License: see accompanying Hari Sekhon LICENSE file
#
# If you're using my code you're welcome to connect with me on LinkedIn and optionally send me feedback to help steer this or other code I publish
#
# https://www.linkedin.com/in/harisekhon
#
# ============================================================================ #
# H A P r o x y - A p a c h e D r i l l
# ============================================================================ #
# Options:
#
# 1. use ZooKeeper connection string
# 2. use Load Balancer to avoid exposing ZooKeeper to clients
# Beware that the Apache Drill health check API is not always reliable, as documented in this bug:
#
# https://issues.apache.org/jira/browse/DRILL-5990
frontend apache-drill-ui
description "Apache Drill UI"
bind *:8047
default_backend apache-drill-ui
frontend apache-drill-sql
description "Apache Drill SQL"
bind *:31010
mode tcp
option tcplog
default_backend apache-drill-sql
backend apache-drill-ui
description "Apache Drill UI"
# using 'source' for both SQL + UI means you'll see your own queries in UI even without global query list
#balance roundrobin
balance source
option httpchk GET /status
http-check expect string Running
acl internal_networks src 192.168.0.0/16 172.16.0.0/12 10.0.0.0/8 127.0.0.1
http-request deny if ! internal_networks
server apache-drill apache-drill:8047 check
server drill drill:8047 check
server docker docker:8047 check
server 192.168.99.100 192.168.99.100:8047 check
backend apache-drill-sql
description "Apache Drill SQL"
#balance leastconn
balance source
mode tcp
acl internal_networks src 192.168.0.0/16 172.16.0.0/12 10.0.0.0/8 127.0.0.1
tcp-request content reject if ! internal_networks
option httpchk GET /status
http-check expect string Running
server apache-drill apache-drill:31010 check port 8047
server drill drill:31010 check port 8047
server docker docker:31010 check port 8047
server 192.168.99.100 192.168.99.100:31010 check port 8047