I have an app running on a VPS.
My server sends HTTP requests to an external API at a very high rate. This has caused me to exceed my provider's outgoing traffic limit.
My search on the internet has provided me with loads of information on how to balance incoming traffic, but my issue is outgoing traffic, on which I found minimal info, none of which I could correlate to my situation.
Purchasing a dedicated server, in order to have a higher bandwidth allowance, is not affordable for me (at least until the app becomes profitable enough, which requires it to scale up first, hence my problem).
Would the following approach solve my issue?
I keep my current server but I modify the program so that instead of performing the outgoing HTTP requests, it creates a queue, containing the data I use to form each one. I also get a few smaller VPSs, whose job is to independently and intermittently check if any requests are pending in the main servers queue. If there is a pending request to be performed, it uses the data in the queue to form and send out the corresponding request and finally when a response is received from the external API, send the HTTP response to the main server.
Note: My HTTP requests go through an external proxy service, which adds overhead to each request. Advice on minimizing the requests size could also be helpful.
It is my first time deploying an app with high traffic and my minimal knowledge of networks doesn't help. Any input would be greatly appreciated.