0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 12:20:24 +00:00

Document the new WINDOW_UPDATE related options

This commit is contained in:
Loïc Hoguin 2019-09-02 17:38:26 +02:00
parent eb4735ef7a
commit f01df8d01e
No known key found for this signature in database
GPG key ID: 8A9DF795F6FED764

View file

@ -18,21 +18,27 @@ as a Ranch protocol.
---- ----
opts() :: #{ opts() :: #{
connection_type => worker | supervisor, connection_type => worker | supervisor,
connection_window_margin_size => 0..16#7fffffff,
connection_window_update_threshold => 0..16#7fffffff,
enable_connect_protocol => boolean(), enable_connect_protocol => boolean(),
idle_timeout => timeout(), idle_timeout => timeout(),
inactivity_timeout => timeout(), inactivity_timeout => timeout(),
initial_connection_window_size => 65535..16#7fffffff, initial_connection_window_size => 65535..16#7fffffff,
initial_stream_window_size => 0..16#7fffffff, initial_stream_window_size => 0..16#7fffffff,
max_concurrent_streams => non_neg_integer() | infinity, max_concurrent_streams => non_neg_integer() | infinity,
max_connection_window_size => 0..16#7fffffff,
max_decode_table_size => non_neg_integer(), max_decode_table_size => non_neg_integer(),
max_encode_table_size => non_neg_integer(), max_encode_table_size => non_neg_integer(),
max_frame_size_received => 16384..16777215, max_frame_size_received => 16384..16777215,
max_frame_size_sent => 16384..16777215 | infinity, max_frame_size_sent => 16384..16777215 | infinity,
max_stream_window_size => 0..16#7fffffff,
preface_timeout => timeout(), preface_timeout => timeout(),
proxy_header => boolean(), proxy_header => boolean(),
sendfile => boolean(), sendfile => boolean(),
settings_timeout => timeout(), settings_timeout => timeout(),
stream_handlers => [module()] stream_handlers => [module()],
stream_window_margin_size => 0..16#7fffffff,
stream_window_update_threshold => 0..16#7fffffff
} }
---- ----
@ -51,6 +57,19 @@ connection_type (supervisor)::
Whether the connection process also acts as a supervisor. Whether the connection process also acts as a supervisor.
connection_window_margin_size (65535)::
Extra amount to be added to the window size when
updating the connection window. This is used to
ensure that there is always some space available in
the window.
connection_window_update_threshold (163840)::
The connection window will only get updated when its size
becomes lower than this threshold. This is to avoid sending
too many `WINDOW_UPDATE` frames.
enable_connect_protocol (false):: enable_connect_protocol (false)::
Whether to enable the extended CONNECT method to allow Whether to enable the extended CONNECT method to allow
@ -84,6 +103,12 @@ max_concurrent_streams (infinity)::
Maximum number of concurrent streams allowed on the connection. Maximum number of concurrent streams allowed on the connection.
max_connection_window_size (16#7fffffff)::
Maximum connection window size. This is used as an upper bound
when calculating the window size, either when reading the request
body or receiving said body.
max_decode_table_size (4096):: max_decode_table_size (4096)::
Maximum header table size used by the decoder. This is the value advertised Maximum header table size used by the decoder. This is the value advertised
@ -111,6 +136,12 @@ following the client's advertised maximum.
Note that actual frame sizes may be lower than the limit when Note that actual frame sizes may be lower than the limit when
there is not enough space left in the flow control window. there is not enough space left in the flow control window.
max_stream_window_size (16#7fffffff)::
Maximum stream window size. This is used as an upper bound
when calculating the window size, either when reading the request
body or receiving said body.
preface_timeout (5000):: preface_timeout (5000)::
Time in ms Cowboy is willing to wait for the connection preface. Time in ms Cowboy is willing to wait for the connection preface.
@ -135,8 +166,27 @@ stream_handlers ([cowboy_stream_h])::
Ordered list of stream handlers that will handle all stream events. Ordered list of stream handlers that will handle all stream events.
stream_window_margin_size (65535)::
Extra amount to be added to the window size when
updating a stream's window. This is used to
ensure that there is always some space available in
the window.
stream_window_update_threshold (163840)::
A stream's window will only get updated when its size
becomes lower than this threshold. This is to avoid sending
too many `WINDOW_UPDATE` frames.
== Changelog == Changelog
* *2.7*: Add the options `connection_window_margin_size`,
`connection_window_update_threshold`,
`max_connection_window_size`, `max_stream_window_size`,
`stream_window_margin_size` and
`stream_window_update_threshold` to configure
behavior on sending WINDOW_UPDATE frames.
* *2.6*: The `proxy_header` and `sendfile` options were added. * *2.6*: The `proxy_header` and `sendfile` options were added.
* *2.4*: Add the options `initial_connection_window_size`, * *2.4*: Add the options `initial_connection_window_size`,
`initial_stream_window_size`, `max_concurrent_streams`, `initial_stream_window_size`, `max_concurrent_streams`,