用于运行 PHP+Erlang 的 Web 服务器
我希望在 Web 服务器上运行 PHP 和 Erlang。 Apache 被排除在外,因为后端 Erlang 进程需要同时处理大约 3000 个请求。 所以绝对是内存占用较小的东西,比如 lighttpd...
您会推荐哪一个? 为什么?
I wish to run PHP and Erlang on a web server. Apache is ruled out, because the backend Erlang process would need to handle around 3000 requests concurrently. So definitely something with a smaller memory footprint like lighttpd...
Which one would you recommend? And why?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Erlang 有内置的 Web 服务器:
http://yaws.hyber.org/
您可以使用它。 它应该非常非常快。
如果你想将 Erlang 暴露到网络上,Yaws 是最好的选择(在刚刚学习 Erlang 时,所以这可能是不正确的)
编辑:
经过一番挖掘后,我发现 Erlang Web 服务器(雅司病)可以运行 PHP 脚本。 所以你的答案是 Erlang Web 服务器!
http://yaws.hyber.org/cgi.yaws
Erlang has built-in web server:
http://yaws.hyber.org/
Which you can use. It is supposed to be really really fast.
If you want to expose Erlang to the web, Yaws is the way to go (in just learning Erlang, so this may be incorrect)
edit:
After digging around a bit, I found that the Erlang webserver (Yaws) CAN run PHP scripts. So your answer is an Erlang webserver!
http://yaws.hyber.org/cgi.yaws
如果没有更多信息,很难回答这个问题。 你想用 erlang 和 php 做什么? php 是后端 erlang 进程的前端吗? 或者 erlang 也会做一些前端工作吗?
我见过人们在 erlang 和 fastcgi 之前使用 nginx 做得很好。 您可以通过 fastcgi 运行 php,并由 nginx 进行转发。 如果没有更多信息,就很难说更多。
Its hard to answer this one without more information. What is it you wish to use erlang and php for? Is php your frontend for a backend erlang process? Or is erlang going to do some of the frontend also?
I've seen folks do well with nginx in front of erlang and fastcgi. You could run the php through fastcgi with nginx doing the forwarding. Without more information it would be hard to say more than that.
使用您喜欢的任何东西(我希望是 apache)运行您的 php 前端,并作为后端与您的 erlang 进行通信。
阅读:
http://www.erlang -factory.com/upload/presentations/117/Todd-Lipcon-ErlangFactoryLondon2009-BuildingMulti-LanguageWebArchitecturesusingErlangandThrift.pdf
基本上讨论了如何运行 php 前端,因为它擅长字符串和模板设计者通过erlang 后端,因为它擅长并发等。然后他用 thrifty
best quote
Run your php frontend with anything you like (apache i hope) and communicate with your erlang as a backend.
Read:
http://www.erlang-factory.com/upload/presentations/117/Todd-Lipcon-ErlangFactoryLondon2009-BuildingMulti-LanguageWebArchitecturesusingErlangandThrift.pdf
Basically talks how to run a php frontend, because it is good at strings and template designers 'get it' with a erlang backend because it is good at concurrency, etc. Then he glue it all together with thrifty
best quote