-
-
Save ftdysa/55ccf908306c89f7b3cdadff63ddf272 to your computer and use it in GitHub Desktop.
Nginx config for InfluxDB HA
This file contains 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
http { | |
client_max_body_size 20M; | |
upstream influxdb { | |
server server1:8086; | |
server server2:8086; | |
} | |
upstream relay { | |
server server1:9096; | |
server server2:9096; | |
} | |
server { | |
listen 7076; | |
location /query { | |
limit_except GET { | |
deny all; | |
} | |
proxy_pass http://influxdb; | |
} | |
location /write { | |
limit_except POST { | |
deny all; | |
} | |
proxy_pass http://relay; | |
} | |
} | |
} | |
stream { | |
upstream test { | |
server server1:8003; | |
server server2:8003; | |
} | |
server { | |
listen 7003 udp; | |
proxy_pass test; | |
proxy_timeout 1s; | |
proxy_responses 1; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment