What's the max number of connections for superwebsockets ?

Jun 20, 2013 at 1:27 PM
Theoretically, what's the max number of connections superwebsocket was designed to support?
And what's the actual highest number of connections that you already tested ?
Coordinator
Jun 20, 2013 at 1:32 PM
Design to support unlimited connections(scale out). 10k connections have been tested. Actually requests per second is a much more important performance indicator than connection number.

Sent from my Windows Phone

From: Halim_Dreemer
Sent: 6/20/2013 20:27
To: [email removed]
Subject: What's the max number of connections for superwebsockets ? [SuperWebSocket:447679]

From: Halim_Dreemer

Theoretically, what's the max number of connections superwebsocket was designed to support?
And what's the actual highest number of connections that you already tested ?
Jun 25, 2013 at 1:39 PM
I am do load test for 200K connection, using multiport config like this:
<superSocket>
    <servers>
        <server name="MyServer001"
                serverTypeName="SuperWebSocket"
                ip="Any" mode="Tcp" port="60001" maxConnectionNumber="10000" maxRequestLength="131072" receiveBufferSize="131072" sendBufferSize="131072" keepAliveInterval="0" keepAliveTime="0">
        </server>
        <server name="MyServer002"
                serverTypeName="SuperWebSocket"
                ip="Any" mode="Tcp" port="60002" maxConnectionNumber="10000" maxRequestLength="131072" receiveBufferSize="131072" sendBufferSize="131072" keepAliveInterval="0" keepAliveTime="0">
        </server>
...
...
...
        <server name="MyServer200"
                serverTypeName="SuperWebSocket"
                ip="Any" mode="Tcp" port="60003" maxConnectionNumber="10000" maxRequestLength="131072" receiveBufferSize="131072" sendBufferSize="131072" keepAliveInterval="0" keepAliveTime="0">
        </server>
</servers>


I am using stress testing tools access of each port of server:
  • ws:\192.168.1.130:60001 -> 10000 connections.
  • ws:\192.168.1.130:60002 -> 10000 connections.
  • ws:\192.168.1.130:60003 -> 10000 connections.
  • ws:\192.168.1.130:60004 -> 10000 connections.
  • ws:\192.168.1.130:60005 -> 10000 connections.
I am running stress test on port 60001 first, and after all 10000 connection is connected and keepalive, then I running again port 60002 and 60003 start parallel.

But when running port 60002 and 60003, almost all of connections is failed with message: The connection was forcibly close by the remote host.

It seems like superwebsocket do queue on each connection request even though on a different port ? is it true ?



Regards,
Ardi
Coordinator
Jun 25, 2013 at 1:48 PM
Did you check the server side log?

Sent from my Windows Phone

From: ardihuang
Sent: 6/25/2013 20:39
To: [email removed]
Subject: Re: What's the max number of connections for superwebsockets ? [SuperWebSocket:447679]

From: ardihuang

I am do load test for 200K connection, using multiport config like this:
<superSocket>
    <servers>
        <server name="MyServer001"
                serverTypeName="SuperWebSocket"
                ip="Any" mode="Tcp" port="60001" maxConnectionNumber="10000" maxRequestLength="131072" receiveBufferSize="131072" sendBufferSize="131072" keepAliveInterval="0" keepAliveTime="0">
        </server>
        <server name="MyServer002"
                serverTypeName="SuperWebSocket"
                ip="Any" mode="Tcp" port="60002" maxConnectionNumber="10000" maxRequestLength="131072" receiveBufferSize="131072" sendBufferSize="131072" keepAliveInterval="0" keepAliveTime="0">
        </server>
...
...
...
        <server name="MyServer200"
                serverTypeName="SuperWebSocket"
                ip="Any" mode="Tcp" port="60003" maxConnectionNumber="10000" maxRequestLength="131072" receiveBufferSize="131072" sendBufferSize="131072" keepAliveInterval="0" keepAliveTime="0">
        </server>
</servers>


I am using stress testing tools access of each port of server:
  • ws:\192.168.1.130:60001 -> 10000 connections.
  • ws:\192.168.1.130:60002 -> 10000 connections.
  • ws:\192.168.1.130:60003 -> 10000 connections.
  • ws:\192.168.1.130:60004 -> 10000 connections.
  • ws:\192.168.1.130:60005 -> 10000 connections.
