Monday 26 November 2018

Simultaneous Time Intensive HTTP Requests

I am running Node on a RPi as a backend. Every minute it needs to HTTP Request from 40 clients more or less simultanously. The payload is very small and needs only to be done every minute. The problem is that the response time is around 500ms per client + DB writes. I had problems in the past of them locking up the main thread which is why I now delay each request by some milliseconds and use tight timeouts. Is there anything more I can do besides writing everything as asynchronous as possible? Even though this is not a CPU intensive task, would this be a candidate for offloading work to another thread?​Thanks in advance!

Submitted November 26, 2018 at 01:30PM by Vivida

No comments:

Post a Comment