Configure network optimization features to enhance connection performance and support modern protocols when using Edge Security Acceleration (ESA). It provides features for network access and origin fetch optimization, IPv6 support, WebSocket and gRPC connections, and maximum upload size settings.
Enable the IPv6 protocol
Internet Protocol Version 6 (IPv6) is the sixth version of the Internet Protocol. As IPv4 addresses become scarce, IPv6 support addresses network requirements while maintaining accessibility for both IPv4 and IPv6 clients.
Use cases
Most ESA points of presence (POPs) accept requests over the IPv6 protocol. When you enable IPv6 support:
Use case | Behavior |
IPv6 client, IPv6-compatible POP | Connect via IPv6 |
IPv6 client, IPv4-only POP | Connect via IPv4 (fallback) |
IPv6-only client, IPv4-only POP | Connection succeeds via IPv4 |
Procedure
In the ESA console, select Websites, and in the Website column, click the target site.
In the navigation pane on the left, choose .
Select the Network Optimization tab. In the IPv6 section, click Configure. Turn on the Status switch. Set Location to Chinese Mainland or Global based on the region of your clients. Click OK.
NoteAfter you enable IPv6, an IPv6 address is resolved only when a client from the specified region sends an access request.

Enable WebSocket
WebSocket provides full-duplex communication over persistent TCP connections between clients and servers, enabling real-time bidirectional data transmission. Unlike HTTP polling, WebSocket uses a single handshake to establish persistent connections, which saves server resources and bandwidth.
The Entrance plan does not support this feature.
Use cases
The following table shows common use cases for WebSocket:
Use case | Description |
Live comment systems | Send real-time comments during live streams |
Online education platforms | Synchronize teacher notes to student clients |
Financial trading | Push real-time price updates |
Video conferencing | Support real-time communication among participants |
Location-based applications | Continuously track client location data |
Before you start
ESA supports WebSocket only on ports 80 and 443.
The origin fetch timeout must be the same as the Timeout for HTTP requests to origin set in the Origin rules.
If you want the WebSocket connection between the client and the origin server to remain active for a long time, even when no data is being transferred, implement a heartbeat keepalive mechanism between the client and the origin server.
Procedure
In the ESA console, select Websites, and in the Website column, click the target site.
In the navigation pane on the left, choose .
Select the Network Optimization tab. In ESA, WebSocket is enabled by default. You can enable or disable it as needed. To configure a separate origin port for WebSocket, see Configure origin protocol and port.
NoteThis configuration applies to all domain names under the site. If you want to enable the WebSocket feature for a specific domain name only, add a rule for that domain name. For more information, see Network optimization rules.

Establish a gRPC connection
gRPC uses HTTP/2 for high-performance remote procedure calls with multiplexing capabilities, providing unidirectional and bidirectional streaming. HTTP/2 multiplexing allows multiple concurrent requests over a single connection, reducing connection overhead.
gRPC capabilities
gRPC provides the following major benefits:
Feature | Benefit |
Performance via multiplexing | Better communication efficiency using HTTP/2 |
Cross-language interoperability | Support multiple programming languages |
Strong typing | Protocol Buffers for type checking and version management |
Advanced streaming | Support for unidirectional and bidirectional streaming |
Secure transport | Integrated TLS encryption and authentication |
Before you start
Ensure that you have enabled and correctly configured an SSL/TLS edge certificate for your site.
Ensure that your origin server supports the TLS, HTTP/2, and gRPC protocols. In the origin protocol and port settings, set Origin Protocol to Match Client or HTTPS.
Make sure
Content-Typerequest header is set toapplication/grpcfor processing gRPC requests.
Procedure
In the ESA console, select Websites, and in the Website column, click the target site.
In the navigation pane on the left, choose .
Select the Network Optimization tab and turn on the gRPC switch.
NoteThis configuration applies to all domain names under the site. If you want to enable the gRPC feature for a specific domain name only, add a network optimization rule for that domain name.

Set the maximum upload size
Adjusting the maximum upload size limit helps you manage large file uploads, defend against malicious attacks, and control traffic costs. By setting an appropriate limit, you can adapt to business needs and optimize resources.
Use cases
The following table shows when and how to set the maximum upload size:
Use cases | Recommendation | Purpose |
Large file services | Increase limit (up to 500 MB) | Support video platforms, software distribution |
Security hardening | Decrease limit | Prevent malicious oversized uploads |
Traffic optimization | Optimize limit | Reduce bandwidth consumption |
Procedure
In the ESA console, select Site Management, and click the Site Name or Details in the Actions column.
In the navigation pane on the left, choose .
Select the Network Optimization tab. In the Maximum Upload Size section, click Configure and set the Upper Limit.
The default value is 300 MB. You can change this value. The valid range is 100 to 500 MB.
Click OK to complete the configuration.
After the configuration is complete, if a user uploads a file that exceeds the specified size limit, ESA returns a 413 status code to the client.
NoteThis configuration applies to all domain names under the site. If you want to set maximum upload size for a specific domain name only, add a network optimization rule for that domain name.
Access Optimization (Chinese Mainland Network)
ESA provides a feature that optimizes network access for the Chinese mainland. This feature uses ESA POPs and the ESA network in regions such as China (Hong Kong) to improve performance when users in the Chinese mainland access origin servers outside the Chinese mainland.
The Access Optimization (Chinese Mainland Network) feature is a paid add-on for the Enterprise plan that uses the pay-as-you-go billing method. After you enable this feature, you are charged for the upstream and downstream traffic of accelerated requests. For more information about billing, contact customer service.
Only sites whose acceleration region is Global (Excluding the Chinese Mainland) can use Access Optimization (Chinese Mainland Network). If your acceleration region does not meet this requirement, see Switch the acceleration region of a site.
Use cases
Enable this feature when your web service is deployed outside the Chinese mainland but serves Chinese mainland users through a global site. Without this optimization, users may experience:
High latency between regions and Chinese mainland
High packet loss rates affecting reliability
Network jitter causing performance degradation
Complete access failures in some areas
After a request from a user in the Chinese mainland reaches a POP, the Access Optimization (Chinese Mainland Network) feature selects the optimal POP to handle the request based on the origin server's location. If the origin server is located outside the Chinese mainland, a POP in a region such as Hong Kong is used for origin requests to ensure a good experience.
Procedure
In the ESA console, select Websites, and in the Website column, click the target site.
In the navigation pane on the left, choose .
Select the Network Optimization tab. This feature is disabled by default. You can enable or disable it as needed.
Troubleshooting
IPv6 requests not resolving: Verify location settings match your client regions
WebSocket disconnections: Confirm if heartbeat configuration is implemented at the application level for long inactive periods
gRPC connection issues: Verify SSL/TLS certificate configuration and confirm origin server's support for HTTP/2 and gRPC protocols
Upload size rejection: Confirm that configured file size limits are within the valid 100-500 MB range
Cross-border optimization not performing: Confirm site acceleration region is correctly configured as 'abroad' and verify sufficient traffic volume exists
Site-level and feature-based rules mapping
Site-level feature configurations apply to all requests under the site. To enable a feature for specific requests, use rule features. Rule conditions detect specific parameter information in user requests to ensure that rule configurations apply only to specified requests.
Site-level features | Corresponding rule-based features |
WebSocket | |
gRPC | |
Maximum Upload Size | |
Traffic Smart Routing |