You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Rails request throttling just half the given limit #594
Hey, I want to throttle my rails api request to 10 requests per minute. Following is the configuration I have set:
Rack::Attack.throttle("throttle_aggregate_data_per_min", limit: 10, period: 60) do |request|
if request.path == "/v2/aggregate_data"
get_client_id(request)
end
end
below is the tracking configuration I have set:
Rack::Attack.track("throttle_aggregate_data_per_min", limit: 10, period: 60) do |request|
if request.path == "/v2/aggregate_data"
get_client_id(request)
end
end
somehow I am able to send just 5-6 requests every minute as opposed to 10 requests that should be allowed.
rack-attack version -> 6.5
config.cache_store = :redis_store
Activity