Last active
April 30, 2018 16:32
-
-
Save OneCricketeer/ba715437b04618b8e5f962e0428a9683 to your computer and use it in GitHub Desktop.
Nginx HiveServer LoadBalancer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# stream.conf.d/hive.conf | |
upstream hiveservers { | |
hash $remote_addr consistent; | |
server hive-1.example.com:10000 weight=5 max_fails=3; | |
server hive-2.example.com:10000; | |
} | |
server { | |
listen 10000; # Make this server as a reverse proxy for HiveServer2 | |
proxy_pass hiveservers; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[beeswax] | |
# Point local Nginx server within Hue at Hive proxy | |
hive_server_host=localhost | |
hive_server_port=10000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Outside of http{} | |
stream { | |
include /etc/nginx/stream.conf.d/*.conf; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment