Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(*) use dedicated shm for rate-limiting plugins #3311

Merged
merged 1 commit into from
Mar 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions kong/constants.lua
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,6 @@ return {
"kong_process_events",
"kong_cluster_events",
"kong_healthchecks",
"kong_rate_limiting_counters",
},
}
2 changes: 1 addition & 1 deletion kong/plugins/rate-limiting/policies/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ local reports = require "kong.core.reports"


local ngx_log = ngx.log
local shm = ngx.shared.kong_cache
local shm = ngx.shared.kong_rate_limiting_counters
local pairs = pairs
local fmt = string.format

Expand Down
2 changes: 1 addition & 1 deletion kong/plugins/response-ratelimiting/policies/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ local reports = require "kong.core.reports"


local ngx_log = ngx.log
local shm = ngx.shared.kong_cache
local shm = ngx.shared.kong_rate_limiting_counters
local pairs = pairs
local fmt = string.format

Expand Down
1 change: 1 addition & 0 deletions kong/templates/nginx_kong.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ lua_shared_dict kong_cache ${{MEM_CACHE_SIZE}};
lua_shared_dict kong_process_events 5m;
lua_shared_dict kong_cluster_events 5m;
lua_shared_dict kong_healthchecks 5m;
lua_shared_dict kong_rate_limiting_counters 12m;
> if database == "cassandra" then
lua_shared_dict kong_cassandra 5m;
> end
Expand Down
1 change: 1 addition & 0 deletions spec/fixtures/custom_nginx.template
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ http {
lua_shared_dict kong_process_events 5m;
lua_shared_dict kong_cluster_events 5m;
lua_shared_dict kong_healthchecks 5m;
lua_shared_dict kong_rate_limiting_counters 12m;
> if database == "cassandra" then
lua_shared_dict kong_cassandra 5m;
> end
Expand Down