Prevent calling a web service too many times

Viewed 3842

I provide a Web Service for my clients which allow him to add a record to the production database.

I had an incident lately, in which my client's programmer called the service in a loop , iterated to call to my service thousands of times.

My question is what would be the best way to prevent such a thing.

I thought of some ways: 1.At the entrence to the service, I can update counters for each client that call the service, but that looks too clumbsy. 2.Check the IP of the client who called this service, and raise a flag each time he/she calls the service, and then reset the flag every hour.

I'm positive that there are better ways and would appriciate any suggestions.

Thanks, David

3 Answers
Related