← Back
Home › Systems › Networking and edge

http-server

high-performance HTTP server

NGINX, hyper

SystemTechniques · 14Primitives · 59 http-server Async io runtimeconcurrency · medium: Futures/tasks executor over a reactor (epoll/io_uring) with wakers and timers (listed in Moved to the wiki)Thread per coreconcurrency · medium: Shard-per-core design: pinned threads, no shared state, message passing between coresWork-stealing dequeconcurrency · medium: Per-worker deque: the owner pushes and pops at the bottom without contention, idle workers steal from the top; the core of Rayon, Tokio and Go.›Deterministic simulation testingdistributed · medium: Run the whole system in one thread under a seeded scheduler with simulated network, disk and clock, so every failure replays from its seed.›Primary-backup replicationdistributed · medium: One node orders all writes and ships them to standbys; the acknowledgement rule (none, one, all) sets what a crash loses, and an external arbiter decides who takes over.›QUICnetworking · medium: Encrypted, multiplexed transport over UDP with 1-RTT setup, independent streams and connection migration; the transport of HTTP/3.›Coverage-guided fuzzingsecurity · medium: Mutate inputs, run an instrumented target, and keep any input that reaches a new code edge; feedback turns blind guessing into incremental search.›epoll event loopnetworking · low: One thread waits on thousands of non-blocking sockets with epoll_wait and handles only ready ones; the core of nginx, Redis and tokio.›io_uringnetworking · low: Linux async I/O through two shared-memory rings (submissions in, completions out), batching or eliminating syscalls for sockets and files alike.›Hierarchical timing wheelsystems · low: Timers bucketed by expiry into wheels of slots, coarser wheels for far deadlines: O(1) insert and cancel for millions of timeouts.›Deflatecompression · low: DEFLATE/gzip: LZ77 + Huffman, the format behind HTTP gzip, zip and PNGHdr histogramdata-structures · low: Log-linear bucketed histograms with bounded relative error for latency percentilesBuffer pools for zero-allocation I/Ohardware-os · low: Preallocate a fixed set of aligned I/O buffers and recycle them through a free list, so the hot path never mallocs, faults or unmaps. The bounded count doubles as back pressure.›Process supervisionhardware-os · low: A parent process starts services, reaps their exits and restarts them under a delay and burst-limit policy, then stops them with SIGTERM before SIGKILL.›HTTP/1.1 message parsingnetworking · low: Parse HTTP/1.1 requests and responses incrementally from a byte stream: RFC 9112 body-length rules, chunked decoding and the strictness that stops request smuggling.›HTTP/2networking · low: Binary multiplexed framing for HTTP over one TCP connection: streams, per-stream and per-connection credit windows, HPACK header compression and the limits that contain abuse.›Zero-copy I/Onetworking · low: Move bytes between files, sockets and NICs by passing page references instead of copying through user space: sendfile, splice, MSG_ZEROCOPY, kTLS.›SIMD substring searchsearch-sort · low: Find bytes or substrings by comparing 16-64 haystack positions per instruction against the needle's first and last byte, then verifying the rare candidates.›Mutual TLSsecurity · low: TLS where the client also proves a certificate key, so every connection carries a verified, rotatable machine identity.›Graceful drainingsystems · low: On a termination signal, stop taking new work, finish in-flight work until a deadline, tell clients to reconnect elsewhere, then exit; clients resume from a token.›SPSC ring bufferdata-structures · low: Bounded wait-free queue for exactly one producer and one consumer thread, built from an array and two indices with acquire/release ordering.›Cpu isolation and pinninghardware-os · low: Isolcpus/nohz_full, thread affinity and IRQ steering for jitter-free hot threadsNuma aware allocationhardware-os · low: Allocate memory and pin threads on the local NUMA node; first-touch and interleave policies+ 7 more techniques+ 43 more primitives

Similar systems

Share the most building blocks with this one.