All Products
Search
Document Center

Edge Security Acceleration:Configure network optimization

Last Updated:Jun 30, 2026

ESA provides network access and origin optimization, IPv6 support, WebSocket and gRPC connectivity, and maximum upload size settings.

Enable IPv6

IPv6 (Internet Protocol Version 6) is the sixth version of the Internet Protocol, designed to address IPv4 address exhaustion and meet modern network optimization needs.

Use cases

Most ESA nodes support IPv6. After you enable IPv6, users in an IPv6 environment can access a ESA node via IPv6 when the nearest node supports it. If the nearest node does not support IPv6, clients fall back to IPv4 automatically.

Procedure

  1. In the ESA console, select Websites, and in the Website column, click the target site.

  2. In the navigation pane on the left, choose Speed and Network > Optimize.

  3. Navigate to the Network Optimization tab. In the IPv6 section, click Configure, turn on the Status switch, and select Location as Chinese Mainland or Global based on where your clients are located. Click OK.

    Note

    After you enable IPv6, only clients in the selected Location can resolve to an IPv6 address.

    image

Enable WebSocket

WebSocket is a persistent protocol based on TCP that enables full-duplex communication between clients and servers, allowing servers to proactively push messages to clients. Before WebSocket, web applications had to repeatedly poll the server with HTTP requests, which reduced service efficiency and increased costs. With WebSocket, a single handshake establishes a persistent connection, saving server resources and bandwidth while enabling real-time communication.

Note

The Entrance Edition does not support this feature.

Use cases

  • Live bullet comments: A user sends a comment on their mobile phone while also needing to see comments from N other users in real time. WebSocket pushes all comments from the server to each client simultaneously.

  • Online education: During a live class, notes and outlines edited by the teacher need to be pushed in real time to multiple student clients.

  • Real-time financial quotes: Asset prices such as stocks and commodities change rapidly. WebSocket delivers updated prices to clients worldwide so traders can act immediately.

  • Live sports updates: WebSocket is the best way to deliver real-time sports news to a massive global audience.

  • Video conferencing and chat: WebSocket supports real-time message delivery among multiple participants in a conference.

  • Location-based applications: Developers increasingly use mobile GPS to build location-based network applications that track user movement trajectories.

Usage notes

When accelerating WebSocket requests with ESA, the origin timeout should match the setting in Origin Protocol and Port. If you want the WebSocket connection between the client and the origin to remain available even when no data is being transferred, implement a heartbeat keepalive mechanism between the client and the origin.

Procedure

  1. In the ESA console, select Websites, and in the Website column, click the target site.

  2. In the navigation pane on the left, choose Speed and Network > Optimize.

  3. Select the Network Optimization tab. The WebSocket switch is enabled by default. Toggle it on or off as needed. To configure a custom origin port for WebSocket, see Origin Protocol and Port.

  4. The current configuration applies to all domains under the site. To enable WebSocket for a specific domain only, see Rule Engine and add a rule for that domain.

  5. HTTP/2 and WebSocket cannot take effect on the same connection. Do not enable both simultaneously.

image

Enable gRPC

gRPC is a high-performance remote procedure call framework based on HTTP/2. It uses multiplexing to improve communication efficiency, supports cross-language interoperability, and provides strongly typed interface definitions through Protocol Buffers. gRPC also offers one-way and bidirectional streaming capabilities with integrated TLS encryption and authentication, making it suitable for secure, real-time distributed systems.

Use cases

  • Efficient communication: HTTP/2 multiplexing improves communication throughput and performance.

  • Cross-language interoperability: gRPC supports multiple mainstream programming languages, allowing server and client to be developed in different languages for heterogeneous systems.

  • Strongly typed interface definitions: Protocol Buffers define service interfaces and message structures with strict type checking, reducing errors and simplifying version management.

  • Streaming: Supports one-way and bidirectional streaming RPCs, ideal for large data flows and real-time messaging.

  • Security: gRPC integrates with TLS encryption and supports multiple authentication and authorization mechanisms.

