All Products
Search
Document Center

API Gateway:Modify gateway engine parameters

Last Updated:Jun 08, 2026

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

Create a cloud-native API gateway.

Steps

Note
  • 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.

  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 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.

  • 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

Response phase.

  • true: Compresses responses with Gzip, reducing traffic but increasing 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 becomes www.example.com/b.

  • false: Consecutive slashes (/) are preserved.

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.

  • 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

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.

  • 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.