The Nimble Streamer team is continuously improving its products by both enhancing existing capabilities and developing complex new features. Recent advancements, such as ABR WHEP playback, exemplify this progress.
Recently, we’ve been researching the next-generation transport protocol – WebTransport. In the process, implementing HTTP/3 and QUIC became inevitable, as they form the foundation of WebTransport. Naturally, we started building further up the stack. BTW, we were greatly inspired by the excellent “28 days later” article by Lorenzo Miniero (kudos to him!), which provides a deep dive into the entire stack, including its pitfalls and challenges.
HTTP/3 is a powerful protocol on its own, making its integration into Nimble Streamer a valuable addition. Since all modern browsers support HTTP/3, using it for streaming HTTP-based content can significantly enhance delivery performance. This covers HLS and MPEG-DASH streams in live, VOD and DVR modes.
There are already several libraries available for implementing QUIC. After thorough research, we chose lsquic by LiteSpeed Technologies, as it delivers the best performance. We deeply appreciate the contributions made by the company and its contributors. As a token of our appreciation, we also made a humble contribution to the library.
Now, let’s explore how to use HTTP/3 for streaming from Nimble Streamer.
Setting up HTTP/3 in Nimble Streamer
First, ensure that you have installed or upgraded to the latest version of Nimble Streamer. Currently, QUIC and HTTP/3 are supported only on a limited number of operating systems—at this time, Ubuntu 22.02 and 24.04 are the only supported OSes.
Before enabling HTTP/3, you must set up and test SSL. Refer to this article for detailed instructions.
Then, to enable HTTP/3, add the following lines to your /etc/nimble/nimble.conf
file:
ssl_http2_enabled = true
http3_enabled = true
With SSL properly configured, the relevant section of your configuration file should look like this:
ssl_certificate = ./test/ssl_cert_no_pass/server.crt
ssl_certificate_key = ./test/ssl_cert_no_pass/server_no_passphrase.key
ssl_http2_enabled = true
http3_enabled = true
For a specific domain, use a configuration like this:
ssl_server {
server_name = localhost
ssl_certificate = ./test/ssl_cert_no_pass/server.crt
ssl_certificate_key = ./test/ssl_cert_no_pass/server_no_passphrase.key
ssl_http2_enabled = true
http3_enabled = true
}
After adding any parameters, remember to restart Nimble Streamer by running sudo service nimble restart
.
Tuning HTTP/3
If you are delivering HTTP/3 streams to around 1,000 viewers, you don’t need to adjust any specific settings.
However, the following parameters can be used to fine-tune performance:
http3_worker_threads
– defines the number of worker threads used for processing. By default, it’s “1”.
http3_max_viewers
– By default, Nimble Streamer processes 2,500 simultaneous connections per HTTP/3 worker thread. You can increase or decrease this limit using this parameter.
http3_udp_so_receive_buffer
– If you experience any issues with large number of incoming UDP connections, you can increase the UDP buffer size by setting this parameter. The value is defined in bytes, with a default of 1048576. In case of issues, try increasing it 4 times or test different values to see how they work.
http3_udp_so_send_buffer
– Allows you to increase the UDP send buffer size. The default value is -1, which means the system will use the underlying OS kernel’s default setting.
http3_enable_ecn
– Enables Explicit Congestion Notification. By default, this is set to “true”, meaning ECN is enabled.
restrict_session_ip
– By default Nimble Streamer checks user session ID against his IP address to avoid fraud. If this needs to be overlapped for telecom-related reasons, you can disable it by setting up this parameter to “false”. This will make Nimble skip IP address check for each session, HTTP/3 supports it by design. By default, this is set to “true”.
Again, don’t forget to re-start Nimble with “sudo service nimble restart
” command.
Testing HTTP/3
First, please note that HTTP/3 will not work with an IP address – it requires a hostname. This is a protocol restriction, not a limitation of Nimble Streamer.
If you’d like to test using cURL, you need to build it from source using the latest version available on the current master branch. After you have the build, you can then run the test with the following command:
curl -v --http3-only -k --ipv4 https://localhost:8443/vod/sample.mp4/playlist.m3u8
Another option is to test HTTP/3 directly in a browser. Simply open any HLS player and use your playback URL.
If you’re testing in Firefox with localhost and a self-signed certificate (unknown certificate root), you need to adjust the following settings in the about:config
page:
network.http.http3.alt-svc-mapping-for-testing localhost;h3=:8443
network.http.http3.disable_when_third_party_roots_found false
If you have any questions or encounter issues with this feature, please contact us, and our engineers will be happy to assist you.