We are developing an application that will make heavy use of WebSocket. Every user will have a continuous websocket connection to the server as long as they browse the website.
My understanding is that when serving regular static web pages, even a low kernel.ipc.somaxconn is not that much of an issue since the connection is closed within milliseconds once the content is served. However WebSocket connections are said to be permanent so I wonder what the implications are in terms of tuning kernel.ipc.somaxconn. Especially since apparently, the max value of somaxconn is about 65k which would limit the scalability of our application on a single server. So my specific questions are:
My understanding is that when serving regular static web pages, even a low kernel.ipc.somaxconn is not that much of an issue since the connection is closed within milliseconds once the content is served. However WebSocket connections are said to be permanent so I wonder what the implications are in terms of tuning kernel.ipc.somaxconn. Especially since apparently, the max value of somaxconn is about 65k which would limit the scalability of our application on a single server. So my specific questions are:
- Will a WebSocket connection indeed use a somaxconn-related connection, or will the connections somehow be pooled?
- Is there a way to increase the max value of somaxconn without building a custom kernel? (I heard that WhatsApp managed to set it to 2 million but it looks like they built a custom kernel)
- And as an aside, is there a risk of crashing the OS at boot time if somaxconn is set to a value being too high? (this warning is made for some settings in the tuning man page).