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
| Name | Type | Description |
|---|---|---|
| zone | zone=name:size | Allocate shared storage. |
| state | state=file | Persistent JSON state; avoid editing directly. |
| timeout | timeout=duration | Entry expiry; required with sync. |
| type | type=string|ip|prefix | Lookup matching mode; indexes consume zone space. |
| sync | literal sync | Enable zone synchronization; requires timeout and cluster configuration. |
Working Example
Example Snippetnginx
keyval_zone zone=labels:64k;