TCP sockets on VPS and openfire

Hi,

I`m testing openfire on a VPS(virtual private server) running on centOS and going to integrate chat using BOSH in my website.

My VPS plan has a limit on the number of TCP sockets and the number of processes. I`m not sure what is the maximum yet.

Does openfire needs a large number of TCP sockets?

Will the limit affect the performance or the number of maximum concurrent users?

Is there a difference between web-clients using BOSH and desktop clients?

Thanks

Hey dror,

Does openfire needs a large number of TCP sockets?

Openfire does not use TCP sockets itself but clients use TCP sockets to connect to the server. Standard XMPP clients will open a socket connection to port 5222 and keep it open for the duration of the entire XMPP session. Clients that use HTTP binding to connect to the server may either open a longed lived TCP connection (and speak HTTP binding language) or may open a TCP connection for each HTTP request.

Will the limit affect the performance or the number of maximum concurrent users?

Yes. If your HTTP clients are using longed lived connections then only a certain number of users will be able to be logged in at once. If your HTTP clients open a TCP connection for each HTTP request then only a certain number of users will be able to make a request at once. If the VPS is queuing http requests (instead of rejecting them) then in this case the HTTP requests will take a little longer but will be processed at last. However, the server may decide to terminate an HTTP session that is considered idle due to the lack of activity.

Is there a difference between web-clients using BOSH and desktop clients?

There is a slight difference. The functionality of them should be the same. Both of them can make use of any XMPP service or functionality. The difference is how they connect and speak to the server. The server needs to speak HTTP binding and decode/encode the XMPP stanzas inside of the HTTP requests. That is the extra work for the server.

Regards,

– Gato

If I understand correctly, clients using HTTP-binding and standard clients will consume the same number of TCP sockets.

What affects the maximum number of TCP sockets on a dedicated server? Is it the server code(apache vs jetty for example) or only the hosting plan.

You said that in your tests openfire supported 250,000 concurrent users. Does it mean that it has at least 250,000 TCP sockets?

Thanks.

If I understand correctly, clients using HTTP-binding and standard clients will consume the same number of TCP sockets.

As I said, if your HTTP clients are sending an HTTP request (and opening a new TCP connection) for each request then the number is not the same.

What affects the maximum number of TCP sockets on a dedicated server? Is it the server code(apache vs jetty for example) or only the hosting plan.

This is an OS and hardware limitation. If you are using a hosting plan then your ISP can be placing a limit in the number of TCP connections.

You said that in your tests openfire supported 250,000 concurrent users. Does it mean that it has at least 250,000 TCP sockets?

Yes, that’s correct. Our server was handling 250,000 TCP connections at the same time. That is the magic of NIO (MINA) that uses epoll.

Regards,

– Gato

Gato

Can you share the configuration of the server that ran the test - ullimit settings, RAM, disk, openfire configuration, database used?

thanks!

Hi,

are you looking for http://www.igniterealtime.org/about/OpenfireScalability.pdf or do you need even more details?

LG

That was helpful, thanks. i am also looking for the information (configuration) about the test that ran 250000 users. is this available?

thanks