HTTP Plus key-value directives

keyval_zone

HTTP context; commercial. Defines shared storage; optional state persistence and synchronization have release-specific constraints.

Formal Syntax & Structure

nginx syntaxnginx
keyval_zone zone=name:size [state=file] [timeout=time] [type=string|ip|prefix] [sync];

Parameters & Attributes

NameTypeDescription
zonezone=name:sizeAllocate shared storage.
statestate=filePersistent JSON state; avoid editing directly.
timeouttimeout=durationEntry expiry; required with sync.
typetype=string|ip|prefixLookup matching mode; indexes consume zone space.
syncliteral syncEnable zone synchronization; requires timeout and cluster configuration.

Working Example

Example Snippetnginx
keyval_zone zone=labels:64k;
Nginx Reference