Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/performance/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Performance Apache背后的node.js是否比node.js HTTP服务器慢很多?_Performance_Apache_Http_Node.js - Fatal编程技术网

Performance Apache背后的node.js是否比node.js HTTP服务器慢很多?

Performance Apache背后的node.js是否比node.js HTTP服务器慢很多?,performance,apache,http,node.js,Performance,Apache,Http,Node.js,这比直接访问慢得多吗 RewriteEngine On RewriteRule (.*) http://localhost:23232/$1 [P] 不会慢很多。与Node.js处理请求所需的时间相比,Apache代理您的请求所需的时间可能更难衡量,这只是一小部分 但是,您可能希望使用and而不是重写,以便Apache充当真正的代理。我不能在.htaccess中执行ProxyPass和ProxyPassReverse,对吗?@raxer:是的,它们仅在服务器配置中可用。对于.htaccess,

这比直接访问慢得多吗

RewriteEngine On
RewriteRule (.*) http://localhost:23232/$1 [P]

不会慢很多。与Node.js处理请求所需的时间相比,Apache代理您的请求所需的时间可能更难衡量,这只是一小部分


但是,您可能希望使用and而不是重写,以便Apache充当真正的代理。

我不能在.htaccess中执行ProxyPass和ProxyPassReverse,对吗?@raxer:是的,它们仅在服务器配置中可用。对于
.htaccess
,您可以使用重写。谢谢。问题得到了回答。为了完整起见,我找到了一个让node与apache一起工作的好方法。不是我的博客,所以我不是自我推销,正如马库斯所说,使用proxyPass是首选。