Skip to content

0.14.0

Choose a tag to compare

@williamthome williamthome released this 08 Nov 13:11
· 146 commits to main since this release
88f6046

Highlights

New

  • roadrunner_compress:buffered/3, stream_headers/2 and stream_deflate/1 give a handler or adapter that sends its response with roadrunner_send the same compression rules as the roadrunner_compress middleware, 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.compress takes 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, or compress => true in an upgrade's options, to keep accepting it as before (#479)
  • With ws.recv_buffer unset, a plain-TCP WebSocket session's read buffer now adapts between 8 KB and the listener's recv_buffer instead of always using the listener's. Set ws.recv_buffer to keep a fixed size (#477)

What's Changed

Full Changelog: 0.13.1...0.14.0