We're experimenting with various ways to throttle user actions in a given time period:
- Limit question/answer posts
- Limit edits
- Limit feed retrievals
For the time being, we're using the Cache to simply insert a record of user activity – if that record exists if/when the user does the same activity, we throttle.
Using the Cache automatically gives us stale data cleaning and sliding activity windows of users, but how it will scale could be a problem.
What are some other ways of ensuring that requests/user actions can be effectively throttled (emphasis on stability)?
Best Solution
Here's a generic version of what we've been using on Stack Overflow for the past year:
Sample usage:
The ASP.NET Cache works like a champ here - by using it, you get automatic clean-up of your throttle entries. And with our growing traffic, we're not seeing that this is an issue on the server.
Feel free to give feedback on this method; when we make Stack Overflow better, you get your Ewok fix even faster :)