disconnect / apache-websocket

Apache WebSocket module
Apache License 2.0
196 stars 46 forks source link

Apache MPM tuning for websockets #29

Open tonyabo opened 10 years ago

tonyabo commented 10 years ago

I have downloaded and played with apache-websocket and it--besides being very nice code--appears to be a good fit for our browser based application. We are currently doing some ugly stuff with Ajax HTTP requests that have to be closed and reopened every time we want the server to send something to the browser. Websockets seem to be a far superior solution. We envision each user session having a websocket open to the server for the life of the session, along with some HTTP requests (maybe someday we'll do everything on the websocket, but not yet).

My concern is that each Apache thread or process that becomes a websocket endpoint means one child thread or processes no longer servicing HTTP requests. It seems to me that that would have a significant impact on the tunable logic in the MPMs that ensure that there are enough handlers running at any given time.

Should or does the module do anything to alert Apache that handlers of websocket endpoints are no longer available for normal HTTP request processing? Has this discussion been had somewhere else that I might reference?

Thanks.

brauliobo commented 10 years ago

I'm interested in this too

jchampio commented 8 years ago

I don't have an answer yet, but I think the new mod_http2 currently has a similar problem in that one client connection will effectively monopolize one of those resources. We're continuing the discussion little by little and I will try to eventually address this issue in my mod_websocket fork.