You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by An...@bmw.de on 2015/05/04 17:36:00 UTC

[users@httpd] LongPolling/WebSockets connection handling & max. connections

Hello everybody,

currently I'm having an open question/topic about web sockets and long polling, which I'm not completely sure about the current handling within the Apache web server.

The main question is about the mechanism "how websockets connections will be handled from the Apache?".

Currently I have the following worker configuration within my Apache webserver (worker mpm):

       StartServers            80
       ServerLimit            160
       MinSpareThreads         25
       MaxSpareThreads        250
       ThreadsPerChild         50
       MaxRequestWorkers     8000
       MaxConnectionsPerChild   0

This allows me to accept 8000 simultaneous connections and server more then 8000 clients, because from my understand Apache takes the connection on hold after he has proxied the request and until he get's the response. So normally I'm able to serve more than 8000 clients, because not all send requests or get a response simultaneously.

But then if I run a client server architecture, which  uses web sockets for communication, the socket or connection is normally hold open all the time and from my understanding the Apache webserver is not able to take the connection in a, let's call it, "hold state". So if I use web sockets is Apache still able to server more then 8000 clients/connections with the configuration above, or is he no longer able to set connections on hold when proxying websockets?

Also does Apache open one socket within the OS for each connection, because then this would limit the usage of 65k clients on one server anyway, or are there more connections possible?

Are there any experiences about the maximum number of web socket connections and best practices for the Apache by using web sockets? Is it better to run apache with the event mpm then the worker mpm within that scenario?

Thanks in advance & Best regards,
André


Re: [users@httpd] LongPolling/WebSockets connection handling & max. connections

Posted by Eric Covener <co...@gmail.com>.
On Mon, May 4, 2015 at 11:36 AM,  <An...@bmw.de> wrote:
> Are there any experiences about the maximum number of web socket connections
> and best practices for the Apache by using web sockets? Is it better to run
> apache with the event mpm then the worker mpm within that scenario?


For websockets the event MPM would not make a difference in 2.4,
because the idle connections cannot be offloaded in event because
they're not in a state that event can offload. They will tie up a
thread.

If you're just proxying those websockets connections, there is
experimental support in trunk to offload them under Event.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org