All Products
Search
Document Center

API Gateway:Modify gateway engine parameters

Last Updated:Aug 27, 2026

To adapt to changes in different scenarios, you can adjust the parameters of a cloud-native API gateway. Proper parameter tuning improves network performance, reliability, and security, which helps ensure stable operation and a better user experience. However, modifying gateway parameters may affect network connectivity and the applications that use the gateway. Before you modify parameters, make sure that you understand the valid range and effect of each modifiable parameter. This topic describes how to modify gateway parameters and provides parameter details.

Prerequisites

A gateway is created. For more information, see Create a cloud-native API gateway.

Steps

Note
  • Only parameters that are displayed in the console can be modified. Parameters that are not displayed in the console cannot be modified. This restriction ensures stable operation of the instance.

  • Before you modify a parameter value, check the Value Range column on the Gateway Engine Parameters page in the console.

  1. Log on to the API Gateway console.

  2. In the left-side navigation pane, click Cloud-native API Gateway > Instance. In the top navigation bar, select a region.

  3. On the Instance page, click the target instance ID.

  4. In the left-side navigation pane, choose Parameters. In the Gateway Engine Parameters section, find the target parameter, click Edit in the Actions column, set the parameter value as described in the following table, and then click OK.

Gateway engine parameters

Parameter Name

Parameter Type

Value Range

Default Value

Parameter Description

EnableHttp2

bool

[true, false]

false

Request phase. Specifies whether to use HTTP/2 during protocol negotiation.

  • true: Use HTTP/2.

  • false: Do not use HTTP/2.

EnableGenerateRequestId

bool

[true, false]

true

Request phase. When enabled, the gateway generates an X-Request-Id header to uniquely identify each request.

  • true: Generates an X-Request-Id header.

  • false: Does not generate an X-Request-Id header.

EnableGzip

bool

[true, false]

false

Request and response phases.

  • true: Compresses responses with Gzip, which reduces gateway traffic but increases gateway CPU usage.

  • false: Returns the original response.

EnableGzipHardwareAccelerate

bool

[true, false]

false

Hardware-accelerated Gzip compression. Significantly reduces gateway traffic with higher performance and lower CPU usage than software-based Gzip.

  • true: Enables Gzip hardware acceleration.

  • false: Disables Gzip hardware acceleration.

Important
  • Unavailable in unsupported regions or if Gzip hardware acceleration was not enabled at purchase.

  • When enabled, the EnableGzip and ZipAlgorithm parameters no longer take effect.

EnableSlashMerge

bool

[true, false]

false

Request phase. Specifies whether to merge consecutive slashes (/) in the request path.

  • true: Merges redundant / characters. For example, www.example.com//b is treated the same as www.example.com/b.

  • false: Redundant / characters are not merged.

DownstreamIdleTime

integer

[0, 600]

180

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.

  • true: Preserves the case of request and response headers.

  • false: Converts request and response headers to lowercase.

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.

  • true: Enables hardware acceleration.

  • false: Disables hardware acceleration.

Note

Due to underlying hardware limitations, hardware acceleration is currently supported only in the China (Beijing), China (Hangzhou), China (Shanghai), China (Shenzhen), and 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.

  • true: Use HTTP/3.

  • false: Do not use HTTP/3.

UpstreamIdleTimeout

int

[0, 600]

30

Gateway connections. Closes gateway-to-upstream connections idle for the specified duration. Unit: seconds.

PathWithEscapedSlashes

string

  • KEEP_UNCHANGED

  • REJECT_REQUEST

  • UNESCAPE_AND_REDIRECT

  • UNESCAPE_AND_FORWARD

KEEP_UNCHANGED

Forwarding rule for requests whose URI path contains encoded slashes (%2F, %2f, %5C, or %5c).

  • KEEP_UNCHANGED: Keeps the path unchanged.

  • REJECT_REQUEST: The gateway returns a 400 error and rejects the request.

  • UNESCAPE_AND_REDIRECT: Unescapes the characters and performs a redirection.

  • UNESCAPE_AND_FORWARD: Unescapes the characters and forwards the request.

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.