memcached_next_upstream_timeout

memcached_next_upstream_timeout 指令设置重试对 memcached 服务器的失败请求的超时时间。 — NGINX HTTP Core

memcached_next_upstream_timeout
httpserverlocation
语法memcached_next_upstream_timeout time;
默认值none
上下文http, server, location
模块NGINX HTTP Core
参数1

说明

memcached_next_upstream_timeout 指令用于 NGINX 中处理对 memcached 服务器的请求。它可以配置服务器在尝试重试对上游 memcached 服务器的失败请求之前将等待的时长。对于使用 memcached 做数据缓存的应用程序尤其有用,因为它有助于管理请求失败,并提供一种机制以避免因过快重试失败请求而使后端服务器过载。

配置示例

memcached_next_upstream_timeout 30s;

如果设置得过低,可能导致频繁的失败请求重试,从而增加 memcached 服务器的负载。

在未正确配置上游 memcached 服务器的情况下设置该指令,可能无法产生预期的结果。