Server-sent events connection sharing?

PSS

Well-Known Member
#1
A question:

(Keepalive is on.)
if I initiate server-sent events (SSE text/event-stream) for 2000 logged clients (every x secs data update per client), does lsws tie 2000 http connections for those (when waiting for data), or can it share existing ones?

I could of course do the server side script "wrong format" and the automatic reconnect of SSE would then close it on error and start a new connection every x secs. This is like AJAX polling every x secs (but simpler), but I think that would re-use http connections, right?
 

mistwang

LiteSpeed Staff
#2
If keepalive timeout is longer than x seconds, then the connection belong to one client is more likely reused by that client. the connection cannot be shared among clients.
 
Top