aboutsummaryrefslogtreecommitdiffstats
path: root/doc/src
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2025-02-07 16:57:58 +0100
committerLoïc Hoguin <[email protected]>2025-02-07 17:59:44 +0100
commit0f257d06b6a4b1170621af66e9b54addf4d8e954 (patch)
treeab74e9cdb5418f1a8b489c06bd84bed9087a7fd6 /doc/src
parentd3f6bda38bedfdfef911cd5ba715c19be9b0408e (diff)
downloadcowboy-0f257d06b6a4b1170621af66e9b54addf4d8e954.tar.gz
cowboy-0f257d06b6a4b1170621af66e9b54addf4d8e954.tar.bz2
cowboy-0f257d06b6a4b1170621af66e9b54addf4d8e954.zip
Add hibernate option to cowboy_http and cowboy_http2
When enabled the connection process will automatically hibernate. Because hibernation triggers GC, this can be used as a way to keep memory usage lower, at the cost of performance.
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/manual/cowboy_http.asciidoc7
-rw-r--r--doc/src/manual/cowboy_http2.asciidoc7
2 files changed, 12 insertions, 2 deletions
diff --git a/doc/src/manual/cowboy_http.asciidoc b/doc/src/manual/cowboy_http.asciidoc
index ccddc55..0640aa9 100644
--- a/doc/src/manual/cowboy_http.asciidoc
+++ b/doc/src/manual/cowboy_http.asciidoc
@@ -21,6 +21,7 @@ opts() :: #{
chunked => boolean(),
connection_type => worker | supervisor,
dynamic_buffer => false | {pos_integer(), pos_integer()},
+ hibernate => boolean(),
http10_keepalive => boolean(),
idle_timeout => timeout(),
inactivity_timeout => timeout(),
@@ -87,6 +88,10 @@ The dynamic buffer size functionality can be disabled by
setting this option to `false`. Cowboy will also disable
it by default when the `buffer` transport option is configured.
+hibernate (false)::
+
+Whether the connection process will hibernate automatically.
+
http10_keepalive (true)::
Whether keep-alive is enabled for HTTP/1.0 connections.
@@ -179,7 +184,7 @@ Ordered list of stream handlers that will handle all stream events.
== Changelog
* *2.13*: The `active_n` default value was changed to `1`.
-* *2.13*: The `dynamic_buffer` option was added.
+* *2.13*: The `dynamic_buffer` and `hibernate` options were added.
* *2.11*: The `reset_idle_timeout_on_send` option was added.
* *2.8*: The `active_n` option was added.
* *2.7*: The `initial_stream_flow_size` and `logger` options were added.
diff --git a/doc/src/manual/cowboy_http2.asciidoc b/doc/src/manual/cowboy_http2.asciidoc
index be48502..0dcfe2c 100644
--- a/doc/src/manual/cowboy_http2.asciidoc
+++ b/doc/src/manual/cowboy_http2.asciidoc
@@ -25,6 +25,7 @@ opts() :: #{
enable_connect_protocol => boolean(),
goaway_initial_timeout => timeout(),
goaway_complete_timeout => timeout(),
+ hibernate => boolean(),
idle_timeout => timeout(),
inactivity_timeout => timeout(),
initial_connection_window_size => 65535..16#7fffffff,
@@ -122,6 +123,10 @@ goaway_complete_timeout (3000)::
Time in ms to wait for ongoing streams to complete before closing the connection
during a graceful shutdown.
+hibernate (false)::
+
+Whether the connection process will hibernate automatically.
+
idle_timeout (60000)::
Time in ms with no data received before Cowboy closes the connection.
@@ -302,7 +307,7 @@ too many `WINDOW_UPDATE` frames.
== Changelog
* *2.13*: The `active_n` default value was changed to `1`.
-* *2.13*: The `dynamic_buffer` option was added.
+* *2.13*: The `dynamic_buffer` and `hibernate` options were added.
* *2.11*: Websocket over HTTP/2 is now considered stable.
* *2.11*: The `reset_idle_timeout_on_send` option was added.
* *2.11*: Add the option `max_cancel_stream_rate` to protect