4 ms·
Yup, WebSockets could certainly be used for push. I think the choice of HTTP vs WebSockets comes down to architecture style. WebSockets are optimized for bidir
by jkarneges 9y ago
Yup, WebSockets could certainly be used for push.
I think the choice of HTTP vs WebSockets comes down to architecture style. WebSockets are optimized for bidirectional communication with a specific remote server. In other words, something about the service makes it better if client I/O is sticky, maybe due to an in-memory session.
HTTP can make more sense in a stateless architecture, where GETs and POSTs could potentially go to different servers in the cluster. Of course, one could use WebSockets statelessly too (have no messages depend on past messages for context).