All Products
Search
Document Center

Microservices Engine:Modify gateway parameters

Last Updated:Apr 21, 2025

To adapt to different scenarios, you can adjust the parameters of cloud-native gateways to improve the performance, reliability, and security of the network. However, parameter modifications may adversely affect network connections and the use of applications. Therefore, before you modify gateway parameters, you must learn the value ranges of modifiable parameters and the meanings of each value. This topic describes how to modify gateway parameters and provides details on parameters.

Prerequisites

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

Procedure

Note
  • To ensure that your gateway stably runs, you can modify the parameters that are displayed in the Microservices Engine (MSE) console. You cannot modify the parameters that are not displayed in the MSE console.

  • You must change parameter values based on the Ranges column in the Gateway Engine Parameters section of the Parameter Settings page in the MSE console.

  1. Log on to the MSE console. In the top navigation bar, select a region.

  2. In the left-side navigation pane, choose Cloud-native Gateway > Gateways.

  3. On the Gateways page, click the name of the gateway.

  4. In the left-side navigation pane, click Parameter Settings. In the Gateway Engine Parameters section, find the parameter that you want to modify, and click Edit in the Actions column. In the Modify Parameters dialog box, modify the parameter based on the parameter description, and click OK.

Gateway engine parameters

Parameter

Data type

Value range

Default value

Description

EnableHttp2

bool

[true, false]

false

Specifies whether to use HTTP/2 for the communications between the server and client. This parameter applies to requests.

  • true: HTTP/2 is enabled.

  • false: HTTP/2 is disabled.

EnableGenerateRequestId

bool

[true, false]

true

Specifies whether to generate request IDs in request headers for request tracing. The request IDs are specified by X-Request-Id. This parameter applies to requests.

  • true: Request IDs are generated in request headers for request tracing.

  • false: Request IDs are not generated in request headers.

EnableGzip

bool

[true, false]

false

This parameter applies to requests and responses.

  • true: Responses are compressed by using GZIP. The compression helps reduce gateway traffic but increases CPU loads of the gateway.

  • false: Responses are directly returned without being compressed.

EnableSlashMerge

bool

[true, false]

false

Specifies whether to remove extra forward slashes (/) from a request. This parameter applies to requests.

  • true: Extra forward slashes (/) are removed from a request. For example, the www.example.com//b request is available. If you set EnableSlashMerge to true, an extra forward slash (/) is removed from the request and the request is changed to www.example.com/b.

  • false: Extra forward slashes (/) are not removed from a request.

DownstreamIdleTime

integer

[0, 600]

15

The limit on the period of time in which no requests are sent. If no requests from the client to the gateway are available in the specified period of time, gateway connections are disconnected. This parameter applies to gateway connections. Unit: seconds.

PreserveHeaderFormat

bool

[true, false]

false

Specifies whether to convert all letters of a header into lowercase letters. For requests and responses, HTTP/1.1 headers are not case-sensitive. The default value is false, indicating that all letters of headers are converted into lowercase letters. The conversion ensures compatibility between HTTP/1.1 headers and HTTP/2 headers. This parameter applies to requests and responses.

  • true: Letters of headers are not converted into lowercase letters.

  • false: All letters of headers are converted into lowercase letters.

DownstreamConnectionBufferLimits

integer

[0, 2147483647]

32768

The maximum buffer size of a gateway connection. If you specify this parameter, the throughput and the use of gateway memory are adversely affected. This parameter applies to gateway connections. Unit: bytes.

EnableHardwareAccelerate

bool

[true, false]

true

Specifies whether to enable hardware acceleration. This parameter applies to Transport Layer Security (TLS) encryption and decryption. If hardware acceleration is not supported in the region where your cloud-native gateway resides or hardware acceleration is not selected when you purchase your cloud-native gateway, this parameter cannot take effect.

  • true: Hardware acceleration is enabled.

  • false: Hardware acceleration is disabled.

Note

Due to underlying hardware limitations, hardware acceleration is supported in the following regions: China (Beijing), China (Hangzhou), China (Shanghai), China (Shenzhen), and Singapore.

XffTrustedNum

integer

[0, 10]

0

The number of trusted proxies of the gateway. This parameter applies to requests and determines whether the gateway uses the request headers generated by the client. The request headers include x-forwarded-for and x-request-id.

If this parameter is set to 0, the peer socket IP address is used as the real IP address and is specified in the x-envoy-external-address request header to be passed to the backend.

If this parameter is set to a value other than 0, the specified number of hops are skipped from right to left from the x-forwarded-for header to which the socket IP address is attached. In this case, the real IP address is retrieved. Then, the real IP address is specified in the x-envoy-external-address request header and passed to the backend. The x-request-id and x-forwarded-proto headers that are passed by the client are remained in the request without any modification.

DownstreamHttp2MaxConcurrentStream

integer

[0, 2147483647]

100

The maximum number of concurrent streams on a connection when the client uses HTTP/2. This parameter applies to requests. Unit: bytes.

InitialStreamWindowSize

integer

[0, 2147483647]

65535

The initial window size of a stream when the gateway negotiates with the client by using HTTP/2. This parameter applies to requests. Unit: bytes.

InitialConnectionWindowSize

integer

[0, 2147483647]

1048576

The initial window size of a connection when the gateway negotiates with the client by using HTTP/2. This parameter applies to requests. Unit: bytes.

EnableHttp3

bool

[true, false]

false

Specifies whether to enable HTTP/3 when the downstream node negotiates with the gateway. This parameter applies to requests.

  • true: HTTP/3 is enabled.

  • false: HTTP/3 is disabled.

UpstreamIdleTimeout

int

[0, 600]

30

The timeout period. If a gateway does not send any request to the upstream server within the specified period, the gateway disconnects from the upstream server. This parameter applies to gateway connections. Unit: seconds.

PathWithEscapedSlashes

string

  • KEEP_UNCHANGED

  • REJECT_REQUEST

  • UNESCAPE_AND_REDIRECT

  • UNESCAPE_AND_FORWARD

KEEP_UNCHANGED

The forwarding policy of a request whose Uniform Resource Identifier (URI) contains escaped characters, such as %2F, %2f, %5C, or %5c.

  • KEEP_UNCHANGED: The request is forwarded without any change.

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

  • UNESCAPE_AND_REDIRECT: The escaped characters are unescaped, and the request is redirected.

  • UNESCAPE_AND_FORWARD: The escaped characters are unescaped, and the request is forwarded to the backend service.

ZipAlgorithm

List<string>

[brotli, gzip]

gzip

The compression algorithm. Valid values: brotli and gzip.

If you select both brotli and gzip for this parameter, and the value of q for gzip is the same as that for brotli in the Accept-Encoding parameter, the compression algorithm that comes first in the list takes effect.

EnableProxyProtocol

bool

[true, false]

false

Specifies whether to enable the Proxy protocol. If a Network Load Balancer (NLB) instance is deployed as an ingress for traffic, you must enable the Proxy protocol to obtain the real IP address of the client. After you enable the Proxy protocol, non-Proxy requests are not adversely affected.

EnableCustomAuthConfigPush

bool

[true, false]

false

Used in scenarios in which custom authentication services are available. After this feature is enabled, the connection is not disconnected if authentication rules change. This feature is suitable for scenarios in which WebSocket and online business are used.

EnableXffTrustedCidrs

bool

[true, false]

false

Used to configure the trusted CIDR blocks of frontend proxy services, such as WAF and CDN, for a gateway. The gateway can obtain the real IP address of the client from the XFF header and skip the IP addresses in the trusted CIDR blocks.