PHP + Comet(长轮询)扩展/主机
我使用 PHP/MySQL 开发了一个应用程序,该应用程序使用了彗星技术,即长轮询。概念验证效果很好,但我预计流量会快速达到数千个同时连接=网络服务器上的数千个开放连接。
我没有能力设置自己的服务器(例如使用 lighttpd),并且通常依赖于简单的 5 美元/月的 PHP 托管来进行其他 Web 项目。然而,我意识到这些不会起作用,因为它们并不意味着支持如此大量的同时打开连接。
我还有哪些其他选择?我找不到任何专门从事彗星应用程序的主机。
谢谢
I have developped an application using PHP/MySQL which used comet technology, presicely long-polling. The proof of concept works great, but I am expecting traffic to quickly reach thousands of simultanous connections = thousands of open connections on the webserver.
I do not have the ability to setup my own server (e.g. using lighttpd), and usually rely on simple 5$/month PHP hostings for other web projects. However, I realize those won't do the trick as they are not meant to support such a high number of simultanous open connections.
What are my other options? I could not find any host specialized in comet applications.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
你最好使用专用服务器,这会更贵,但它可以完成工作,我个人喜欢1and1.co。英国,如果您在美国1and1.com
希望有帮助!
you would be better of with dedicated server, which will be more expensive, but it will do the job, i personally like 1and1.co.uk, and if your in america 1and1.com
hope that helps!!
我和你的情况一样,只是决定使用专用服务器,然后在其中安装 Nginx 和 推送模块。这是一家报纸网站的实时聊天,到目前为止效果很好。正如 Jon 提到的,Apache 将很快运行,而 nginx 的性能非常好,并且推送模块非常简单。祝你好运!
I've been in the same situation as you, and just decided to go with a dedicated server, where I would then install Nginx and the Push Module. This was a real-time chat for a newspaper's website, and it has worked great so far. Apache will go under real quick as Jon mentions, while nginx performs great, and the push module is as simple as it gets. Good luck!
是的,Apache 并不是设计用于许多开放连接的。您可能想研究在 Jetty 上运行 cometd。您将必须使用 Java 进行一些编程,但您仍然可以使用 php 执行所有 Web 请求。您也许能够找到 Java/Jetty 和 PHP 网络主机。
我想看看人们还有什么其他解决方案。
Yeah Apache isn't designed to be used with many open connections. You may want to look into running cometd on top of Jetty. You will have to do some programming in Java, but you would still be able to do all your web requests in php. You might be able to find a Java/Jetty and PHP web host.
I'd like to see what other solutions people have.
我读到 Apache 不能很好地处理与服务器的许多开放连接。
很多人推荐 nginx 或 StreamHub Comet Server (Python):
Python Comet Server
http://ajaxpatterns.org/HTTP_Streaming
或者您可以使用完整的 Comet 框架(适用于 PHP):http://www.ape-project.org/
I have read that Apache does not handle well many open connections to server.
Many people recommend nginx or StreamHub Comet Server (Python):
Python Comet Server
http://ajaxpatterns.org/HTTP_Streaming
Or you can use complete Comet Framework (works with PHP): http://www.ape-project.org/