Cowboy 2.13 focuses on improving the performance of Websocket, as well as the HTTP protocols. It also contains a variety of new features and bug fixes. In addition, Cowboy 2.13 is the first Cowboy version that contains the experimental HTTP/3 support.
Cowboy 2.13 requires Erlang/OTP 24.0 or greater.
dynamic_buffer
has been added. When enabled, Cowboy will dynamically change the buffer
socket option based on how much data it receives. It will start at 1024 bytes and go up to 131072 bytes by default. This applies to HTTP/1.1, HTTP/2 and Websocket. The performance gains are very important depending on the scenario.
hibernate
option. When set the connection process will automatically hibernate to reduce memory usage at a small performance cost.
protocols
and alpn_default_protocol
protocol options have been added to control exactly which HTTP protocols are allowed over clear and TLS listeners.
max_frame_size
option can now be set dynamically via the set_options
command. This allows configuring a smaller max size and increase it after authentication or other checks.
cowboy_req:set_resp_headers
now accept lists of headers. This can be used to simplify passing headers coming from client applications such as Gun. Note that the set-cookie header cannot be provided using this function.
cowboy_rest
now always sets the allow header.
inactivity_timeout
option is now deprecated for all protocols. It is de facto ignored when hibernate
is enabled.
idle_timeout
timer has been changed for HTTP/2 and Websocket. Cowboy used to reset the timer on every data packet received from the socket. Now Cowboy will check periodically whether new data was received in the interval.
cowboy_req:filter_cookies
could miss valid cookies. It has been corrected.
client_max_window_bits
, as otherwise decompression errors will occur.
max_frame_size
both to compressed frames as well as the uncompressed payload. Cowboy will stop decompressing when the limit is reached.
exit/2
).
content_types_provided
could result in an atom sent to the socket, leading to a cryptic error message. The invalid value will now result in a better error message.
Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:
Recurring payment options are also available via GitHub Sponsors. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.