Repository navigation
0.14.0
Highlights
New
roadrunner_compress:buffered/3,stream_headers/2andstream_deflate/1give a handler or adapter that sends its response withroadrunner_sendthe same compression rules as theroadrunner_compressmiddleware, for whole and chunked bodies (#481)
Less memory per WebSocket connection
- WebSocket compression (permessage-deflate) is off by default. Every browser offers it, and a compressed connection held about 285 KB of zlib state for its lifetime (#479)
ws.compresstakes a map of zlib settings (server_window_bits,client_window_bits,mem_level) for when compression is on:#{server_window_bits => 12, client_window_bits => 12, mem_level => 4}holds about 50 KB instead of about 285 KB, at a lower ratio on traffic that repeats content more than 4 KB back (#479)- A plain-TCP WebSocket session reads with an 8 KB buffer and grows it only for a large frame, then goes back after a small message: an idle connection holds 47 KB instead of 81 KB, with the same throughput (#477)
Sturdier
- A permessage-deflate offer asking for an 8-bit server window is declined instead of ending the session: zlib cannot deflate with that window, and the server may not use a larger one (#478)
Upgrading from 0.13
- WebSocket compression is off by default. Set
ws => #{compress => true}on the listener, orcompress => truein an upgrade's options, to keep accepting it as before (#479) - With
ws.recv_bufferunset, a plain-TCP WebSocket session's read buffer now adapts between 8 KB and the listener'srecv_bufferinstead of always using the listener's. Setws.recv_bufferto keep a fixed size (#477)
What's Changed
- Adapt the WebSocket read buffer to the frames a session receives by @williamthome in #477
- Decline a permessage-deflate offer for an 8-bit server window by @williamthome in #478
- Retry the h3spec download on transient server errors by @williamthome in #480
- Make WebSocket compression opt-in with configurable zlib settings by @williamthome in #479
- Expose the compression rules for responses sent with roadrunner_send by @williamthome in #481
- Correct the comment on how deflate_message fails by @williamthome in #483
- Update rebar.config deps by @renovate[bot] in #476
Full Changelog: 0.13.1...0.14.0