QUIC Acceleration for Audio and Video Services
The QUIC (Quick UDP Internet Connections) protocol improves client access speed, especially in scenarios with poor network conditions or frequent switching between Wi-Fi and mobile networks. It enables multiplexing without requiring reconnection, which enhances resource access efficiency and secures data transmissions.
QUIC protocol
QUIC, also known as the Quick UDP Internet Connections protocol, provides security equivalent to SSL and offers advantages such as multiplexing. It performs well in weak network conditions and can still provide a usable service even with significant packet loss and network latency. The QUIC protocol allows implementing different congestion control algorithms at the application layer without requiring support from the operating system or kernel. This makes it more flexible to modify compared to the traditional TCP protocol, making it suitable for services where TCP optimization has hit a bottleneck.
With the rapid growth of new services like short-form video and live streaming, media transmission now requires both high bandwidth and low latency. The QUIC protocol can effectively resolve network and video buffering issues, improve audio and video resource access, and ensure the security of data transmissions.
Supported QUIC protocol types
ALB supports gQUIC and iQUIC. The HTTP/3 protocol is an application-layer protocol built on iQUIC. It relies on iQUIC to implement features such as multiplexing, congestion control, loss detection, and retransmission. The HTTP/3 protocol establishes client connections faster and eliminates head-of-line blocking in multiplexed streams.
Application Load Balancer (ALB) supports gQUIC versions Q46, Q43, and Q39, and HTTP/3 version h3.
HTTP/3 negotiation
After you enable QUIC Upgrade, ALB advertises the HTTP/3 and gQUIC protocols to clients. It prioritizes advertising HTTP/3 so that clients that support HTTP/3 can connect to ALB first.
Clients always fall back to using HTTPS or HTTP/2 if they fail to establish an HTTP/3 connection.
Clients that support HTTP/3 use a cache cookie related to HTTP/3.
Enabling or disabling QUIC upgrade does not affect client connections to ALB.
Support is advertised in the Alt-Svc HTTP response header. The alt-svc header value is:
Alt-Svc : h3=":$quic_port"; ma=3600,quic=":$quic_port"; v="46,43,39"; ma=3600When QUIC upgrade is enabled, your client may fall back to HTTPS or HTTP/2 in certain situations instead of negotiating HTTP/3. These include:
The HTTP/3 version supported by the client is incompatible with the HTTP/3 version supported by ALB.
ALB detects that UDP traffic is blocked or rate-limited, preventing HTTP/3 from working.
The client does not support HTTP/3 at all and therefore does not attempt to negotiate an HTTP/3 connection.
Client requirements
If you use Google Chrome, Google Chrome can initiate QUIC requests directly to ALB.
To access QUIC by using Google Chrome, you must use a specific Chrome version:
The highest gQUIC protocol version that ALB supports is Q46, which maps to Google Chrome 74 to 81.
The highest HTTP/3 protocol version that ALB supports is h3, which maps to Google Chrome 87 or later.
If you use other clients, such as a custom-developed application, the client must integrate a network library that supports the QUIC protocol, for example: lsquic-client, Cronet, ngtcp2, and quiche.
Use cases
When you use Google Chrome to access an ALB instance, ALB routes requests to backend servers based on the certificate domain name example.com bound to the listener. The two main use cases are:
When both an HTTPS listener and a QUIC listener are configured, ALB prioritizes the QUIC listener. In this case, when you enter the certificate's domain name
example.comin Google Chrome, the ALB instance forwards the client request to the default server group RS1 through the configured QUIC listener.When the QUIC listener is unavailable, the connection automatically falls back to the associated HTTPS listener. In this case, when you enter the certificate's domain name
example.comin Google Chrome, the ALB instance forwards the client request to the default server group RS1 through the configured HTTPS listener.
Prerequisites
You have created an ALB instance. For more information, see Create and manage ALB instances.
You have created a server group named RS1. For more information, see Create and manage server groups.
You have added an ECS01 instance to the RS1 server group and deployed an Nginx video service on the ECS01 instance.
You have deployed an SSL server certificate on the ALB instance. The certificate is bound to the domain name
example.com.
Step 1: Create a QUIC listener
Log on to the ALB console.
In the top navigation bar, select the region where the ALB instance is deployed.
On the Instances page, find the target instance and click the instance ID. On the Listener tab, click Create Listener.
In the Configure Listener wizard, specify the following parameters, and then click Next.
This topic describes only the relevant parameters. For other parameters, you can use the default values. For more information, see Add a QUIC listener.
Listener configuration
Description
Listener Protocol
Select the protocol for the listener.
In this example, select QUIC.
Listener Port
Specify the port to receive and forward requests to backend servers.
The port number must be between 1 and 65535.
NoteWithin the same ALB instance, listener ports for the same protocol must be unique, and HTTP and HTTPS listener ports cannot be the same.
In the Configure SSL Certificate wizard, select a server certificate, and then click Next.
In the Select Server Group wizard, select a Server, then select a server group, view the backend server information, and click Next.
In the Configuration Review wizard, confirm the configuration information and click Submit.
Step 2: Create an HTTPS listener
When you create the HTTPS listener, enable QUIC upgrade and associate it with the QUIC listener that you created.
On the Instances page, find the instance for which you created a QUIC listener in Step 1 and click the instance ID.
On the Instance Details tab, click the Listener tab, and then click Create Listener.
In the Configure Listener wizard, specify the following parameters, and then click Next.
This topic describes only the relevant parameters. For other parameters, you can use the default values. For more information, see Add an HTTPS listener.
Listener configuration
Description
Listener Protocol
Select the protocol for the listener.
In this example, select HTTPS.
Listener Port
Enter the listener port used to receive requests and forward them to backend servers. Typically, port 80 is used for HTTP and port 443 is used for HTTPS.
The port number must be between 1 and 65535.
In this example, enter 443.
NoteListener ports must be unique within the same load balancer instance.
Advanced Settings
Click Modify to expand the advanced settings.
QUIC Upgrade
Select whether to enable QUIC upgrade.
In this example, enable QUIC upgrade and select the QUIC listener that you created from the Associated QUIC Listeners drop-down list.
In the Configure SSL Certificate wizard, select a server certificate, and then click Next.
In the Select Server Group wizard, select a Server, then select a server group, view the backend server information, and then click Next.
On the Configuration Review page, confirm the configuration information and click Submit.
Step 3: Configure domain name resolution
Create a CNAME record to map example.com to the public domain name of the ALB instance.
Log on to the ALB console.
In the top navigation bar, select the region.
Find the target ALB instance and copy its DNS name.
Follow these steps to add a CNAME record.
NoteIf your domain name is not registered with Alibaba Cloud, you must first add it to the Alibaba Cloud DNS console before you can configure its resolution settings. For more information, see Domain Name Management. If your domain name is registered with Alibaba Cloud, proceed with the following steps.
Log on to the Alibaba Cloud DNS console.
On the Public Zone page, find the target domain name and click Settings in the Actions column.
On the Settings page, click Add Record.
In the Add Record panel, specify the following parameters, and then click OK.
Parameter
Description
Record Type
From the drop-down list, select CNAME.
Hostname
The hostname for the record. For example, www.
Query Source
Select Default.
Record Value
Paste the DNS name of the ALB instance that you copied.
TTL
Time to live (TTL). This specifies how long the DNS record is cached on a DNS server. This example uses the default value.
NoteA new CNAME record takes effect almost immediately. A modified record's propagation time depends on the TTL of the previous record, which defaults to 10 minutes.
If you encounter a conflict when adding the record, use a different hostname for resolution. For more information, see DNS record conflict rules.
Step 4: Verify the result
This topic uses a Windows client as an example. In the browser, enter example.com to access the ALB instance. In this topic, an Nginx video service is deployed on ECS01, which is the backend server in server group RS1.
When both an HTTPS listener and a QUIC listener are configured, enter the domain name bound to the certificate,
example.com, in your browser and pressF12. You can see that the Protocol for the current webpage is HTTP/3, and the request took 93 ms.When the QUIC listener is unavailable, enter the domain name bound to the certificate,
example.com, in your browser and pressF12. You can see that the Protocol for the current webpage is HTTP/2, and the request took 148 ms.
The results show that using HTTP/3 through ALB improves access speed to video content on the backend servers.