Comment by la2eee on 06/06/2023 at 16:47 UTC

4 upvotes, 1 direct replies (showing 1)

View submission: Lets talk about those API calls

View parent comment

Providing a websocket is way more taxing on the hardware, AFAIK. You need to have an open connection that stays open versus API calls, where you have only very short open connections, but more of them.

Correct me if I'm wrong.

Replies

Comment by balta3 at 06/06/2023 at 19:01 UTC

3 upvotes, 1 direct replies

Polling an Rest API evry few minutes means doing all the overhead every few minutes, like HTTP headers and TLS handshakes, an open long running connection does produce no hardware usage at all while idle and could be kept open with sending one byte every few minutes.