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

3 upvotes, 1 direct replies (showing 1)

View submission: Lets talk about those API calls

View parent comment

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.

Replies

Comment by la2eee at 06/06/2023 at 20:44 UTC

2 upvotes, 1 direct replies

But isn't a machine limited to a certain amount of simultaneous open connections? One server, for example, could handle 30k websocket connections for 30k users but 500k rest API requests for 100k users. There's a reason rest APIs are popular. It's cheaper.