<转自http://rhythm-zju.blog.163.com/blog/static/31004200801504318444/>
关注 Apache Mina已经有些时日了,也用 Mina 做了不少实验,尤其喜欢其简洁优雅的接口以及对 Spring 和 JMX 的良好集成。简而言之, Mina 是一个高性能的 Java 异步网络通讯框架。当前已有多个开源项目使用 Mina 构建底层 I/O 设施,或是正将底层 I/O 设施转用 Mina 实现。对于后者,据传多半会有大幅的性能提升,比较典型的一个例子是开源 XMPP 服务器 Openfire,其官方站点在一篇题为“ Scalability: Turn it to Eleven”的 Blog 中声称在改用 Mina 作为其网络 I/O 框架后,性能提升了 11 倍之多。具体的数据有两个版本,皆令人印象深刻,分别是:
So far we've hit 33k concurrent users with a single connection manager, running on a (old) Sun 280R server. CPU usage in the connection manager and core Wildfire server both hovered around 7% each. Those numbers are a pretty huge improvement over the previous version of Wildfire, which was barely able to hit 7500 concurrent users with maxed out CPU and memory usage. We're also only part way through the optimization process. The goal for the 3.2 release is to demonstrate 100k concurrent users on a single domain.
Each connection manager should handle at least five thousand concurrent users. Experimental support for non-blocking connections is under development, which will greatly increase the number of connections that each connection manager module can support.