vend / developer-wiki

5 stars 0 forks source link

Move API throttling to a leaky bucket algorithm #3

Closed achadee closed 7 years ago

achadee commented 7 years ago

A lot of modern APIs are moving away from timed interval throttling to leaky bucket which allows for a more consistent distributed load.

Check it out here! https://en.wikipedia.org/wiki/Leaky_bucket

You can still achieve the same API limitations without freezing your API for 5 minutes!

pzurek commented 7 years ago

Thank for the suggestion. It is something we have considered in the past, just not very high on the priority list. However, the first step we're taking to speed things up is increasing the page sizes and making the API faster. Most endpoints of the API 2.0 deliver 10000 objects in a single request, which means that most resources can be obtained in just a few requests.

achadee commented 7 years ago

A lot of our throttling issues are obtained through post requests (creating 1000's of products). Are you guys addressing this? I read over the docs and I didn't see anything for creating products so I'm not sure 😄

pzurek commented 7 years ago

Bulk write operations are also something we are considering. Feel free to create a separate issue for that too. If a lot of people end up 👍 -ing it, we may look at it with a bit more priority.

pzurek commented 7 years ago

I think we can close this one for now in favour of #5