I measured the time it took to complete a TLS handshake using Rustls and OpenSSL with nginx and it was more than twice as fast.
#SRG(Service Reliability Group) mainly provides cross-sectional support for the infrastructure of our media services, improving existing services, launching new ones, contributing to OSS, etc.
This article is about measuring whether Rustls is faster than OpenSSL, now that Rustls is compatible with nginx.
RustlsIt seems that Let's Encrypt certificate authority is also planning to migrateinstallComparing Rustls + nginx with OpenSSLnginx + OpenSSLnginx + RustlsConclusion
Rustls
Rustls is a modern Transport Layer Security (TLS) library written in Rust. It is primarily designed with an emphasis on safety and performance, aiming to replace memory-unsafe alternatives like OpenSSL. Rustls implements TLS 1.2 and TLS 1.3 for both clients and servers.
It seems that Let's Encrypt certificate authority is also planning to migrate
ISRG's Let's Encrypt certificate authority will begin replacing OpenSSL with Rustls later this year.
So, is Rustls better than OpenSSL?
install
Comparing Rustls + nginx with OpenSSL
Integrate Rustls into Nginx and run the following script.
- 100 requests
- Get p50, p95, p99
nginx + OpenSSL
nginx + Rustls

Conclusion
I incorporated Rustls into nginx and investigated its advantages over OpenSSL.
As the benchmark results show, Rustls outperforms in every metric, with p99 being more than twice as fast.
SRG is looking for people to work with us. If you are interested, please contact us here.