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
backend per_ip_and_url_rates | |
stick-table type binary len 8 size 1m expire 24h store http_req_rate(24h) | |
backend per_ip_rates | |
stick-table type ip size 1m expire 24h store gpc0,gpc0_rate(30s) |
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
# using such a setup requires `apt-get install lua-nginx-redis` under Ubuntu Trusty | |
# more info @ http://wiki.nginx.org/HttpLuaModule#access_by_lua | |
http { | |
lua_package_path "/etc/nginx/include.d/?.lua;;"; | |
lua_socket_pool_size 100; | |
lua_socket_connect_timeout 10ms; | |
lua_socket_read_timeout 10ms; | |
server { |