Should I Use a Separate Instance for Public APIs?

0
8
Asked By SunnyAspen77 On

I'm working on a SaaS app where we've already separated the API from the front-end. Now, I'm considering opening up our API to allow third-party developers to build applications that extend our service. Should I set up a separate API endpoint, like api.example.com, just for external use, distinct from our internal API used by our web and mobile apps?

1 Answer

Answered By TechGuru42 On

It really depends on your specific use case. If you can easily differentiate your public APIs from internal ones using paths, host names, or headers, then that would be a good approach. This way, you can load balance effectively and ensure that your internal API remains robust even under public traffic. Personally, I like to create a separate application for the public API so it can manage its own access rights, unless specific users need certain functionalities that the internal API already covers.

UrbanExplorer88 -

Exactly! I also prefer to keep them separate to avoid any issues with regular users if the public API gets overloaded. Plus, tracking public API resource usage can help determine if I need to adjust pricing for access.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.