Jump to: navigation, search

Swift/ideas/ratelimiting metrics

< Swift‎ | ideas

Provide more insight into ratelimiting

Right now the impact of ratelimit middleware is hard to understand when looking at aggregated statsd metrics and can produce some confusing timing requests. The ratelimiting middleware could attach information to the request env to record how long a particular request spent in sleep before it was passed along the pipeline.

With this information available to other middlewares such as proxy-logging or swift-informant there is the ability to differentiate between time spent actually serving requests and time spent sleeping to get the rate limit into an acceptable range. The proxy-logging timer metrics can be artificially inflated, especially with methods such as DELETE. While first-byte timings in proxy-logging only look at GET requests, other stats middlewares also record this information for some of the methods that are subject to rate limits.

ahale would like to gauge interest around this but doesn't use proxy-logging statsd and probably wouldn't be able to produce the code.