Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Maximum users a Java Socket server support?

 
Marvin Legend
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Marshal
Pie
Posts: 21506
84
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic