mianegolan

Do I need to limit / throttle / cache in my API client?

Recommended Posts

I made a super-simple parts checklist generator that uses the Rebrickable API.  I don't intend to use it heavily or promote it widely, so I don't expect that it will send a huge amount of traffic to the Rebrickable API, but I currently have no controls on the amount of traffic that other people can generate under my API Key because this is a page on the public internet.

Do I need to have access controls / rate limiting / caching on my end?  Or can I rely on the API throttling my API Key appropriately in the unlikely event that this sees a period of heavy usage or abuse?

(At present, this tool is stateless.  It's whole job is much simpler than proper throttling and caching logic would be -- adding this would more-than-double its complexity.  I'm kind of hoping it's considered OK to just lean on the API for this.)

Thanks!

Share this post


Link to post
Share on other sites

The server will start to return you error codes (429) if you send requests too fast, so you should at least handle them. But, not sending hundreds of requests per second is also good :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now