| 1 |
[appendix] |
| 2 |
== Migrating from Cowboy 2.13 to 2.14 |
| 3 |
|
| 4 |
Cowboy 2.14 adds experimental support for HTTP/3 |
| 5 |
WebTransport based on the most recent draft. It |
| 6 |
also has a new data delivery mechanism for HTTP/2 |
| 7 |
and HTTP/3 Websocket, providing better performance. |
| 8 |
|
| 9 |
Cowboy 2.14 requires Erlang/OTP 24.0 or greater. |
| 10 |
|
| 11 |
=== Features added |
| 12 |
|
| 13 |
* The `relay` data delivery mechanism has been |
| 14 |
added to HTTP/2 and HTTP/3 protocols. Using |
| 15 |
this mechanism lets the Websocket protocol |
| 16 |
bypass stream handlers to forward data from |
| 17 |
the connection process to the Websocket |
| 18 |
session process, as well as better manage |
| 19 |
HTTP/2's flow control. This results in a |
| 20 |
noticeable performance improvement. This |
| 21 |
new mechanism can be used by all sub-protocols |
| 22 |
built on top of HTTP/2 or HTTP/3 such as |
| 23 |
Websocket or the upcoming HTTP/2 WebTransport. |
| 24 |
|
| 25 |
* The `last_modified` callback of REST handlers |
| 26 |
now accepts `undefined` as a return value to |
| 27 |
allow conditionally providing a timestamp. |
| 28 |
|
| 29 |
=== Experimental features added |
| 30 |
|
| 31 |
* Experimental support for HTTP/3 WebTransport |
| 32 |
has been added, based on the most recent RFC |
| 33 |
drafts. The implementation should also be |
| 34 |
compatible with earlier drafts that are |
| 35 |
currently in use by some browsers. Both |
| 36 |
HTTP/3 and HTTP/3 WebTransport are disabled |
| 37 |
by default; to enable, the environment |
| 38 |
variable COWBOY_QUICER must be set at |
| 39 |
compile-time, and a number of options must |
| 40 |
be provided at run time, including |
| 41 |
`enable_connect_protocol`, `h3_datagram`, |
| 42 |
`wt_max_sessions` and for earlier drafts |
| 43 |
`enable_webtransport`. The test suite is |
| 44 |
the best place to get started at this time. |
| 45 |
|
| 46 |
=== Optimisation-related changes |
| 47 |
|
| 48 |
* The `dynamic_buffer` option introduced in |
| 49 |
the previous release has been tweaked to |
| 50 |
start at 512 bytes and have its value |
| 51 |
changed less abruptly. This is based on |
| 52 |
additional work done implementing the same |
| 53 |
feature in RabbitMQ. |
| 54 |
|
| 55 |
* The static file handler will now use `raw` |
| 56 |
mode to read file information to avoid a |
| 57 |
bottleneck when querying the file server. |
| 58 |
|
| 59 |
=== Bugs fixed |
| 60 |
|
| 61 |
* It was possible for Websocket to fail to |
| 62 |
enable active mode again after it had been |
| 63 |
disabled. This has been fixed. |