Skip to content

Instantly share code, notes, and snippets.

@wenli09876545321
wenli09876545321 / nginx.conf
Created February 27, 2018 09:12 — forked from lloydzhou/nginx.conf
nginx srcache module to server stale data, using lua-resty-lock to make one request to create new cache, and using "lua-resty-http" + "ngx.timer.at" to update new cache in background.
upstream www {
server 127.0.0.1:9999;
}
upstream redis {
server 127.0.0.1:6379;
keepalive 1024;
}
lua_shared_dict srcache_locks 100k;
server {