d3sd1 / OnLoL-Riot-API

Riot api base for PHP. Updated constantly and almost without bugs!
2 stars 2 forks source link

Tracking Rate Limits #1

Closed SeaRoth closed 8 years ago

SeaRoth commented 8 years ago

Description: Assuming I'm not missing something -- imagine your library being used on lolnexus.com where potentially hundreds of API calls are made per minute

Problem: Going over rate limit

Steps to reproduce:

  1. User imaqtpie searches match 2281320127
  2. Nightblu3 searches match 2281320127
  3. 800 more people search the same match within 5 minutes

Results: Rate limit exceeded

Strategies:

  1. Mutex
    • Keep track of api calls using MYSQL

Conclusion: What do you think? Are there any other strategies I should consider? Am I thinking of this in the correct way?

d3sd1 commented 8 years ago

Well mate, Im sending the commit that fix it. Forgot to update it! I just programmed it (and more things) few days ago. Can you recheck code on submit? Thank you! :)

SeaRoth commented 8 years ago

Yessir! Thank you for the quick reply! That was amazing actually lol =)

d3sd1 commented 8 years ago

There is the corrections! =) If you have any suggerence, or something, dont doubt on ask me! =)