Re: [xSocket-develop] production level socket server pitfalls
Status: Inactive
Brought to you by:
grro
|
From: Gregor R. <gre...@gm...> - 2010-02-20 07:48:31
|
Hi Kevin,
I would suggest setting the timeouts. By default the timeouts are very high.
Regarding to the memory, by xSocket uses 2 internal dispatchers by default. By default each dispatcher will preallocate 65536 bytes non direct memory (see system propery org.xsocket.connection.client.readbuffer.preallocation.size). This preallocated buffer will be used to read the network data. Each open connection allocates (OS) system resources and memory. This depends on the OS. Further more each running thread also allocates a predefined amount of memory. This also depends on the OS.
Gregor
----- Original Message -----
From: Kevin Boyd
Sent: 02/19/10 09:47 AM
To: xso...@li...
Subject: [xSocket-develop] production level socket server pitfalls
Hello,
For a production level socket server what are the potential pitfalls that I have to consider :
I have started the server as per the tutorial on the homepage using
IServer srv = new Server(8090, new TestHandler());
srv.run();
The TestHandler class implements the following interfacesIDataHandler, IConnectHandler, IDisconnectHandler, IIdleTimeoutHandler, IConnectionTimeoutHandler.
*
I haven'tset any "System Properties" as yet and "FlushMode.ASYNC" is not set. *
Connection and Idle timeout'sare set to default.
I have uploaded this to my VPS host. However before letting it loose in production I wanted to test it for reliability and scalabity. Any suggestions here would be welcome.
Memory is another aspect , My VPS host has allotted me 1GB ram with around 8GB burst capability, is this sufficient. (As of now I have only 500MB free)
My clientswould be continuously connected to the server 24x7, how much resource would each client connection take up in terms of ram, if 1000 or more clients would be connected how do I compute the amount of ram that would be necessary to safely run the socket server.
Please suggest other points that I have missed out here.
Regards,
Kevin
|