Reputation: 570
I'm developing a NodeJS Application that will send a lot of requests to a RESTful API (For TwitchTV). I have permission from TwitchTV to make the mass of requests, but I was wondering if I could implement anything to decrease the stress on my server.
I've yet to perform tests, but I can have anything up to 200 Users at a time who would I would need to request data from TwitchTV's RESTful API every 2-3 seconds per user. I've looked in to the HTTP Agent and keep-alive
for NodeJS but I can't find any applications of it under my circumstances. I'll only ever be requesting data from a single host (https://api.twitch.tv), and with 200 concurrent users that would be 200 HTTPS requests every 2-3 seconds.
Is there anything I can do to reduce stress for both my server and the TwitchTV API? Caching isn't really an option due to requiring the new data.
Upvotes: 0
Views: 2646
Reputation: 6017
If you need fresh data every 2-3 seconds, and the only API available to you is a single call, then you will need to make a lot of calls. Not a great way around that. Some thoughts are below.
Other ideas to reduce load on HTTP:
Upvotes: 1