I want to be able to say that if a request from the same user (for an API) starts to happen quickly enough that their requests per minute reaches a certain level, I want to start denying the requests until it slows down. (Just like the guys at Zendesk did).
The question is two fold, what's an efficient way of calculating the request rate (minimal DB read/writes) and where in the MVC hierarchy (Action filter, Controller method override?) would this code best reside?