五分钟进步系列之nginx-worker-processes

简介: 五分钟进步系列之nginx-worker-processes

学习方式:

  1. 先读英文的原版,如果你能看懂就可以到此为止的了。
  2. 如果你看不懂,可以再看一下我给的较高难度的英文单词的翻译。
  3. 如果还是看不懂可以去最下面看我翻译的汉语。


今天我们聊聊nginx的worker-processes参数:

640.png


一、英文原版



640.png


Defines the number of worker processes.

The optimal value depends on many factors including (but not limited to) the number of CPU cores, the number of hard disk drives that store data, and load pattern. When one is in doubt, setting it to the number of available CPU cores would be a good start (the value “auto” will try to autodetect it).

640.png


二、重点词汇的翻译



optimal:  最佳


depends:  取决于


doubt:质疑


三、中文



这个是用来定义工作进程数的

他的最佳值取决于很多因素包括(但不限于)CPU核数,硬盘数量,和启动方式,当你有任何质疑的时候,把这个参数设置成CPU核数是个不错的选择(如果设置成“auto”nginx将会自己获取这个数值)


四、总结



这个值一般波哥是用auto,因为在实际生产中,我们的服务器有可能规格不太一样。而我们的部署脚本或者工具都群控的。所以基本上都保持尽量兼容性比较高的参数。


相关文章
|
2月前
|
缓存 负载均衡 安全
|
3月前
|
缓存 负载均衡 应用服务中间件
2.nginx
2.nginx
35 1
|
3月前
|
缓存 负载均衡 应用服务中间件
Nginx(一)
Nginx(一)
44 0
|
3月前
|
负载均衡 JavaScript 应用服务中间件
nginx使用
nginx使用
|
3月前
|
前端开发 安全 应用服务中间件
|
9月前
|
缓存 应用服务中间件 nginx
Nginx使用总结
Nginx使用总结
80 0
|
10月前
|
缓存 负载均衡 应用服务中间件
nginx
nginx
35 0
|
缓存 负载均衡 Unix
Nginx系列——初识
Nginx系列——初识
60 1
|
缓存 负载均衡 JavaScript
Nginx 简单入门指北不指南
Nginx 简单入门指北不指南
122 0
|
负载均衡 监控 算法
Nginx 的使用
1、Nginx是一个高性能的HTTP和反向代理服务器,也是一个IMAP/POP3/SMTP代理服务器。 2、Nginx是一款轻量级的Web服务器/反向代理服务器以及电子邮件代理服务器,并在一个BSD-like协议下发行。