I am building a SAAS service in Node and plan to add 3 different subscription options. Depending on the subscription plan, I want to add rate limits (X hits per second) and quota limits (Y requests per day) to the API calls.
What are my options other than building an In house solution? (I am thinking to add Redis cache to keep track of number of requests and throw RateLimit error if the user has reached his API quota limits.)
Is there any ready made library or service available that provides similar functionality?
My product solves this exact problem! Lightfront is an API Gateway that handle API keys validation and rate limiting. Currently I’m working on adding Stripe integration so you can define plans in Stripe, set rates in Lightfront for each plan type, and get going immediately.
Forgot to mention, we are in closed beta so drop your email on the website!
You may want to look at AWS API Gateway. You can create and manage; plans, api keys, rate limits, burst limits etc.
Using indie hackers' projects and supporting them is another good way.