How to throttle requests of an API?



Hi,
I have a redumentary API set up and I'm looking for an easy method to
throttle too many requests from 1 IP and also perhaps protect against
DoS attacks? Ideally, there shouldn't be allowed more then say 1
request every 10 seconds per IP.

ex: http//:domain.com/api?method=dothis&params=whatever

I could use memcache to store the IP/timestamp of the last request and
check against that, or use a database.

Is there a better way?
.



Relevant Pages

  • Re: Cobol: Maximum number of FD Statements
    ... We let them have at it, but protect the system. ... They can request what they want. ... we will start seeing paging or aux storage ... Do you think limiting that with an exit ...
    (bit.listserv.ibm-main)
  • Re: Suggestion please
    ... >User request form will generate Ref No and request date and time ... Table Design view, set the Default Value of your RequestDateTime field ... and AllowAditions properties of the Form object. ... If you need to protect the data against tampering, ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Stopping Messenger Pop Up
    ... When the Messenger service is disabled, the computer will no longer listen ... background listening to the request. ... If you want a better way to protect your computer so that it won't get ... > need to protect your computer with a firewall, ...
    (microsoft.public.outlook)
  • Re: OT: Hurricane Katrina
    ... Cigar Clintoon fully supported every request made of him. ... Standing by for more drivel. ... > the US Army Corps of Engineers for projects to protect New Orleans. ...
    (rec.collecting.coins)
  • Re: [PATCH] Audit: Add TTY input auditing
    ... Logging what was requested is insufficient and logging what was ... which may or may not have resulted in an actual request is ... impress the monkeys or to protect your systems (or as usually is the case ...
    (Linux-Kernel)