ASP.NET Core Kestrel: Adventures in building a fast web server
recording made private on YouTubehttps://youtu.be/kej3YJDMAW4
summary
Kestrel uses libuv for async IO, pins a large memory pool in the LOH divided into 4KB slabs to avoid GC, and implements a push-based socket-input queue so the app can parse while bytes arrive. Request parsing avoids allocations by comparing start-line bytes as longs with a mask-and-long method compare, uses SIMD/vectorized scans to find CRLF fast, stores known headers as bit flags and static byte blobs, and sustains over 5M req/s on a 48‑core machine.
AI-written summary · about







