This repository contains the source code and test scripts used for the analysis and practical experimentation of the QUIC protocol. The project was developed as part of the Bachelor's Degree Thesis in Web Technologies at Alma Mater Studiorum - University of Bologna.
The main objective of this project is to evaluate the network performance of the open-source library gm-quic (developed in the Rust language), comparing it with[cite: 1]:
- Quinn: another implementation of the QUIC protocol written in Rust[cite: 1].
- HTTP/2 over TCP/TLS: the traditional network stack, implemented using the Hyper and Rustls libraries[cite: 1].
The experimentation focuses on analyzing latencies in realistic network scenarios, measuring times related to the handshake, server responsiveness (time to first byte), and the transfer of short data streams[cite: 1].
The tests were performed in a local environment on a Linux operating system, using the loopback address 127.0.0.1[cite: 1]. To simulate specific, realistic network conditions, the Linux network emulator tc-netem was used[cite: 1].
Simulated conditions:
- Delay: 50ms[cite: 1].
- Jitter: +/- 10ms with a Gaussian distribution[cite: 1].
- Packet Loss: tested at 0.1% for normal conditions and 5% to specifically evaluate the impact of Head-of-Line Blocking[cite: 1].
The experimentation is based on the statistics of 500 iterations for each protocol[cite: 1]. The tests highlighted the following results:
- Handshake Time: gm-quic and Quinn show median latencies of about 65-75ms, resulting in roughly twice the speed of the TCP/TLS stack[cite: 1].
- Time to First Byte (TTFB): gm-quic demonstrated high responsiveness in processing requests, settling at a median of about 110ms[cite: 1].
- Transmission Time and Head-of-Line Blocking (HoL): In downloading small files (15KB), gm-quic showed remarkable robustness against HoL blocking[cite: 1]. It maintained stable completion times and latencies under 500ms even with a 5% loss rate, unlike HTTP/2 which suffered severe delays up to over 4000ms due to stream blocking[cite: 1].
To run this test suite, the following dependencies are required:
- Rust toolchain (Cargo).
- A Linux environment with root privileges to configure the tc-netem kernel module.
Follow these steps to replicate the experimentation environment and run the benchmarks.
# Configure the network emulator
sudo tc qdisc add dev lo root netem delay 50ms 10ms loss 0.1%
# Start the server
cargo run --bin server
# Start the client to collect benchmarks
cargo run --bin client