comet server 的介绍及方案选型
2012-04-18 03:03
288 查看
comet server 的介绍及方案选型
comet server介绍:简述就是具有长连接功能,能实时向客户端推送数据的 push服务器
方案比较:
经过5种框架的比较,作者最终选择了netty。。。
原文地址:http://amix.dk/blog/post/19456#Plurk-Comet-Handling-of-100-000-open-connections
Plurk Comet: Handling of 100.000+ open connections
Comet is a buzz word, just like Ajax, but a bit cooler. The bottom line in comet is that the server can push data to clients when new data arrives.
I think that comet is the next big thing and this trend can be seen in an upcoming product like Google Wave that use comet heavily for creating real time updates.
Plurk is growing fast and we are becoming one of the largest Python sites on the Internet. We serve many thousands of concurrent users pr. day (100.000+), so implementing comet for Plurk is a big challenge and I have spent around a week on fiddling with different solutions.
Here are some of the technologies I have tired:
Python Twisted: Non-blocking server in Python. Unfortunately it ate a lot of CPU and could not scale
Jetty: They claim to have good support for comet (and they do if you don't serve 100.000 clients at once). The Jetty installation we ran ate around 2GB of ram on 10.000 active users, which is unacceptable for our needs
Apache Tomcat: Same with Jetty, it eats tons of memory, even thought they do support comet connections
Apache Mina: A NIO (non-blocking IO) framework which I used to build a HTTP server. Unfortunately Mina is very badly documented and it did not scale up in production
After trying these out and found out that they could not handle a massive load I was about to give up. But then, I stumbled upon the savior:
JBoss Netty: A NIO framework, done by one of Apache Mina's founders
Netty is not that documented, but it's really well designed and after some hacking around the performance is pretty amazing.
The bottom line
Using Netty we have comet running on 100.000+ open connections - this uses some GB of memory and 20% of CPU on a quad core server. I.e. we have solved the C10k * 10 problem using non-blocking technology and some pretty impressive libraries (namely Java NIO and Netty).A big kudos goes to Trustin Lee for his amazing work on Netty!
相关文章推荐
- COMET彗星(一)SERVER PUSH介绍
- 移动开发主流框架的选取以及技术选型方案解析
- Tomcat下server.xml中context介绍
- Express的server端测试方案
- 消息推送(一)Comet介绍
- VisualSvn Server介绍
- Microsoft Exchange Server 2010 介绍
- SQL Server Collation介绍及其变更对数据的影响
- BizTalk Server 2010新功能介绍(三):BizTalk 设置仪表板 (Settings Dashboard)
- Python中的XML库4Suite Server的介绍
- oGrid 介绍如何从 server 取的资料
- 集成测试常用方案选型
- SQL Server Collation介绍
- 智能家居的切入点——CX92755楼宇可视对讲方案介绍
- [转]Linux挂载点介绍及桌面服务器分区方案
- linux系统死机情况分析与处理方案介绍
- Tomcat中server.xml文件详细配置介绍
- MS Sql Server 中主从库的配置和使用介绍
- Team Foundation Server(TFS)功能介绍二:外包管理工具 推荐
- MS SQL Server将数据导出Insert语句的几种方案