Is there a commonly accepted pattern (or class library, or etc.) for throttling certain form submissions for PHP MVC applications? I'm specifically thinking of the scenario where someone is running a dictionary attack against one of your login forms, and you want to block them after X requests in Y seconds, or if a certain pattern of requests is detected.
Specific questions:
Do any frameworks come with this functionality built in? If not, what's a common way of implementing this in a web based, PHP MVC architecture?
Is this something that should be handled at the application layer, or should the web server itself be dealing with this kind of malfeasance?
I can think of a number of ways to implement this, but it seems like the kind of things all applications should have, and therefore a general solution should already exist.