We ran into the windows limitation regarding the number of open sockets.
Windows 2003 limits the range of port numbers an application can use to
1024-5000 by default.  Not sure why this is set.

This can be overwritten by a registry key though and the max user port
number can be changed to expand the number of ports.

Without this registry change you hit a wall and start getting errors
around 4,000 or so since it takes time for the sockets to get released
back into the pool after they are closed.

Merge this with the registry will fix it give you around 64,000 ports to
use.

<65k_MaxUserPort.reg>
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters]
"MaxUserPort"=dword:0000fde8
<65k_MaxUserPort.reg>

See TechNet article:
http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/rege
ntry/58791.mspx?mfr=true

We have run a single java process that has about 10,000 always open
client connects and about 2,000-4,000 transient server connections on a
quad-proc windows 2003 64bit server.  Almost all the connections are SSL
encrypted.

-Scott



-----Original Message-----
From: Steven [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 09, 2007 12:21 AM
To: MinaDev
Subject: How many clients can be online at one time by using nio or
MINA?

 
Hi all,
 
I am writing a server program now.
 
There will be lots clients connect to the server at one time, maybe
5000+.
 
The OS is windows 2003. I want to use MINA.
 
But someone tell me that nio's implementation in windows is using the
winsock select model, and that make nio can only
maintain about 1024 connections at one time.
 
Is that true?
 
Or how many connections can be maintain by using nio or MINA ??
 
Thank you!
 
Steven

 
 
 
 

Reply via email to