# 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 (centralized foreman) # ============================================================================ # # Centralizes the foreman Drill query planning node so all queries appear in one UI # # This is a workaround to the lack of a default global query list across all Drill foreman nodes as documented here: # # https://issues.apache.org/jira/browse/DRILL-6061 # Put only 2-3 Drill foreman nodes in an Active / Standby configuration for redundancy - under normal operating circumstances # only the first will be used for query planning so you can see all queries in the same Drill UI. # # Beware this will limit scalability of the query planning, coordination and final aggregation steps. # If you have a clustered filesystem such as MapR-FS or HDFS then configuring the PStore to exist on it and Using the 'source' option in the default adjacent apache-drill.cfg is a better option and should be preferred: # # https://drill.apache.org/docs/persistent-configuration-storage/ # 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" balance first 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 backup server docker docker:8047 check backup server 192.168.99.199 192.168.99.100:8047 check backup backend apache-drill-sql description "Apache Drill SQL" balance first 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 backup server docker docker:31010 check port 8047 backup server 192.168.99.100 192.168.99.100:31010 check port 8047 backup