Adjust cloud-native API gateway engine parameters to optimize performance, reliability, and security. Each parameter's scope, valid range, and default value are listed below.
Prerequisites
Steps
-
Only parameters displayed in the console can be modified.
-
Check the valid range of each parameter on the Gateway Engine Parameters page before making changes.
Log on to the API Gateway console.
In the left-side navigation pane, click . In the top navigation bar, select a region.
On the Instance page, click the target instance ID.
-
In the navigation pane, choose Parameter Settings. In the Gateway Engine Parameters section, find the target parameter and click Edit in the Actions column. Configure the parameter as described below and click OK.
Gateway engine parameters
|
Parameter |
Type |
Valid range |
Default value |
Description |
|
EnableHttp2 |
bool |
[true, false] |
false |
Request phase. Specifies whether to use HTTP/2 during protocol negotiation.
|
|
EnableGenerateRequestId |
bool |
[true, false] |
true |
Request phase. When enabled, the gateway generates an X-Request-Id header to uniquely identify each request.
|
|
EnableGzip |
bool |
[true, false] |
false |
Response phase.
|
|
EnableGzipHardwareAccelerate |
bool |
[true, false] |
false |
Hardware-accelerated Gzip compression. Significantly reduces gateway traffic with higher performance and lower CPU usage than software-based Gzip.
Important
|
|
EnableSlashMerge |
bool |
[true, false] |
false |
Request phase. Specifies whether to merge consecutive slashes (
|
|
DownstreamIdleTime |
integer |
[0, 600] |
300 |
Gateway connections. Closes client-to-gateway connections idle for the specified duration. Unit: seconds. |
|
PreserveHeaderFormat |
bool |
[true, false] |
false |
Request and response phases. By default, header names are lowercased for HTTP/2 compatibility.
|
|
DownstreamConnectionBufferLimits |
integer |
[0, 2147483647] |
32768 |
Gateway connections. Controls the per-connection buffer size, affecting throughput and memory usage. Unit: bytes. |
|
EnableHardwareAccelerate |
bool |
[true, false] |
true |
TLS encryption and decryption. Enables hardware-accelerated TLS processing. Does not take effect if hardware acceleration is unsupported in your region or was not enabled at purchase.
Note
Hardware acceleration is supported only in the China (Beijing), China (Hangzhou), China (Shanghai), China (Shenzhen), and Asia Pacific SE 1 (Singapore) regions. |
|
XffTrustedNum |
integer |
[0, 10] |
0 |
Request phase. Number of trusted proxies before the gateway, affecting how client-generated headers such as x-forwarded-for and x-request-id are handled. If set to 0, the gateway uses the peer socket IP as the originating IP and passes it to the backend in the x-envoy-external-address header. If non-zero, the gateway determines the originating IP from the x-forwarded-for header by skipping the specified number of hops from right to left. This IP is passed to the backend in the x-envoy-external-address header. The gateway also preserves client-sent x-request-id and x-forwarded-proto headers. |
|
DownstreamHttp2MaxConcurrentStream |
integer |
[0, 2147483647] |
100 |
Request phase. Maximum concurrent HTTP/2 streams per client connection. |
|
InitialStreamWindowSize |
integer |
[65535, 2147483647] |
65535 |
Request phase. Initial HTTP/2 stream-level flow control window size. Unit: bytes. |
|
InitialConnectionWindowSize |
integer |
[0, 2147483647] |
1048576 |
Request phase. Initial HTTP/2 connection-level flow control window size. Unit: bytes. |
|
EnableHttp3 |
bool |
[true, false] |
false |
Request phase. Specifies whether to use HTTP/3 for client-to-gateway communication.
|
|
UpstreamIdleTimeout |
int |
[0, 600] |
30 |
Gateway connections. Closes gateway-to-upstream connections idle for the specified duration. Unit: seconds. |
|
PathWithEscapedSlashes |
string |
|
KEEP_UNCHANGED |
Forwarding rule for requests whose URI path contains encoded slashes (%2F, %2f, %5C, or %5c).
|
|
ZipAlgorithm |
List<string> |
[brotli, gzip] |
gzip |
Compression algorithm. Supported values: brotli, gzip. When both are specified with equal q-values in Accept-Encoding, the first algorithm in the list takes precedence. |
|
EnableProxyProtocol |
bool |
[true, false] |
false |
Enables the PROXY protocol. Required when ingress traffic passes through a Network Load Balancer (NLB) to obtain the client's originating IP address. Does not affect requests that do not use the PROXY protocol. |
|
EnableCustomAuthConfigPush |
bool |
[true, false] |
false |
Self-managed authentication scenarios. When enabled, authentication rule changes do not interrupt existing connections. Suitable for WebSocket and online business scenarios. |