libwebsockets icon indicating copy to clipboard operation
libwebsockets copied to clipboard

Concurrent SSL Handshakes causes threads to stay busy for long time - resulting timeout

Open The-Robin-Hood opened this issue 1 year ago • 3 comments

Upon establishing 1,000 concurrent WebSocket connections, the initial 400 connections are successfully established. However, due to a delay in the SSL handshake, the remaining WebSockets time out.

Steps to reproduce : This happens in even minimal-ws-server Make a concurrent connection to that server (min 500) - and keep adding clients

The-Robin-Hood avatar Oct 18 '24 13:10 The-Robin-Hood

What do you think should happen about that?

lws-team avatar Oct 18 '24 16:10 lws-team

Is there any way to create multiple context ?? After a threshold ?

The-Robin-Hood avatar Oct 18 '24 17:10 The-Robin-Hood

You can create multiple contexts, for example just by creating multiple processes.

Each process will have its own event loop thread.

lws-team avatar Oct 19 '24 06:10 lws-team