Skip to content

Instantly share code, notes, and snippets.

@goodjob1114
Forked from acherunilam/influxdb.conf
Last active January 25, 2019 07:37
Show Gist options
  • Save goodjob1114/de0c51b5c82257acc10b67f7773d67bb to your computer and use it in GitHub Desktop.
Save goodjob1114/de0c51b5c82257acc10b67f7773d67bb to your computer and use it in GitHub Desktop.
Nginx config for InfluxDB HA
worker_processes 5;
worker_rlimit_nofile 8192;
events {
worker_connections 4096;
}
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 /ping {
limit_except GET {
deny all;
}
proxy_pass http://influxdb;
}
location /query {
limit_except GET POST {
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