summaryrefslogtreecommitdiffstats
path: root/docs/en/cowboy/2.10/guide/performance.asciidoc
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2023-04-28 13:34:22 +0200
committerLoïc Hoguin <[email protected]>2023-04-28 13:34:22 +0200
commitd7580dbfdbdcf3ecf085479b6550284a47745138 (patch)
tree18ba5b3283ad3dc9d9f41898401b103a81641c04 /docs/en/cowboy/2.10/guide/performance.asciidoc
parentc150ffb220c15f10076b86fb2776a782a4d098ae (diff)
downloadninenines.eu-d7580dbfdbdcf3ecf085479b6550284a47745138.tar.gz
ninenines.eu-d7580dbfdbdcf3ecf085479b6550284a47745138.tar.bz2
ninenines.eu-d7580dbfdbdcf3ecf085479b6550284a47745138.zip
Cowboy 2.10.0
Diffstat (limited to 'docs/en/cowboy/2.10/guide/performance.asciidoc')
-rw-r--r--docs/en/cowboy/2.10/guide/performance.asciidoc29
1 files changed, 29 insertions, 0 deletions
diff --git a/docs/en/cowboy/2.10/guide/performance.asciidoc b/docs/en/cowboy/2.10/guide/performance.asciidoc
new file mode 100644
index 00000000..10031302
--- /dev/null
+++ b/docs/en/cowboy/2.10/guide/performance.asciidoc
@@ -0,0 +1,29 @@
+[[performance]]
+== Performance
+
+This chapter describes the performance characteristics
+of Cowboy and offers suggestions to get the most
+performance out of your application.
+
+=== One process per connection
+
+The first version of Cowboy featured a single process
+per connection, whereas the current version of Cowboy
+features one process per connection plus one process
+per request. This has a negative impact on performance,
+but is necessary in order to provide a common interface
+for both HTTP/1.1 and HTTP/2 (as well as future HTTP
+versions).
+
+It is still possible to use a single process per
+connection, and avoid the creation of additional
+processes for each request, by implementing a
+stream handler to process the requests. This can
+be done for all requests, or just for a single
+endpoint depending on the application's needs.
+
+Stream handlers provide an asynchronous interface
+and must not block, so the implementation will
+be very different from normal Cowboy handlers,
+but the performance gains are important enough
+to justify it in some cases.