Roadrunner - Pure-Erlang HTTP and WebSocket server

This is great to see. A few random questions if you have the time to respond:

  1. How does the server handle http2 streams that have exceeded their flow-control window on a connection where other streams are well behaved?
  2. Do you have an eta for 1.0.0?
  3. Do you plan to develop a plug adapter for it?

Thanks for roadrunner!

1 Like

Hey @ausimian! Sure!

Each stream has its own window, and the connection has one shared window. Roadrunner looks at the connection window first. If a stream goes over only its own window, just that stream is stopped, and the connection and the other streams keep running. The whole connection is closed only when the data goes over the shared connection window. So one bad stream does not hurt a good connection. The window sizes are listener options too (conn_window and stream_window under http2), see docs/resource_limits.md.

No date yet. The core works well and is well tested, but I want to be sure the API won’t change much before I call it 1.0.

No plans for a Plug adapter right now. My focus is Erlang for now. Maybe later if there’s interest. Not easy to balance life + OSS :slight_smile:

Welcome!

1 Like

Roadrunner is now on HttpArena!

HttpArena is a community-run benchmark for HTTP servers across many protocols and workloads (HTTP/1.1, HTTP/2, HTTP/3, gRPC, WebSocket). It is an open replacement for the TechEmpower Framework Benchmarks, which were archived a few months ago.

It would be really nice to see more BEAM servers there too, so we can compare across the ecosystem.

1 Like

roadrunner 0.11.0 is out on Hex o/

A lot has landed since 0.5, so here are the highlights. Most of the work went into following the specs closely and going faster.

Conformance

  • HTTP/3 runs on roadrunner’s own pure-Erlang QUIC stack, and roadrunner now has zero dependencies
  • 100% h3spec in CI, next to h2spec and Autobahn, which are still at 100%
  • CI runs HTTP/3 interop against the quiche and ngtcp2 clients and headless Chrome, with and without packet loss
  • HTTP/1.1 is listed on Http11Probe, with much stricter request parsing on all three versions
  • QUIC grew connection migration, key updates, stateless resets, more TLS cipher suites and the QPACK dynamic table

Faster

  • A broad pass over the hot paths: one-pass HTTP/1.1 parsing, header checks 7 bytes at a time, a routing tree, and faster HPACK and QPACK decoding
  • HTTP/3 uses about 22% less server CPU for small requests and 30% less for large downloads
  • HTTP/2 uploads: 10 MB over a 100 ms round trip went from 24.6 s to under 2 s
  • A listener answers its first request in about 24 ms instead of 38 ms

New

  • Built-in middleware: security headers, CORS, ETags, per-peer rate limits and PROXY protocol
  • Real client IP behind trusted proxies, per-route limits, and load shedding or queueing when the server is busy
  • A guide for coming from Cowboy

One upgrade step for 0.11: events now go to a pluggable event_handler, and nothing is emitted by default. Thanks @zabrane for asking for a way to turn telemetry off! To keep your telemetry events, add roadrunner_telemetry:

{deps, [{roadrunner, "~> 0.11"}, {roadrunner_telemetry, "~> 0.1"}]}.
%% sys.config
[{roadrunner, [{event_handler, roadrunner_telemetry}]}].

Each release on GitHub has the full notes and upgrade list.

Feedback and bug reports are always welcome o/

2 Likes