quic_gso
The 'quic_gso' directive enables or disables the use of Generic Segmentation Offload for QUIC connections in NGINX.
Description
The 'quic_gso' directive is utilized within the contexts of 'http' and 'server' in NGINX configurations to control the behavior of QUIC (Quick UDP Internet Connections) when it comes to segmentation offloading. This feature allows NGINX to manage large packets more efficiently by using the underlying network stack to segment data into smaller packets before transmission. This is especially beneficial for high-throughput applications, as it can reduce CPU load and improve overall performance when handling QUIC connections.
When the 'quic_gso' directive is enabled, the QUIC traffic will leverage GSO where supported by the operating system and network interface. This means that rather than generating multiple small packets for a single QUIC connection, the network stack will break larger packets into the required sizes for transmission. This behavior is controlled via a boolean flag—setting 'quic_gso on;' enables this feature, whereas 'quic_gso off;' disables it. The default state is effectively off unless explicitly set otherwise, making it critical for administrators to consider this directive in performance tuning for applications relying heavily on QUIC.
The timing of enabling 'quic_gso' should be appropriately managed in relation to the performance benchmarks for application workloads. Improper configurations may lead to increased latency or packet loss, especially in networks that do not fully support GSO. Proper testing is recommended to ensure compatibility and performance improvements for specific use cases.
Config Example
http {
server {
listen 443 ssl http2;
quic_gso on;
# other configurations...
}
}Ensure your network stack supports GSO for optimal performance.
Disabling GSO may lead to increased CPU use and reduced throughput for QUIC traffic.
Test the configuration in a staging environment to avoid unexpected behavior in production.