Prerequisites

  • Enable and configure an SSL/TLS edge certificate for your site.

  • Your origin server must support TLS, HTTP/2, and gRPC. Set Origin Protocol to Match Client or HTTPS in the Origin Protocol and Port settings.

  • The client must set the Content-Type request header to application/grpc to process gRPC requests.

Procedure

  1. In the ESA console, select Websites, and in the Website column, click the target site.

  2. In the navigation pane on the left, choose Speed and Network > Optimize.

  3. In the ESA console, navigate to the Network Optimization tab and turn on the gRPC switch.

The current configuration applies to all domains under the site. To enable gRPC for a specific domain only, add a Rule Engine rule for that domain.

image

Maximum upload size

Adjusting the upload size limit accommodates large file uploads, mitigates malicious attacks, and controls traffic costs. A flexible limit ensures business compatibility while optimizing resource usage.

Use cases

  • Large file uploads: For platforms involving large file uploads, such as online video, game distribution, or big data analytics, you can increase the upload limit to ensure large files upload successfully.

  • Mitigating malicious uploads: For user-interactive platforms such as social media, forums, and blogs, malicious users may attempt to upload oversized files to exhaust server resources. Lowering the limit prevents oversized files from being uploaded, reducing server pressure and mitigating security risks.

  • Saving transfer traffic: For traffic-sensitive businesses such as online education, conferencing, and API services, oversized uploads consume significant bandwidth. Setting a smaller limit reduces unnecessary traffic and lowers costs.

Procedure

  1. In the ESA console, go to Websites and click the Website or click View Details in the Actions column.

  2. In the navigation pane on the left, choose Speed and Network > Optimize.

  3. 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 set a value from 100 MB to 500 MB.

  4. Click OK to save the configuration.

    After the configuration is applied, if a user uploads a file that exceeds the set limit, ESA returns a 413 status code to the client.

    Note

    This configuration applies to all domain names under the site. To set the maximum upload size for a specific domain name, add a network optimization rule for that domain name.

Access Optimization (Chinese Mainland Network)

ESA provides network access optimization for the Chinese mainland. This feature uses ESA nodes in regions such as Hong Kong (China), together with the ESA network, to effectively resolve the cross-regional network issues that occur when users in the Chinese mainland access origin servers outside the Chinese mainland.

Important
  • The Access Optimization (Chinese Mainland Network) feature requires an Enterprise tier add-on and is billed on a pay-as-you-go basis. Enabling this feature incurs charges for both upstream and downstream traffic. For pricing details, Contact Customer Service.

  • Only sites with Global (Excluding the Chinese Mainland) as the acceleration region can use the Access Optimization (Chinese Mainland Network) feature. If your acceleration region does not meet this requirement, see Change the Acceleration Region of a Site.

Use cases

If your web service is deployed outside the Chinese mainland and serves global users through a site whose acceleration region excludes the Chinese mainland, users in the Chinese mainland may experience high latency, high packet loss, and network jitter, or even failed access, due to the cross-regional network link.

image

After the user request reaches the ESA node, the Cross-Border Optimization feature selects the optimal node based on the origin location. If the origin is outside the Chinese mainland, a node in Hong Kong (China) or a similar region is used for origin retrieval, ensuring a better experience.

Procedure

  1. In the ESA console, select Websites, and in the Website column, click the target site.

  2. In the navigation pane on the left, choose Speed and Network > Optimize.

  3. Select the Network Optimization tab. This feature is disabled by default. Enable or disable it based on your business requirements.

Mapping between global and rule features

Global configurations apply to all requests for a site. To apply a configuration to specific requests only, use rule-level features: add rule conditions to identify specific parameters in user requests, so that the configuration takes effect only for matching requests.

Global feature

Rule feature

WebSocket

WebSocket

gRPC

gRPC

Maximum Upload Size

Maximum Upload Size

Intelligent Traffic Routing

Intelligent Routing