nginx的/阿帕奇/ PHP VS nginx的/ PHP [英] nginx/apache/php vs nginx/php

查看:226
本文介绍了nginx的/阿帕奇/ PHP VS nginx的/ PHP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我现在有nginx的是reverse_proxy到Apache(同一台服务器),用于处理PHP请求的一台服务器。如果我把apache的,所以我会运行的nginx / FastCGI的到PHP如果我看到任何形式的性能提升,我想知道。我假设我会因为Apache的pretty臃肿起来,但在同一时间我不知道/ PHP是特别是在人流量大的情况下,如何可靠的FastCGI。

I currently have one server with nginx that reverse_proxy to apache (same server) for processing php requests. I'm wondering if I drop apache so I'd run nginx/fastcgi to php if I'd see any sort of performance increases. I'm assuming I would since Apache's pretty bloated up, but at the same time I'm not sure how reliable fastcgi/php is especially in high traffic situations.

我的网站获得每月约20万独立访问者,大约有600万页从搜索引擎抓取每月。这个数字正在不断增加,所以我在寻找perfomrance选项。

My sites gets around 200,000 unique visitors a month, with around 6,000,000 page crawls from the search engines monthly. This number is steadily increasing so I'm looking at perfomrance options.

我的网站是非常优化的code聪明,也没有任何的缓存(不想,要么),每一页都有2个SQL查询一个最大而对其他表任何联接,索引是完美的,以及

My site is very optimized code wise and there isn't any caching (don't want that either), each page has a max of 2 sql queries without any joins on other tables, indexes are perfect as well.

在一年左右的时间,我将重写一切使用ClearSilver为模板,然后可能使用Python或者C ++的极端表现。

In a year or so I'll be rewriting everything to use ClearSilver for the templates, and then probably use python or else c++ for extreme performance.

我想我或多或少希望从任何人谁是熟悉的nginx / FastCGI的任何建议,如果愿意提供一些基准。我的网站是一台服务器有1四核Xeon处理器,8GB内存,150GB硬盘迅猛

I suppose I'm more or less looking for any advice from anyone who is familiar with nginx/fastcgi and if willing to provide some benchmarks. My sites are one server with 1 quad core xeon, 8gb ram, 150gb velociraptor drive.

推荐答案

nginx的一定会努力比Apache快。我不能告诉FastCGI的,因为我从来没有使用nginx的,但这种解决方案似乎让几个服务器(一个静态的内容,一个是FastCGI的/ PHP)更有意义。

nginx will definitely work faster than Apache. I can't tell about fastcgi since I never used it with nginx but this solution seems to make more sense on several servers (one for static contents and one for fastcgi/PHP).

如果你真的瞄准性能-and甚至认为C / C ++ - 那么你应该试用一下G-WAN,全在一台服务器提供(非常快)C脚本

If you are really targeting performance -and even consider C/C++- then you should give a try to G-WAN, an all-in-one server which provides (very fast) C scripts.

不仅G-WAN有一个可笑的小内存占用(120 KB),但它像秤没有别的。有工作在你前面,如果你从PHP迁移,但可以用性能关键任务启动并逐步迁移。

Not only G-WAN has a ridiculously small memory footprint (120 KB) but it scales like nothing else. There's work ahead of you if you migrate from PHP, but you can start with the performance-critical tasks and migrate progressively.

我们已经取得了跳跃,不能考虑回去的Apache!

We have made the jump and cannot consider to go back to Apache!

这篇关于nginx的/阿帕奇/ PHP VS nginx的/ PHP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