Skip to content

Instantly share code, notes, and snippets.

@ftdysa
Forked from acherunilam/influxdb.conf
Created April 7, 2017 17:50
Show Gist options
  • Save ftdysa/55ccf908306c89f7b3cdadff63ddf272 to your computer and use it in GitHub Desktop.
Save ftdysa/55ccf908306c89f7b3cdadff63ddf272 to your computer and use it in GitHub Desktop.
Nginx config for InfluxDB HA
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