Re:Back to basics: Why we chose long-polling over websockets
by rednafi on Sunday January 05, 2025 @03:14PM
(#42604648)
Yeah, some servers close connections when there’s no data transfer. When the backend holds the connection while polling the database until a timeout occurs or the database returns data, it needs to send something back to the client to keep the connection alive. I wonder what could be sent in this case and whether it would require special client-side logic.
[ Parent
| on HN ]
Re:Back to basics: Why we chose long-polling over websockets
by mhitza on Sunday January 05, 2025 @09:46PM
(#42607108)
In the HTTP model, technically status code 102 Processing would fit best. Though, no longer part of the HTTP specification.
100 Continue could be usable as a workaround. Would probably require at a bare minimum some extra integration code on the client side.