Sendgrid-nodejs: Add Rate Limiting Support

Created on 8 Nov 2016  ·  4Comments  ·  Source: sendgrid/sendgrid-nodejs

We would like to add support for v3 Web API rate limits, as described here.

_How would you like this to be implemented?_ Or please give a thumbs up to express your interest in us implementing to move this task up our queue.

PRs are always welcome as well :)

very hard help wanted help wanted community enhancement up for grabs up-for-grabs

Most helpful comment

@thinkingserious it's not really clear what limits apply to what endpoints, and what those limits are. I realise this isn't the forum to discuss this, but without knowing how likely we are to hit said limit, we cant say for sure what the best solution is.

Being able to pass a retry strategy is a nice idea though, and allows for in memory or queuing solutions.

All 4 comments

What kind of support did you have in mind ?

If letting the library automatically handle rate limit by the api is what you had in mind then I think that it's better to leave it to the library user to handle.

Otherwise you will need to create a client side email queue that throttles sending emails according to the api limit response.
It's the kind of unwanted "magic" to the library user.

Hi @mderazon!

Thanks for the feedback!

So far, I'm really liking @Jericho's solution for C#: https://github.com/sendgrid/sendgrid-csharp/issues/369#issuecomment-263744071

@thinkingserious it's not really clear what limits apply to what endpoints, and what those limits are. I realise this isn't the forum to discuss this, but without knowing how likely we are to hit said limit, we cant say for sure what the best solution is.

Being able to pass a retry strategy is a nice idea though, and allows for in memory or queuing solutions.

The endpoints do have different limitations, but they all report the limitations in the same way. Does that help? :#

Was this page helpful?
0 / 5 - 0 ratings