Mastering Nginx

(Ron) #1

NGINX for the Developer


[ 164 ]

The following table describes the directives available with the memcached module,


which is compiled into an nginx binary by default:


Table: Memcached module directives

Directive Explanation
memcached_buffer_size The size of the buffer for the response from
memcached. This response is then sent
synchronously to the client.
memcached_connect_timeout The maximum length of time NGINX will
wait for its connection to be accepted when
making a request to a memcached server.
memcached_next_upstream The conditions under which a request will
be passed to the next memcached server, as
specified by one or more of the following
parameters:


  • error: An error occurred when
    communicating with the memcached
    server

  • timeout: A timeout was reached
    when communicating with the
    memcached server

  • invalid_response: The
    memcached server returned an
    empty or otherwise invalid response

  • not_found: The key was not found
    on this memcached instance

  • off: Disables passing a request to
    the next memcached server
    memcached_pass Specifies the name or address of a
    memcached server and its port. May also
    be a server group, as declared in an
    upstream context.
    memcached_read_timeout Specifies the length of time that needs
    to elapse between two successive read
    operations from a memcached server before
    the connection is closed.
    memcached_send_timeout The length of time that needs to elapse
    between two successive write operations to
    a memcached server before the connection
    is closed.

Free download pdf