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
Can someone help me what I am doing wrong.
Hey, I want to throttle my rails api request to 10 requests per minute. Following is the configuration I have set:
below is the tracking configuration I have set:
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
Can someone help me what I am doing wrong.