开发者

Best way to create a Comet/Push webserver?

开发者 https://www.devze.com 2022-12-24 04:16 出处:网络
I need to create a comet server. W开发者_C百科hat webserver + modules do I have to use ?Here\'s a short list of COMET solution I tried, with pros and cons:

I need to create a comet server.

W开发者_C百科hat webserver + modules do I have to use ?


Here's a short list of COMET solution I tried, with pros and cons:

  • Python Twisted: Non-blocking server based on Python. Unfortunately, "eats" a lot of CPU and doesn't scale very good;
  • Jetty: Very good, if you doesn't need to serve more than 10k clients simultaneously. Jetty consumes ~2GB memory per 10k active users;
  • Apache Tomcat: The same problems as with Jetty - eats lots of memory;
  • Apache Mina: NIO framework (non-blocking IO). Is not documented very well, and has problems with scaling;
  • JBoss Netty: NIO framework based on Apache Mina. Has a weak documentation, as well, but shows the best performance compared to aforementioned solutions. With Netty you can serve ~100k connections at a time, consuming several gigabytes of memory and using ~20% CPU (4-core);


So I strongly recommend you glancing over Netty.


Please do not vote me down, but have your considered about Nginx's push module?

http://pushmodule.slact.net/

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号