[Libwebsockets] libwebsockets : Query related to max connections supported, I/O mechanism and message posting

ayush jain jain.ayush09 at gmail.com
Thu Dec 5 07:56:39 CET 2013

Hello everyone,

It's been a week or so I started up researching on websockets and I landed
up here as I found a lot of interesting things about libwebsockets.
I was seeking some help regarding some aspects about the library in terms
of performance, I/O mechanism and message posting.

1) Is there any kind of bottleneck or performance issues (if it has been
tested) in case I wish to integrate the same to a server supporting approx
200k simultaneous tcp/tls connections?

2) I see there are 2 ways related to internal/external I/O mechanism for
integration. But I see the API (libwebsocket_service_fd) takes in pollfd
structure as argument, Can I use the libwebsocket library with my existing
Epoll implementation when I use external I/O other than POLL, as there
would be lot of inactve FD's in my case? Or I need to stick to POLL? I
don't have poll mechanism in my server.

3) When we say libwebsocket is single threaded, Do we mean that for all my
send and receive using the library, I need to make sure (in case am
implementing server) that the call to libwebsocket_service_fd() and any
message posting by requesting callbacks happens in 1 thread? I mean
whatever response my server needs to post back to client after processing
of request, How am I going to save or store that data when I get a callback
once my server side socket is writeable?

I know am asking too much of information here, but would really appreciate
if can respond to the same. Looking forward to your response.

Thanks in advance.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://libwebsockets.org/pipermail/libwebsockets/attachments/20131205/54f17eae/attachment.html>

More information about the Libwebsockets mailing list