加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 运营中心 > Nginx > 正文

nginx upstream和fail_timeout

发布时间:2020-12-13 21:25:29 所属栏目:Nginx 来源:网络整理
导读:关于fail_timeout的官方nginx文档中的定义说明如下: * the time during which the specified number of unsuccessful attempts to communicate with the server should happen to consider the server unavailable;* and the period of time the server wil

关于fail_timeout的官方nginx文档中的定义说明如下:

* the time during which the specified number of unsuccessful attempts to communicate with the server should happen to consider the server unavailable;
* and the period of time the server will be considered unavailable.

我的问题是,请求被标记为不成功的一个单独请求的超时是多少,以及如何定义此超时值?

如果max_fails = 3且fail_timeout = 120,这是否意味着如果请求在120/3秒后超时,则该请求不成功?

您要查找的内容在max_fails参数的文档中说明:

What is considered an unsuccessful attempt is defined by the proxy_next_upstream,fastcgi_next_upstream,uwsgi_next_upstream,scgi_next_upstream,and memcached_next_upstream directives.

如果您在这些文档中继续阅读,您会发现可能发生的不同超时:* _connect_timeout,* _send_timeout,* _read_timeout等.

因此,没有一个超时适用于单个请求,但不同的超时取决于请求的状态. fail_timeout和max_fails参数仅表明如果在给定时间内存在给定数量的故障,则认为服务器不可用.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读