Proxy settings reference

Proxy settings reference

This page is a reference for the settings you can optionally define to fine-tune the behavior of the Memcached built-in proxy. For a guide to applying these settings, see Adjust proxy settings.

active_req_limit

Typeinteger
Default0

The proxy returns a fast fail on any request if it it already actively processing more than this many requests.

If set to 0, then the proxy does not impose this limit.

backend_use_tls

Typeboolean
Defaultfalse

Enable TLS by default when connecting to backend servers. Proxy must be compiled with --enable-proxy-tls option.

backend_connect_timeout

Typefloat
Default5

The time, in fractional seconds, before an attempted connection between the proxy and a backend times out.

backend_failure_limit

Typeinteger
Default3

The number of consecutive connection or validation failures that the proxy tolerates from a backend before the proxy marks the backend as bad.

backend_flap_backoff_max

Typeinteger
Default3600

Maximum number of whole seconds to wait before retrying a flapping server. Ensures servers with ephemeral issues are occasionally brought back in a reasonable timeframe.

backend_flap_backoff_ramp

Typefloat
Default1.5

The proxy uses this fractional second value to determine a backoff for how often to retry unhealthy backends. The proxy derives the backoff time by multiplying the following numbers:

  • The value of backend_flap_backoff_ramp
  • The value of backend_retry_waittime
  • The number of times the backend in question has flapped

backend_flap_time

Typeinteger
Default0

The number of seconds a that backend must be held open without errors, or else it is considered to be flapping.

If set to 0, then the proxy never marks a backend as flapping.

backend_read_timeout

Typeinteger
Default3

The time, in fractional seconds, that the proxy waits for a response from a connected backend after forwarding a client command to it.

backend_retry_waittime

Typeinteger
Default3

The time, in whole seconds, that the proxy waits before retrying a failed connection with a backend.

backend_use_iothread

Typeboolean
Defaultfalse

Whether or not a backend is hanndled by worker threads or a dedicated I/O thread, by default.

The default value of false provides better scalability at the cost of more TCP connections and less batching of backend syscalls.

buffer_memory_limit

Typeinteger
Default0

The proxy returns a fast fail on any request if more than roughly this many kilobytes are actively in use by requests for request or response value buffers.

If set to 0, then the proxy does not impose this limit.

tcp_keepalive

Typeboolean
Defaultfalse

Whether or not all new backends use TCP keepalive.