I'm currently on the stage to begin developing a chat (actually porting an older single server version ) using multiple servers(machines).
I want to use java NIO library.
The reason why I'm doing this is because the current implementation is working very slow when a huge number of clients are being connected(around 10k), also the current implementation is based on the IO socket library. I also estimate that in 1 year to have around 40-50k live clients.
So.. I have a few questions:
- How many client do you think/estimate NIO can handle since I heard is much better than the old socket implementation?
- do you have any ideas or you can point me to some already implemented architecture of using multi server chat.
- what are the major problems that I might face when using a multi server architecture?
Thanks in advance
I don't think there is any limitation from the NIO library point of view. At the end of the day performance depends on your Server and Network configuration.
You might like to take a look at Apache MINA Project for NIO framework.
Apache MINA is a network application framework which helps users develop high performance and high scalability network applications easily. It provides an abstract ·event-driven · asynchronous API over various transports such as TCP/IP and UDP/IP via Java NIO.
Apache MINA is often called:
. NIO framework · library,
. client · server framework · library, or
. a networking · socket library.