5 million HTTP/3 requests per second

uWebSockets is an HTTP & WebSocket server library, getting QUIC and HTTP/3 support soon. Right now there is a minimal, highly incomplete and experimental example, recently benchmarked.

Compile with “WITH_BORINGSSL=1 WITH_QUIC=1 make”

This example is a simple but complete HTTP/3 server with header compression and a simple response. The idea will be to keep existing uWebSockets interfaces unmodified, allowing seamless transition between TCP, TLS and QUIC. Ideally even WebTransport will be supported under a similar interface as WebSockets.

uWS::App, uWS::SSLApp and uWS::QuicApp come with the same interfaces.

HTTP/3 is based on QUIC, which is based on UDP so we have a new system for that. Using sendmmsg and recvmmsg we can do 3 syscalls per loop iteration; epoll_wait, recvmmsg and sendmmsg. Regardless whether we have 1 or 10000 connections, only one single system level socket is used and so all incoming and outgoing traffic flows through one single file descriptor. This means that practically all memory overhead is in user space alone (space benchmarks will follow). It also means multiple QUIC connections can be handled with one syscall, which is not the case when having one TCP file descriptor and socket per TCP connection.

These initial benchmarks run on the M1 MacBook Air and are roughly extrapolated from a single-thread performance of 800k requests per second — 5 million is a rough extrapolation at this point, so take it with a grain of salt, but it should be very close to that. This is quite impressive as the laptop is fanless and thin — if you slash fast enough I bet you can shave with it.

Things are still being developed and highly incomplete but these are encouraging numbers showing things move in the right direction. More updates are to come in the near future.

Thanks

--

--

--

https://github.com/uNetworking

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

🙉Watssuupp Guys!

Django Static Files

FUNNY COMMANDS IN REDHAT LINUX #

CVE-2020-8163: Partial Remote Code Execution

Common Front End Developer Interview Questions | Career Karma

KodeKloud Engineer Task

Building a scalable and cost-efficient Data Processing Engine

Python’s Unique Feature

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alex Hultman

Alex Hultman

https://github.com/uNetworking

More from Medium

How to Build a Simple Web3 Ecommerce App with Astra DB

How to use DB8 on LG WebOS instead of LocalStorage and indexedDB

Lerna is dead — Long Live Lerna

Implement a Skybox Texture Using Rust and WebGL