Our great sponsors
-
node-rate-limiter
A generic rate limiter for node.js. Useful for API clients, web crawling, or other tasks that need to be throttled
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
I want to build a product with metered billing, very similar to the example project here: https://github.com/stripe-samples/subscription-use-cases/tree/master/usage-based-subscriptions
1) If I run a CRON job every 24 hours to get the usage for all my users and report their usage to Stripe. Say I have 100,000 users, I'd definitely trip the 100/sec API rate limit still. Would I have to just wrap that reporting code inside something like node-rate-limiter and throttle those API calls to 100/sec and still take 1,000 seconds to complete my CRON job? Or is there better practice ways of handling this?