+ -
当前位置:首页 → 问答吧 → 关于nginx里面maxclients的计算方法

关于nginx里面maxclients的计算方法

时间:2010-08-16

来源:互联网

FROM NGINX WIKI:


QUOTE:
worker_connections
Syntax: worker_connections number
Default:
The worker_connections and worker_proceses from the main section allows you to calculate maxclients value:
max_clients = worker_processes * worker_connections
In a reverse proxy situation, max_clients becomes
max_clients = worker_processes * worker_connections/4
Since a browser opens 2 connections by default to a server ,and nginx uses the fds (file descriptors) from the same pool to connect to the upstream backend .


按照他的意思,
做http服务,浏览器只有1个连接,所以第一个公式没有除
做反向代理,浏览器会发2个连接,然后nginx又用两个连到后端,所以除了4

浏览器在这两种情况下为什么发起的链接数不一样?还是我理解错了

作者: yahoon   发布时间: 2010-08-16

楼主在哪里看到英文帮助的。我去了官网。是俄文的。没看明白。

作者: renxiao2003   发布时间: 2010-08-16