nginx_additional_config
Description
The nginx_additional_config parameter allows you to pass additional key-value configuration pairs to the nginx ingress controller's ConfigMap. This provides fine-grained control over nginx behavior beyond the standard parameters.
Default Value
The default value is an empty string ("").
Use Cases
- Custom Timeouts: Set custom proxy read/write timeouts.
- Rate Limiting: Configure request rate limiting at the ingress level.
- Custom Headers: Add or modify HTTP headers in the nginx configuration.
- Buffering: Adjust proxy buffering settings for specific workloads.
Setting Parameters
The value should be a comma-separated list of key=value pairs. It can be provided as plain text or base64-encoded:
$ convox rack params set nginx_additional_config=proxy-read-timeout=300,proxy-send-timeout=300 -r rackName
Updating parameters... OK
Each convox rack params set replaces the whole value, so include the keys already set when you add one. To remove all custom entries, set the parameter to an empty value:
$ convox rack params set nginx_additional_config= -r rackName
Updating parameters... OK
A value that contains spaces or semicolons needs shell quoting. For example, from Rack version 3.26.1 the router refuses requests with more than 1000 header lines, and an http-snippet raises that limit (see Ingress Router):
$ convox rack params set 'nginx_additional_config=http-snippet=max_headers 2000;' -r rackName
Updating parameters... OK
Additional Information
The configuration pairs are merged into the nginx-configuration ConfigMap that the nginx ingress controller reads. Because the value is parsed by splitting on commas and equals signs, individual keys and values cannot contain commas or additional equals signs. Refer to the nginx ingress controller documentation for available configuration options.
Pairs you provide take precedence over the ConfigMap entries the Rack manages by default:
| Key | Convox value | Effect |
|---|---|---|
proxy-body-size |
0 |
no limit on the request body size |
worker-shutdown-timeout |
540s |
from Rack version 3.26.1, how long open connections have to finish after a router pod stops or the router reloads its configuration. A value above 580s gives no extra time, because the router pod is stopped 600 seconds after it is told to stop. See Ingress Router |