aspose file tools*
The moose likes Sockets and Internet Protocols and the fly likes Maximum users a Java Socket server support? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Maximum users a Java Socket server support?" Watch "Maximum users a Java Socket server support?" New topic
Author

Maximum users a Java Socket server support?

Marvin Legend
Ranch Hand

Joined: Oct 18, 2013
Posts: 35
Good day to all,

I created a very simple chat application in java , which a server and a client , I built only for messaging , nothing else . I used threads and sockets for messaging ( very classic chat in java model) .
I will list the questions and what they know , please respond with the numbers , here we go:

Most important question :
1 - What is the maximum users that the server accept? ( Remembering that aa complication is only for messaging and nothing else , there will be no advanced feature ) .

2 - Servers with this simple structure usually stop working if there are too many people logged ? Or not allow access if the limit was reached ?

3 - Is there any test I can do to make sure the maximum number of people that this server supports ?

4 - A Pc QuadCore with 4GB RAM would support more users than a Core2Duo 2GB RAM ? Or does not matter ?


5 - This structure of " Sockets " is Strong ? Is it reliable ? Servers programmed this way are quick and functional ?


An example of the server I did:




    Thank you all !





Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18724
    
  40

Marvin Legend wrote:
I created a very simple chat application in java , which a server and a client , I built only for messaging , nothing else . I used threads and sockets for messaging ( very classic chat in java model) .
I will list the questions and what they know , please respond with the numbers , here we go:

Most important question :
1 - What is the maximum users that the server accept? ( Remembering that aa complication is only for messaging and nothing else , there will be no advanced feature ) .


Well, like many questions, the answer is... it depends. I guess the hard upper limit would be the number of available ephemeral ports. In reality though, you are likely to run out of other resources before then.

Marvin Legend wrote:
2 - Servers with this simple structure usually stop working if there are too many people logged ? Or not allow access if the limit was reached ?


The socket obviously won't accept any more connections, if you run out of ports (not tested to see if or what exception is returned though). However, your application is responsible for everything else. If a limit, such as running out of memory, or running out of disk space, is reached, it is your application's responsibility to not allow any more connections.

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Maximum users a Java Socket server support?