Created
December 20, 2016 02:55
-
-
Save gavinzhou/2de9d4ade4242606181dffd670987031 to your computer and use it in GitHub Desktop.
nginx-cache-influxdb-query
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
proxy_cache_path /var/cache/nginx-influxdb levels=2:2 keys_zone=influxdb:6m max_size=300m inactive=2d; | |
server { | |
listen 8088; | |
server_name {{ grains['fqdn'] }}; | |
set $cbypass 0; | |
set $mycc "public, max-age=20s"; | |
location / { | |
add_header Cache-Control $mycc; | |
proxy_pass http://acc2mfcfads.salt.xxx.ca:8086/; | |
proxy_cache_use_stale timeout updating error invalid_header; | |
proxy_cache influxdb; | |
# proxy_cache_valid any 5m; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment