I am currently creating a basic API that will take a few parameters, fetch some data from a 3rd party API, do some processing and return it as json to be displayed with AJAX. Because this is using a 3rd party API and takes a few seconds to respond I am worried about it being abused.
My thoughts are to log the ip address and not to run the script again unless the previous instance has finished. I understand that attackers can use multiple IPs, but am not sure how to get around that.
Another thought is to limit the total running scripts as well.