September 8, 2018

Ask IH: How to limit API requests for per plans? [SaaS]

Greetings all!

I have a technical question. I'm planning to publish the paid plans for BotDelive. But, I'm curious about what is the best practice to limit the quota and other specifications for each API. I will have 4 different monthly subscription plans that will have different offers.

Should I code the API limitation thing from scratch or use the services like Amazon API Gateway or something similar? What is your advice?

Thanks.


  1. 2

    What you're looking for is an API Gateway - tons out there and definitely worth using one instead of trying to roll your own

    Here's a massively popular open source gateway: https://konghq.com

    It'll do other key things like analytics, security etc.

    Having previously done an RFP for a client on gateways, I would say that Apigee is the best in the market - But not free!

    1. 1

      I will definitely check KongHQ. Thanks!

  2. 2

    Which language/framework have you used in the backend. I remember for our product - Cryptlex (https://cryptlex.com) it just took us few hours to add rate limiting support due to already existing libraries for our backend framework.

    Using Amazon API Gateway or any other service for this small feature seems like an overkill, and unnecessarily adds a vendor lock.

    1. 1

      I'm using NodeJS and ExpressJS. I think you're right. I will code it by myself. Do you have any library recommendation for NodeJS (if you're a user of it, of course)? Thank you. 🙏

  3. 2

    You can build your own rate limiting for your APIs. Or you focus on your core product and try one of the API gateways to start (like Amazon one), a lot of them have free or low cost plans to start.

    If you getting a lot users and you feel that the API gateway cost is too high, you can always build your own later. Or pay, at least you have traction already. It is a nice problem to have.

    1. 1

      Yes, I think for the long-term perspective, I should code it from now. Thank you. 😊