I am running stress test on port 60001 first, and after all 10000 connection is connected and keepalive, then I running again port 60002 and 60003 start parallel.

But when running port 60002 and 60003, almost all of connections is failed with message: The connection was forcibly close by the remote host.

It seems like superwebsocket do queue on each connection request even though on a different port ? is it true ?



Regards,
Ardi
Jun 25, 2013 at 1:52 PM
I have create SynAttackProtected.reg and set its value to 0
Jun 25, 2013 at 2:06 PM
yes, on info.log: there are some errors:
  • this session was closed for timeout.
  • this session was closed for socket error.
on err.log:
Caller: ProcessCompleted, file path: d:\LM\src\SuperWebSocket\SuperSocket(1.5.3).Source\SocketEngine\AsyncSocketSession.cs, line number: 69
System.Net.Sockets.SocketException (0x80004005): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
2013-06-25 19:19:25,628 [1164] ERROR MyLimeServer005 - Session: f1e8c597-6545-43ed-91eb-3d4e5358d8cf/192.168.1.130:51209
Unexpected socket error: 10060

Caller: ProcessCompleted, file path: d:\LM\src\SuperWebSocket\SuperSocket(1.5.3).Source\SocketEngine\AsyncSocketSession.cs, line number: 69
System.Net.Sockets.SocketException (0x80004005): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
2013-06-25 19:20:51,662 [3424] ERROR MyLimeServer002 - Session: 0224c488-d2a3-4bb1-9d2f-a14bea35be93/192.168.1.130:53571
Unexpected socket error: 10060

Btw, How to disabled write to log info.log and debug.log ?


Regards,
Ardi
Coordinator
Jun 25, 2013 at 2:32 PM
It seems that the problem was the clients hung. Did you monitor the client side performance.

Sent from my Windows Phone

From: ardihuang
Sent: 6/25/2013 21:06
To: [email removed]
Subject: Re: What's the max number of connections for superwebsockets ? [SuperWebSocket:447679]

From: ardihuang

yes, on info.log: there are some errors:
  • this session was closed for timeout.
  • this session was closed for socket error.
on err.log:
Caller: ProcessCompleted, file path: d:\LM\src\SuperWebSocket\SuperSocket(1.5.3).Source\SocketEngine\AsyncSocketSession.cs, line number: 69
System.Net.Sockets.SocketException (0x80004005): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
2013-06-25 19:19:25,628 [1164] ERROR MyLimeServer005 - Session: f1e8c597-6545-43ed-91eb-3d4e5358d8cf/192.168.1.130:51209
Unexpected socket error: 10060

Caller: ProcessCompleted, file path: d:\LM\src\SuperWebSocket\SuperSocket(1.5.3).Source\SocketEngine\AsyncSocketSession.cs, line number: 69
System.Net.Sockets.SocketException (0x80004005): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
2013-06-25 19:20:51,662 [3424] ERROR MyLimeServer002 - Session: 0224c488-d2a3-4bb1-9d2f-a14bea35be93/192.168.1.130:53571
Unexpected socket error: 10060

Btw, How to disabled write to log info.log and debug.log ?


Regards,
Ardi
Jun 25, 2013 at 2:34 PM
if the server want to serve 500000 (500K) client concurrently and keep all the connections alive ...
which is better, using multi port or single port ?

if using multiport, how many ports supersocket support ?


note: I am not worried about the performance right now.
Coordinator
Jun 25, 2013 at 3:18 PM
At first, one port or many port is not a big deal. It is probably true the port number will affect the connection accept speed, because the connection queue backlog size is set for per listener. But this parameter is not very important for a socket server who maintain long connections, because after the connection is established the client won't reconnect except the connection is dropped. It's quite different with web server, so you don't test the performance of this kind server like testing a web server.

Secondly, when you find the single server has reached the peak number of how many it can handler (after optimization), you can run more servers to handle more connections. But it's not very easy because you need take care of lots of architecture issues like making your each node stateless. Ideally you can handle unlimited connections through clustered system, then it become a completely architecture problem.