|
Orbit Framework 2.0.0
A high-performance asynchronous C++20 HTTP server framework.
|
Orbit's README calls the framework fast. This page is the evidence, together with an honest account of what the numbers do and do not show.
benchmarks/run_benchmarks.sh measures Orbit against Drogon and Crow on the same workload, reproducibly (#19):
GET / with Hello, World! (13 bytes, text/plain) and GET /json with {"message":"Hello, World!"}, over HTTP/1.1 keep-alive on 127.0.0.1. Orbit's server is examples/benchmark_server.cpp; the others are in benchmarks/competitors/.DROGON_VERSION and CROW_VERSION in their Dockerfiles) and run with host networking; Orbit is built from the checkout in Release with sanitizers off. The output names every version.taskset and --cpuset-cpus), and every framework is given the same number of threads (SERVER_THREADS).epoll and io_uring, each with one event loop and with one per server thread (--event-loops).benchmarks/wrk_report.lua) that records requests per second and p50, p95 and p99 latency for each run.TRIALS measured runs per endpoint; the table shows the median, the slowest and fastest trial, and the median of each latency percentile.Requirements: Linux, wrk (or Docker plus WRK_IMAGE=williamyeh/wrk:4.0.2), Docker for Drogon and Crow, and Orbit's build dependencies.
Every setting (frameworks, Orbit configurations, duration, trials, connections, threads, CPU sets, port) is an environment variable, listed at the top of the script. Use a quiet, dedicated machine: on a laptop with other work running, the spread between trials is larger than the differences being measured. Fix the CPU frequency governor to performance where you can, and keep the defaults for anything you publish so the results stay comparable.
The same script also runs on a GitHub-hosted runner: Actions → Benchmarks → Run workflow (frameworks, trials and duration are inputs). The table lands in the run summary and as the benchmark-results artifact. A hosted runner is a shared 4-vCPU VM, so treat its figures as a reproducible sanity check with a wide spread, not as the published result.
benchmarks/probe.sh runs one Orbit server under consecutive wrk windows and reports, per window, what a median hides (#166):
| Column | How it is measured |
|---|---|
| req/s, p99 | wrk --latency for the window |
| RSS, threads | /proc/<pid>/status, /proc/<pid>/task after the window |
| ctx switches / req | voluntary + involuntary context switches of every server thread during the window, divided by the requests |
| allocations / req | heap allocations during the window divided by the requests; needs a server built with -DORBIT_BENCH_COUNT_ALLOCATIONS=ON, which counts operator new and serves the count at /__stats |
| syscalls / req | SYSCALLS=1: one extra window under strace -c -f (slow, but the count per request is exact) |
Settings (engine, event loops, threads, windows, window length, connections, CPU split, path, port) are environment variables listed at the top of the script; the table is written to probe-results.md. Falling throughput or growing memory across windows means something accumulates with load; the allocation, context-switch and syscall counts are the per-request budgets the performance work in #183 drives down.
Orbit currently does about 40% of the throughput of Drogon and Crow on this workload — roughly 106k requests per second against 254k (Drogon) and 239k (Crow) for plaintext. The gap and the leads for closing it are tracked in #163.
Run on 2026-10-08 with the script's default settings; the full output, including the exact reproduce command, is in `benchmark-results/2026-10-08-ryzen-5500u.md`.
| Machine | Laptop, AMD Ryzen 5 5500U (6 cores, 12 threads), on AC power, performance governor |
| CPU split | server on CPUs 0-5, wrk on CPUs 6-11 (separate physical cores) |
| Kernel / compiler | Linux 7.2.8, GCC 16.2.1 (Orbit built in Release, sanitizers off) |
| Load | wrk 4.0.2 (Docker, host network), 4 threads, 128 keep-alive connections |
| Server threads | 6 for every framework |
| Trials | 5 × 15 s per endpoint after a 5 s warm-up; the table shows the median trial |
| Server | GET / req/s | GET /json req/s | p50 / p99 (/) |
|---|---|---|---|
| Drogon v1.9.13 | 254,296 | 195,676 | 0.41 / 1.07 ms |
| Crow v1.3.5 | 239,132 | 223,134 | 0.53 / 0.62 ms |
| Orbit v2.0.0 — io_uring, 6 event loops | 105,878 | 91,295 | 1.17 / 2.27 ms |
| Orbit v2.0.0 — epoll, 6 event loops | 104,639 | 94,922 | 0.98 / 5.34 ms |
| Orbit v2.0.0 — io_uring, 1 event loop | 69,043 | 64,327 | 1.83 / 2.59 ms |
| Orbit v2.0.0 — epoll, 1 event loop | 50,183 | 47,050 | 2.54 / 2.77 ms |
No errors in any run. The spread between the slowest and fastest trial was under 5% in every row except Orbit on epoll with 6 event loops (/: 101k – 124k).
What the run shows about Orbit:
--event-loops equal to the thread count doubles epoll throughput and gives io_uring 1.5×; with one loop, io_uring is clearly ahead of epoll.A laptop with the load generator on the same machine is not an ideal benchmark host; a dedicated server would narrow the spread. The ranking here is not close, though, and the run is reproducible with the command in the full output.
Read the caveats before quoting any figure.
Results that show Orbit losing on some workload are as welcome as results that show it winning: a framework that publishes its weak spots is more useful than one that publishes only wins. If Orbit loses somewhere, please open an issue with the output.