summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2020-06-25 13:32:01 +0200
committerLoïc Hoguin <[email protected]>2020-06-25 13:32:01 +0200
commite7feea1ec8a65311f9da998605031df77e5d26ea (patch)
treecda16ab7e1626f6d2d8819583cdc27e87247d292
parent849fab7227a2fd1ff5fa4d603ba89037e1c462b4 (diff)
downloadninenines.eu-e7feea1ec8a65311f9da998605031df77e5d26ea.tar.gz
ninenines.eu-e7feea1ec8a65311f9da998605031df77e5d26ea.tar.bz2
ninenines.eu-e7feea1ec8a65311f9da998605031df77e5d26ea.zip
Ranch 2.0
-rw-r--r--_build/content/articles/ranch-2.0.0.asciidoc75
-rw-r--r--articles/asciideck/index.html4
-rw-r--r--articles/cowboy-2.0.0-pre.4/index.html4
-rw-r--r--articles/cowboy-2.0.0-rc.1/index.html4
-rw-r--r--articles/cowboy-2.0.0-rc.2/index.html4
-rw-r--r--articles/cowboy-2.0.0/index.html4
-rw-r--r--articles/cowboy-2.1.0/index.html4
-rw-r--r--articles/cowboy-2.2.0/index.html4
-rw-r--r--articles/cowboy-2.3.0/index.html4
-rw-r--r--articles/cowboy-2.4.0/index.html4
-rw-r--r--articles/cowboy-2.5.0/index.html4
-rw-r--r--articles/cowboy-2.6.0/index.html4
-rw-r--r--articles/cowboy-2.7.0/index.html4
-rw-r--r--articles/cowboy-2.8.0/index.html4
-rw-r--r--articles/cowboy2-qs/index.html4
-rw-r--r--articles/dont-let-it-crash/index.html4
-rw-r--r--articles/erlang-meetup-10-septembre-2019/index.html4
-rw-r--r--articles/erlang-scalability/index.html4
-rw-r--r--articles/erlang-validate-utf8/index.html4
-rw-r--r--articles/erlang.mk-and-relx/index.html4
-rw-r--r--articles/erlanger-playbook-september-2015-update/index.html4
-rw-r--r--articles/erlanger-playbook/index.html4
-rw-r--r--articles/farwest-funded/index.html4
-rw-r--r--articles/github-sponsors/index.html4
-rw-r--r--articles/gun-1.0.0-rc.1/index.html4
-rw-r--r--articles/gun-1.0.0/index.html4
-rw-r--r--articles/gun-1.2.0/index.html4
-rw-r--r--articles/gun-1.3.0/index.html4
-rw-r--r--articles/gun-2.0.0-pre.1/index.html4
-rw-r--r--articles/gun-2.0.0-pre.2/index.html4
-rw-r--r--articles/index.html37
-rw-r--r--articles/index.xml13
-rw-r--r--articles/january-2014-status/index.html4
-rw-r--r--articles/joe_the_rubber_duck/index.html4
-rw-r--r--articles/merry-christmas-2018/index.html4
-rw-r--r--articles/merry-christmas-2019/index.html4
-rw-r--r--articles/ml-archives/index.html4
-rw-r--r--articles/on-open-source/index.html4
-rw-r--r--articles/page/2/index.html37
-rw-r--r--articles/page/3/index.html18
-rw-r--r--articles/ranch-1.3/index.html4
-rw-r--r--articles/ranch-1.6.0/index.html4
-rw-r--r--articles/ranch-1.7.0/index.html4
-rw-r--r--articles/ranch-2.0.0-rc.1/index.html4
-rw-r--r--articles/ranch-2.0.0/index.html337
-rw-r--r--articles/ranch-ftp/index.html4
-rw-r--r--articles/the-elephant-in-the-room/index.html4
-rw-r--r--articles/the-gateway-trilogy/index.html4
-rw-r--r--articles/the-story-so-far/index.html4
-rw-r--r--articles/tictactoe/index.html4
-rw-r--r--articles/website-update/index.html4
-rw-r--r--articles/xerl-0.1-empty-modules/index.html4
-rw-r--r--articles/xerl-0.2-two-modules/index.html4
-rw-r--r--articles/xerl-0.3-atomic-expressions/index.html4
-rw-r--r--articles/xerl-0.4-expression-separator/index.html4
-rw-r--r--articles/xerl-0.5-intermediate-module/index.html4
-rw-r--r--docs/en/ranch/2.0/guide/migrating_from_1.7.asciidoc26
-rw-r--r--docs/en/ranch/2.0/guide/migrating_from_1.7/index.html12
-rw-r--r--docs/en/ranch/2.0/guide/protocols.asciidoc2
-rw-r--r--docs/en/ranch/2.0/guide/protocols/index.html2
-rw-r--r--docs/index.xml2
-rw-r--r--donate/index.html2
-rw-r--r--index.html2
-rw-r--r--index.xml13
-rw-r--r--services/index.html2
-rw-r--r--sitemap.xml7
66 files changed, 734 insertions, 53 deletions
diff --git a/_build/content/articles/ranch-2.0.0.asciidoc b/_build/content/articles/ranch-2.0.0.asciidoc
new file mode 100644
index 00000000..82a0e168
--- /dev/null
+++ b/_build/content/articles/ranch-2.0.0.asciidoc
@@ -0,0 +1,75 @@
++++
+date = "2020-06-25T07:00:00+01:00"
+title = "Ranch 2.0"
+
++++
+
+Ranch `2.0.0` has been released!
+
+In Ranch 1.x, there is only one supervisor per Ranch listener
+to start and manage connection processes. Under high load
+(many clients rapidly connecting and/or disconnecting), the
+message queue of this one supervisor could become congested,
+leading to declining accept rates or a stalled listener.
+
+Ranch 2.0 introduces the `num_conns_sups` option (defaulting
+to the number of acceptors), which allows the message load to
+be divided between the specified number of connection supervisors.
+This improves accept concurrency at the same time.
+
+Another bottleneck is a possible congestion of the syn queue of
+a listening socket. The reason is located within the operating
+system's TCP/IP implementation, and on Linux the `SO_REUSEPORT`
+socket option was introduced to address it. What it boils down
+to is that you can have more than one socket listening on
+the same port, causing the sockets to be "load-balanced" when
+accepting connections.
+
+Ranch 2.0 introduces the `num_listen_sockets` option, which allows
+to specify the number of listening sockets a Ranch listener should
+employ. Whether you can use `SO_REUSEPORT` at all and how to enable
+it depends on your operating system, though.
+
+Other changes include proper support for local (Unix Domain) sockets,
+removing the restriction that a listener be suspended to change its
+transport options and much needed improvements to embedded listeners.
+
+In addition we have had patches merged to Erlang/OTP to add support
+for active N to the `ssl` application (requires Erlang/OTP 21.3 or
+above) and fix a number of smaller issues we encountered. We have
+also helped detect and fix a bug in the Windows implementation of
+active N that greatly reduced its performance in some cases.
+
+To ensure that everything works correctly, new tests have been
+written, and some existing tests were updated. Ranch is now tested
+against https://github.com/juhlig/stampede[Stampede], a resilience
+testing tool that kills random processes and ports in the system;
+and against https://concuerror.com/[Concuerror], a model checking
+tool for debugging, testing and verifying concurrrent Erlang programs.
+
+Starting from Ranch 2.0 onward, a `.appup` file is provided and
+release upgrades are tested and supported. The current plan is
+to test upgrades from one version to the next.
+
+We are now providing a
+https://github.com/juhlig/prometheus_ranch[Prometheus collector]
+as a separate project as well as a
+https://github.com/juhlig/prometheus_ranch/blob/master/dashboards/ranch-dashboard.json[Grafana dashboard].
+
+Huge thanks to Jan Uhlig for working on many of the changes
+and improvements that went into this release.
+
+Ranch 2.0 requires Erlang/OTP 21 or above and is tested and supported
+on Linux, FreeBSD, macOS and Windows.
+
+A complete list of changes can be found in the migration guide:
+https://ninenines.eu/docs/en/ranch/2.0/guide/migrating_from_1.7/[Migrating from Ranch 1.7 to 2.0].
+
+You can donate to this project via
+https://github.com/sponsors/essen[GitHub Sponsors].
+These funds are used to pay for additional servers for
+testing. We will soon add two Raspberry Pi 4 in order
+to have some ARM targets when testing.
+
+As usual, feedback is appreciated, and issues or
+questions should be sent via Github tickets. Thanks!
diff --git a/articles/asciideck/index.html b/articles/asciideck/index.html
index 4dc4ac4e..26c5a80a 100644
--- a/articles/asciideck/index.html
+++ b/articles/asciideck/index.html
@@ -110,6 +110,10 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/cowboy-2.0.0-pre.4/index.html b/articles/cowboy-2.0.0-pre.4/index.html
index d79a3b7a..41d714b9 100644
--- a/articles/cowboy-2.0.0-pre.4/index.html
+++ b/articles/cowboy-2.0.0-pre.4/index.html
@@ -129,6 +129,10 @@
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/cowboy-2.0.0-rc.1/index.html b/articles/cowboy-2.0.0-rc.1/index.html
index 36931078..e550ce0e 100644
--- a/articles/cowboy-2.0.0-rc.1/index.html
+++ b/articles/cowboy-2.0.0-rc.1/index.html
@@ -100,6 +100,10 @@
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/cowboy-2.0.0-rc.2/index.html b/articles/cowboy-2.0.0-rc.2/index.html
index 13764c04..bfbbfe72 100644
--- a/articles/cowboy-2.0.0-rc.2/index.html
+++ b/articles/cowboy-2.0.0-rc.2/index.html
@@ -93,6 +93,10 @@
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/cowboy-2.0.0/index.html b/articles/cowboy-2.0.0/index.html
index 510180b4..31945557 100644
--- a/articles/cowboy-2.0.0/index.html
+++ b/articles/cowboy-2.0.0/index.html
@@ -99,6 +99,10 @@
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/cowboy-2.1.0/index.html b/articles/cowboy-2.1.0/index.html
index 6c164128..2f438c3c 100644
--- a/articles/cowboy-2.1.0/index.html
+++ b/articles/cowboy-2.1.0/index.html
@@ -96,6 +96,10 @@
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/cowboy-2.2.0/index.html b/articles/cowboy-2.2.0/index.html
index 1f8778c1..b3353c5b 100644
--- a/articles/cowboy-2.2.0/index.html
+++ b/articles/cowboy-2.2.0/index.html
@@ -94,6 +94,10 @@
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/cowboy-2.3.0/index.html b/articles/cowboy-2.3.0/index.html
index b61243bd..01df5155 100644
--- a/articles/cowboy-2.3.0/index.html
+++ b/articles/cowboy-2.3.0/index.html
@@ -86,6 +86,10 @@
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/cowboy-2.4.0/index.html b/articles/cowboy-2.4.0/index.html
index 999e2123..5999245a 100644
--- a/articles/cowboy-2.4.0/index.html
+++ b/articles/cowboy-2.4.0/index.html
@@ -88,6 +88,10 @@
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/cowboy-2.5.0/index.html b/articles/cowboy-2.5.0/index.html
index fb83341c..1b5b9cdb 100644
--- a/articles/cowboy-2.5.0/index.html
+++ b/articles/cowboy-2.5.0/index.html
@@ -92,6 +92,10 @@
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/cowboy-2.6.0/index.html b/articles/cowboy-2.6.0/index.html
index 7cf71e62..b01aad56 100644
--- a/articles/cowboy-2.6.0/index.html
+++ b/articles/cowboy-2.6.0/index.html
@@ -89,6 +89,10 @@
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/cowboy-2.7.0/index.html b/articles/cowboy-2.7.0/index.html
index eae3d3ec..152fae14 100644
--- a/articles/cowboy-2.7.0/index.html
+++ b/articles/cowboy-2.7.0/index.html
@@ -90,6 +90,10 @@
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/cowboy-2.8.0/index.html b/articles/cowboy-2.8.0/index.html
index a20de8a6..88aa525f 100644
--- a/articles/cowboy-2.8.0/index.html
+++ b/articles/cowboy-2.8.0/index.html
@@ -89,6 +89,10 @@
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/cowboy2-qs/index.html b/articles/cowboy2-qs/index.html
index ab3b67e0..53601718 100644
--- a/articles/cowboy2-qs/index.html
+++ b/articles/cowboy2-qs/index.html
@@ -130,6 +130,10 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/dont-let-it-crash/index.html b/articles/dont-let-it-crash/index.html
index 79da035c..d70fdad3 100644
--- a/articles/dont-let-it-crash/index.html
+++ b/articles/dont-let-it-crash/index.html
@@ -105,6 +105,10 @@
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/erlang-meetup-10-septembre-2019/index.html b/articles/erlang-meetup-10-septembre-2019/index.html
index 64b2c044..9efcbc02 100644
--- a/articles/erlang-meetup-10-septembre-2019/index.html
+++ b/articles/erlang-meetup-10-septembre-2019/index.html
@@ -85,6 +85,10 @@
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/erlang-scalability/index.html b/articles/erlang-scalability/index.html
index 8536fa5d..6f1a3ac9 100644
--- a/articles/erlang-scalability/index.html
+++ b/articles/erlang-scalability/index.html
@@ -117,6 +117,10 @@
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/erlang-validate-utf8/index.html b/articles/erlang-validate-utf8/index.html
index e1c95bf6..2f792e29 100644
--- a/articles/erlang-validate-utf8/index.html
+++ b/articles/erlang-validate-utf8/index.html
@@ -233,6 +233,10 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/erlang.mk-and-relx/index.html b/articles/erlang.mk-and-relx/index.html
index e5db5d72..f3837134 100644
--- a/articles/erlang.mk-and-relx/index.html
+++ b/articles/erlang.mk-and-relx/index.html
@@ -119,6 +119,10 @@ cowboy-0.8.5 erlydtl-0.7.0 ninenines-0.2.0 stdlib-1.19.1</pre></div></div>
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/erlanger-playbook-september-2015-update/index.html b/articles/erlanger-playbook-september-2015-update/index.html
index 70df4974..a1bf7a9d 100644
--- a/articles/erlanger-playbook-september-2015-update/index.html
+++ b/articles/erlanger-playbook-september-2015-update/index.html
@@ -88,6 +88,10 @@
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/erlanger-playbook/index.html b/articles/erlanger-playbook/index.html
index 5df01232..9d8393de 100644
--- a/articles/erlanger-playbook/index.html
+++ b/articles/erlanger-playbook/index.html
@@ -129,6 +129,10 @@
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/farwest-funded/index.html b/articles/farwest-funded/index.html
index ba23ed62..0901e970 100644
--- a/articles/farwest-funded/index.html
+++ b/articles/farwest-funded/index.html
@@ -89,6 +89,10 @@
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/github-sponsors/index.html b/articles/github-sponsors/index.html
index 57f24290..395e222e 100644
--- a/articles/github-sponsors/index.html
+++ b/articles/github-sponsors/index.html
@@ -86,6 +86,10 @@
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/gun-1.0.0-rc.1/index.html b/articles/gun-1.0.0-rc.1/index.html
index 3322d345..76f03e3f 100644
--- a/articles/gun-1.0.0-rc.1/index.html
+++ b/articles/gun-1.0.0-rc.1/index.html
@@ -90,6 +90,10 @@
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/gun-1.0.0/index.html b/articles/gun-1.0.0/index.html
index f894a1c2..580a3044 100644
--- a/articles/gun-1.0.0/index.html
+++ b/articles/gun-1.0.0/index.html
@@ -89,6 +89,10 @@
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/gun-1.2.0/index.html b/articles/gun-1.2.0/index.html
index 5faa7b9f..266f616c 100644
--- a/articles/gun-1.2.0/index.html
+++ b/articles/gun-1.2.0/index.html
@@ -89,6 +89,10 @@
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/gun-1.3.0/index.html b/articles/gun-1.3.0/index.html
index b06b00a3..59eaf31c 100644
--- a/articles/gun-1.3.0/index.html
+++ b/articles/gun-1.3.0/index.html
@@ -87,6 +87,10 @@
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/gun-2.0.0-pre.1/index.html b/articles/gun-2.0.0-pre.1/index.html
index dc7be72e..f8466905 100644
--- a/articles/gun-2.0.0-pre.1/index.html
+++ b/articles/gun-2.0.0-pre.1/index.html
@@ -94,6 +94,10 @@
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/gun-2.0.0-pre.2/index.html b/articles/gun-2.0.0-pre.2/index.html
index bd48557a..0546446d 100644
--- a/articles/gun-2.0.0-pre.2/index.html
+++ b/articles/gun-2.0.0-pre.2/index.html
@@ -92,6 +92,10 @@
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/index.html b/articles/index.html
index a4c79ed0..91e03d29 100644
--- a/articles/index.html
+++ b/articles/index.html
@@ -67,6 +67,24 @@
<article class="blog_item">
<header>
+ <h2><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></h2>
+ <p class="date">
+ <span class="year">2020</span>
+ <span class="day-month">25 Jun</span>
+ </p>
+ </header>
+
+ <p>Ranch 2.0.0 has been released!
+In Ranch 1.x, there is only one supervisor per Ranch listener to start and manage connection processes. Under high load (many clients rapidly connecting and/or disconnecting), the message queue of this one supervisor could become congested, leading to declining accept rates or a stalled listener.
+Ranch 2.0 introduces the num_conns_sups option (defaulting to the number of acceptors), which allows the message load to be divided between the specified number of connection supervisors.</p>
+
+ <p style="text-align:right">
+ <a class="read_more" href="https://ninenines.eu/articles/ranch-2.0.0/">Read More</a>
+ </p>
+ </article>
+
+ <article class="blog_item">
+ <header>
<h2><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></h2>
<p class="date">
<span class="year">2020</span>
@@ -414,25 +432,6 @@ The Asciideck parser returns an AST for the document. That AST can be further ma
</p>
</article>
- <article class="blog_item">
- <header>
- <h2><a href="https://ninenines.eu/articles/gun-1.0.0-rc.1/">Gun 1.0 release candidate 1</a></h2>
- <p class="date">
- <span class="year">2018</span>
- <span class="day-month">04 Jun</span>
- </p>
- </header>
-
- <p>Gun 1.0.0-rc.1 has been released!
-Gun is an HTTP/1.1, HTTP/2 and Websocket client for Erlang/OTP.
-Gun provides an asynchronous interface and will keep the connection open to the server, reconnecting as necessary.
-Gun has existed for many years as the test client for Cowboy and is now mature enough to receive a proper version. Gun is battle tested by customers and other users but is not the most well tested client there is.</p>
-
- <p style="text-align:right">
- <a class="read_more" href="https://ninenines.eu/articles/gun-1.0.0-rc.1/">Read More</a>
- </p>
- </article>
-
<nav class="pagination" role="pagination">
diff --git a/articles/index.xml b/articles/index.xml
index dbe0b3c3..da6a90d2 100644
--- a/articles/index.xml
+++ b/articles/index.xml
@@ -6,12 +6,23 @@
<description>Recent content in Articles on Nine Nines</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
- <lastBuildDate>Tue, 26 May 2020 07:00:00 +0100</lastBuildDate>
+ <lastBuildDate>Thu, 25 Jun 2020 07:00:00 +0100</lastBuildDate>
<atom:link href="https://ninenines.eu/articles/index.xml" rel="self" type="application/rss+xml" />
<item>
+ <title>Ranch 2.0</title>
+ <link>https://ninenines.eu/articles/ranch-2.0.0/</link>
+ <pubDate>Thu, 25 Jun 2020 07:00:00 +0100</pubDate>
+
+ <guid>https://ninenines.eu/articles/ranch-2.0.0/</guid>
+ <description>Ranch 2.0.0 has been released!
+In Ranch 1.x, there is only one supervisor per Ranch listener to start and manage connection processes. Under high load (many clients rapidly connecting and/or disconnecting), the message queue of this one supervisor could become congested, leading to declining accept rates or a stalled listener.
+Ranch 2.0 introduces the num_conns_sups option (defaulting to the number of acceptors), which allows the message load to be divided between the specified number of connection supervisors.</description>
+ </item>
+
+ <item>
<title>Cowboy 2.8</title>
<link>https://ninenines.eu/articles/cowboy-2.8.0/</link>
<pubDate>Tue, 26 May 2020 07:00:00 +0100</pubDate>
diff --git a/articles/january-2014-status/index.html b/articles/january-2014-status/index.html
index 78fb8ba3..25467cbb 100644
--- a/articles/january-2014-status/index.html
+++ b/articles/january-2014-status/index.html
@@ -115,6 +115,10 @@
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/joe_the_rubber_duck/index.html b/articles/joe_the_rubber_duck/index.html
index 769aa857..2efb1f06 100644
--- a/articles/joe_the_rubber_duck/index.html
+++ b/articles/joe_the_rubber_duck/index.html
@@ -89,6 +89,10 @@
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/merry-christmas-2018/index.html b/articles/merry-christmas-2018/index.html
index cd881f84..b4ab8464 100644
--- a/articles/merry-christmas-2018/index.html
+++ b/articles/merry-christmas-2018/index.html
@@ -96,6 +96,10 @@
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/merry-christmas-2019/index.html b/articles/merry-christmas-2019/index.html
index 2bc598de..5349a07c 100644
--- a/articles/merry-christmas-2019/index.html
+++ b/articles/merry-christmas-2019/index.html
@@ -92,6 +92,10 @@
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/ml-archives/index.html b/articles/ml-archives/index.html
index 622124b9..d9d5b441 100644
--- a/articles/ml-archives/index.html
+++ b/articles/ml-archives/index.html
@@ -86,6 +86,10 @@
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/on-open-source/index.html b/articles/on-open-source/index.html
index 921ea257..b49e2b3c 100644
--- a/articles/on-open-source/index.html
+++ b/articles/on-open-source/index.html
@@ -98,6 +98,10 @@ much left to look at today</a>. This was followed by a <a href="https://github.c
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/page/2/index.html b/articles/page/2/index.html
index 6def9788..53c9600c 100644
--- a/articles/page/2/index.html
+++ b/articles/page/2/index.html
@@ -67,6 +67,25 @@
<article class="blog_item">
<header>
+ <h2><a href="https://ninenines.eu/articles/gun-1.0.0-rc.1/">Gun 1.0 release candidate 1</a></h2>
+ <p class="date">
+ <span class="year">2018</span>
+ <span class="day-month">04 Jun</span>
+ </p>
+ </header>
+
+ <p>Gun 1.0.0-rc.1 has been released!
+Gun is an HTTP/1.1, HTTP/2 and Websocket client for Erlang/OTP.
+Gun provides an asynchronous interface and will keep the connection open to the server, reconnecting as necessary.
+Gun has existed for many years as the test client for Cowboy and is now mature enough to receive a proper version. Gun is battle tested by customers and other users but is not the most well tested client there is.</p>
+
+ <p style="text-align:right">
+ <a class="read_more" href="https://ninenines.eu/articles/gun-1.0.0-rc.1/">Read More</a>
+ </p>
+ </article>
+
+ <article class="blog_item">
+ <header>
<h2><a href="https://ninenines.eu/articles/cowboy-2.4.0/">Cowboy 2.4</a></h2>
<p class="date">
<span class="year">2018</span>
@@ -410,24 +429,6 @@ Cowboy 2.0 will respond to user wishes by simplifying the interface of the cowbo
</p>
</article>
- <article class="blog_item">
- <header>
- <h2><a href="https://ninenines.eu/articles/january-2014-status/">January 2014 status</a></h2>
- <p class="date">
- <span class="year">2014</span>
- <span class="day-month">07 Jan</span>
- </p>
- </header>
-
- <p>I will now be regularly writing posts about project status, plans and hopes for the future.
-Before that though, there&apos;s one important news to share.
-Until a year ago all development was financed through consulting and development services. This worked alright but too much time was spent doing things that didn&apos;t benefit the open source projects. And that didn&apos;t make me happy at all. Because I like being happy I stopped that for the most part and spent the year figuring things out, experimenting and discussing with people about it.</p>
-
- <p style="text-align:right">
- <a class="read_more" href="https://ninenines.eu/articles/january-2014-status/">Read More</a>
- </p>
- </article>
-
<nav class="pagination" role="pagination">
diff --git a/articles/page/3/index.html b/articles/page/3/index.html
index bb045536..8191ad8a 100644
--- a/articles/page/3/index.html
+++ b/articles/page/3/index.html
@@ -67,6 +67,24 @@
<article class="blog_item">
<header>
+ <h2><a href="https://ninenines.eu/articles/january-2014-status/">January 2014 status</a></h2>
+ <p class="date">
+ <span class="year">2014</span>
+ <span class="day-month">07 Jan</span>
+ </p>
+ </header>
+
+ <p>I will now be regularly writing posts about project status, plans and hopes for the future.
+Before that though, there&apos;s one important news to share.
+Until a year ago all development was financed through consulting and development services. This worked alright but too much time was spent doing things that didn&apos;t benefit the open source projects. And that didn&apos;t make me happy at all. Because I like being happy I stopped that for the most part and spent the year figuring things out, experimenting and discussing with people about it.</p>
+
+ <p style="text-align:right">
+ <a class="read_more" href="https://ninenines.eu/articles/january-2014-status/">Read More</a>
+ </p>
+ </article>
+
+ <article class="blog_item">
+ <header>
<h2><a href="https://ninenines.eu/articles/farwest-funded/">Farwest got funded!</a></h2>
<p class="date">
<span class="year">2013</span>
diff --git a/articles/ranch-1.3/index.html b/articles/ranch-1.3/index.html
index fee0220f..6fe6bbe5 100644
--- a/articles/ranch-1.3/index.html
+++ b/articles/ranch-1.3/index.html
@@ -127,6 +127,10 @@ Primary key fingerprint<font color="#990000">:</font> F19F 189C ECC7 <font color
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/ranch-1.6.0/index.html b/articles/ranch-1.6.0/index.html
index 4b138604..bb9a5b7b 100644
--- a/articles/ranch-1.6.0/index.html
+++ b/articles/ranch-1.6.0/index.html
@@ -89,6 +89,10 @@
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/ranch-1.7.0/index.html b/articles/ranch-1.7.0/index.html
index 09612b60..a0712a69 100644
--- a/articles/ranch-1.7.0/index.html
+++ b/articles/ranch-1.7.0/index.html
@@ -88,6 +88,10 @@
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/ranch-2.0.0-rc.1/index.html b/articles/ranch-2.0.0-rc.1/index.html
index c289cd7c..9d15fdaa 100644
--- a/articles/ranch-2.0.0-rc.1/index.html
+++ b/articles/ranch-2.0.0-rc.1/index.html
@@ -97,6 +97,10 @@
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/ranch-2.0.0/index.html b/articles/ranch-2.0.0/index.html
new file mode 100644
index 00000000..5bb03543
--- /dev/null
+++ b/articles/ranch-2.0.0/index.html
@@ -0,0 +1,337 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <title>Nine Nines: Ranch 2.0</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=7" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li class="active"><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents">
+<div class="container">
+<div class="row">
+<div class="span9 maincol">
+
+<article class="blog_item">
+<header>
+ <h1 class="lined-header"><span>Ranch 2.0</span></h1>
+ <p class="date">
+ <span class="year">2020</span>
+ <span class="day-month">25 Jun</span>
+ </p>
+</header>
+
+<p>Ranch <code>2.0.0</code> has been released!</p>
+<p>In Ranch 1.x, there is only one supervisor per Ranch listener to start and manage connection processes. Under high load (many clients rapidly connecting and/or disconnecting), the message queue of this one supervisor could become congested, leading to declining accept rates or a stalled listener.</p>
+<p>Ranch 2.0 introduces the <code>num_conns_sups</code> option (defaulting to the number of acceptors), which allows the message load to be divided between the specified number of connection supervisors. This improves accept concurrency at the same time.</p>
+<p>Another bottleneck is a possible congestion of the syn queue of a listening socket. The reason is located within the operating system&apos;s TCP/IP implementation, and on Linux the <code>SO_REUSEPORT</code> socket option was introduced to address it. What it boils down to is that you can have more than one socket listening on the same port, causing the sockets to be &quot;load-balanced&quot; when accepting connections.</p>
+<p>Ranch 2.0 introduces the <code>num_listen_sockets</code> option, which allows to specify the number of listening sockets a Ranch listener should employ. Whether you can use <code>SO_REUSEPORT</code> at all and how to enable it depends on your operating system, though.</p>
+<p>Other changes include proper support for local (Unix Domain) sockets, removing the restriction that a listener be suspended to change its transport options and much needed improvements to embedded listeners.</p>
+<p>In addition we have had patches merged to Erlang/OTP to add support for active N to the <code>ssl</code> application (requires Erlang/OTP 21.3 or above) and fix a number of smaller issues we encountered. We have also helped detect and fix a bug in the Windows implementation of active N that greatly reduced its performance in some cases.</p>
+<p>To ensure that everything works correctly, new tests have been written, and some existing tests were updated. Ranch is now tested against <a href="https://github.com/juhlig/stampede">Stampede</a>, a resilience testing tool that kills random processes and ports in the system; and against <a href="https://concuerror.com/">Concuerror</a>, a model checking tool for debugging, testing and verifying concurrrent Erlang programs.</p>
+<p>Starting from Ranch 2.0 onward, a <code>.appup</code> file is provided and release upgrades are tested and supported. The current plan is to test upgrades from one version to the next.</p>
+<p>We are now providing a <a href="https://github.com/juhlig/prometheus_ranch">Prometheus collector</a> as a separate project as well as a <a href="https://github.com/juhlig/prometheus_ranch/blob/master/dashboards/ranch-dashboard.json">Grafana dashboard</a>.</p>
+<p>Huge thanks to Jan Uhlig for working on many of the changes and improvements that went into this release.</p>
+<p>Ranch 2.0 requires Erlang/OTP 21 or above and is tested and supported on Linux, FreeBSD, macOS and Windows.</p>
+<p>A complete list of changes can be found in the migration guide: <a href="https://ninenines.eu/docs/en/ranch/2.0/guide/migrating_from_1.7/">Migrating from Ranch 1.7 to 2.0</a>.</p>
+<p>You can donate to this project via <a href="https://github.com/sponsors/essen">GitHub Sponsors</a>. These funds are used to pay for additional servers for testing. We will soon add two Raspberry Pi 4 in order to have some ARM targets when testing.</p>
+<p>As usual, feedback is appreciated, and issues or questions should be sent via Github tickets. Thanks!</p>
+
+
+</article>
+</div>
+
+<div class="span3 sidecol">
+<h3>More articles</h3>
+<ul id="articles-nav" class="extra_margin">
+
+
+
+
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/the-gateway-trilogy/">The Gateway Trilogy</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/gun-2.0.0-pre.2/">Gun 2.0 pre-release 2</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/merry-christmas-2019/">Merry Christmas 2019: New Beginnings</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/github-sponsors/">GitHub Sponsors</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/cowboy-2.7.0/">Cowboy 2.7</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/gun-2.0.0-pre.1/">Gun 2.0 pre-release 1</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/erlang-meetup-10-septembre-2019/">Erlang meetup: 10 septembre 2019</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0-rc.1/">Ranch 2.0 release candidate 1</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/joe_the_rubber_duck/">Joe Armstrong the rubber duck</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/merry-christmas-2018/">Merry Christmas 2018: A Recap</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/cowboy-2.6.0/">Cowboy 2.6</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/ranch-1.7.0/">Ranch 1.7</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/cowboy-2.5.0/">Cowboy 2.5</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/gun-1.3.0/">Gun 1.3</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/gun-1.2.0/">Gun 1.2</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/ranch-1.6.0/">Ranch 1.6</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/gun-1.0.0/">Gun 1.0</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/asciideck/">Asciideck: Asciidoc for Erlang</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/gun-1.0.0-rc.1/">Gun 1.0 release candidate 1</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/cowboy-2.4.0/">Cowboy 2.4</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/cowboy-2.3.0/">Cowboy 2.3</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/cowboy-2.2.0/">Cowboy 2.2</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/cowboy-2.1.0/">Cowboy 2.1</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/cowboy-2.0.0/">Cowboy 2.0</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/cowboy-2.0.0-rc.2/">Cowboy 2.0 release candidate 2</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/cowboy-2.0.0-rc.1/">Cowboy 2.0 release candidate 1</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/the-elephant-in-the-room/">The elephant in the room</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/dont-let-it-crash/">Don&#39;t let it crash</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/cowboy-2.0.0-pre.4/">Cowboy 2.0 pre-release 4</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/ranch-1.3/">Ranch 1.3</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/ml-archives/">Mailing list archived</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/website-update/">Website update</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/erlanger-playbook-september-2015-update/">The Erlanger Playbook September 2015 Update</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/erlanger-playbook/">The Erlanger Playbook</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/erlang-validate-utf8/">Validating UTF-8 binaries with Erlang</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/on-open-source/">On open source</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/the-story-so-far/">The story so far</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/cowboy2-qs/">Cowboy 2.0 and query strings</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/january-2014-status/">January 2014 status</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/farwest-funded/">Farwest got funded!</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/erlang.mk-and-relx/">Build Erlang releases with Erlang.mk and Relx</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/xerl-0.5-intermediate-module/">Xerl: intermediate module</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/xerl-0.4-expression-separator/">Xerl: expression separator</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/erlang-scalability/">Erlang Scalability</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/xerl-0.3-atomic-expressions/">Xerl: atomic expressions</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/xerl-0.2-two-modules/">Xerl: two modules</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/xerl-0.1-empty-modules/">Xerl: empty modules</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/ranch-ftp/">Build an FTP Server with Ranch in 30 Minutes</a></li>
+
+
+
+ <li><a href="https://ninenines.eu/articles/tictactoe/">Erlang Tic Tac Toe</a></li>
+
+
+</ul>
+
+<h3>Feedback</h3>
+<p>Feel free to <a href="mailto:[email protected]">email us</a>
+if you found any mistake or need clarification on any of the
+articles.</p>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
diff --git a/articles/ranch-ftp/index.html b/articles/ranch-ftp/index.html
index b63381eb..3c6d0e13 100644
--- a/articles/ranch-ftp/index.html
+++ b/articles/ranch-ftp/index.html
@@ -229,6 +229,10 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/the-elephant-in-the-room/index.html b/articles/the-elephant-in-the-room/index.html
index 9e3ac710..8c2f3d0b 100644
--- a/articles/the-elephant-in-the-room/index.html
+++ b/articles/the-elephant-in-the-room/index.html
@@ -111,6 +111,10 @@
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/the-gateway-trilogy/index.html b/articles/the-gateway-trilogy/index.html
index bd48cf37..bc2d5c3f 100644
--- a/articles/the-gateway-trilogy/index.html
+++ b/articles/the-gateway-trilogy/index.html
@@ -86,6 +86,10 @@
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/the-story-so-far/index.html b/articles/the-story-so-far/index.html
index c4bc4707..e78d7a39 100644
--- a/articles/the-story-so-far/index.html
+++ b/articles/the-story-so-far/index.html
@@ -102,6 +102,10 @@
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/tictactoe/index.html b/articles/tictactoe/index.html
index c6fcbfd9..a066e043 100644
--- a/articles/tictactoe/index.html
+++ b/articles/tictactoe/index.html
@@ -134,6 +134,10 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/website-update/index.html b/articles/website-update/index.html
index c07d4a68..c8301659 100644
--- a/articles/website-update/index.html
+++ b/articles/website-update/index.html
@@ -91,6 +91,10 @@
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/xerl-0.1-empty-modules/index.html b/articles/xerl-0.1-empty-modules/index.html
index ae2fcbdb..1006d5ad 100644
--- a/articles/xerl-0.1-empty-modules/index.html
+++ b/articles/xerl-0.1-empty-modules/index.html
@@ -169,6 +169,10 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/xerl-0.2-two-modules/index.html b/articles/xerl-0.2-two-modules/index.html
index 2e3b221f..04e91ec6 100644
--- a/articles/xerl-0.2-two-modules/index.html
+++ b/articles/xerl-0.2-two-modules/index.html
@@ -197,6 +197,10 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/xerl-0.3-atomic-expressions/index.html b/articles/xerl-0.3-atomic-expressions/index.html
index d03c363c..5ea148c5 100644
--- a/articles/xerl-0.3-atomic-expressions/index.html
+++ b/articles/xerl-0.3-atomic-expressions/index.html
@@ -166,6 +166,10 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/xerl-0.4-expression-separator/index.html b/articles/xerl-0.4-expression-separator/index.html
index 06f26c62..ef0febc4 100644
--- a/articles/xerl-0.4-expression-separator/index.html
+++ b/articles/xerl-0.4-expression-separator/index.html
@@ -118,6 +118,10 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/articles/xerl-0.5-intermediate-module/index.html b/articles/xerl-0.5-intermediate-module/index.html
index 78d41be9..ec538d81 100644
--- a/articles/xerl-0.5-intermediate-module/index.html
+++ b/articles/xerl-0.5-intermediate-module/index.html
@@ -162,6 +162,10 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="https://ninenines.eu/articles/ranch-2.0.0/">Ranch 2.0</a></li>
+
+
+
<li><a href="https://ninenines.eu/articles/cowboy-2.8.0/">Cowboy 2.8</a></li>
diff --git a/docs/en/ranch/2.0/guide/migrating_from_1.7.asciidoc b/docs/en/ranch/2.0/guide/migrating_from_1.7.asciidoc
index 92470aaa..d10d1fdf 100644
--- a/docs/en/ranch/2.0/guide/migrating_from_1.7.asciidoc
+++ b/docs/en/ranch/2.0/guide/migrating_from_1.7.asciidoc
@@ -14,15 +14,23 @@ concurrently accepting new connections.
Ranch 2.0 also adds experimental support for opening more
than one listening socket on a single port.
-Starting with Ranch 2.0 we are also providing a Prometheus
-collector as a separate project as well as a Grafana
-dashboard.
+Starting with Ranch 2.0 we are also providing a
+https://github.com/juhlig/prometheus_ranch[Prometheus collector]
+as a separate project as well as a
+https://github.com/juhlig/prometheus_ranch/blob/master/dashboards/ranch-dashboard.json[Grafana dashboard].
Ranch 2.0 is compatible with Erlang/OTP 21.0 onward. Support
for Erlang/OTP 19 and 20 has been removed.
=== Features added
+* Ranch now comes with a `ranch.appup` file necessary for
+ performing release upgrades. A test suite has been added
+ to confirm release upgrades work from one tag to the next.
+ Numerous fixes were made that will also improve error recovery.
+ Release upgrades will only be supported from Ranch 2.0
+ onward.
+
* The `num_conns_sups` option has been added. It allows
configuring the number of connection supervisors. It
now defaults to `num_accceptors`. The old behavior can
@@ -71,7 +79,7 @@ for Erlang/OTP 19 and 20 has been removed.
socket options.
* The callback function `Transport:messages/0` return value
- now include the tag used for passive messages.
+ now includes the tag used for passive messages.
* The `Socket` argument was removed from `Protocol:start_link/3`.
The socket must now be obtained by calling `ranch:handshake/1,2`.
@@ -128,11 +136,17 @@ for Erlang/OTP 19 and 20 has been removed.
* Connection draining has now been documented in the guide
following user feedback and discussions.
-* Ranch is now tested against `havoc`, a chaos monkey style
+* Ranch is now tested against https://concuerror.com/[Concuerror],
+ a model checking tool for debugging, testing and verifying
+ concurrent Erlang programs. Two tests have been added in this
+ release and more will follow in the future.
+
+* Ranch is now tested against `stampede`, a chaos monkey style
testing tool. Currently includes three scenarios: normal
TCP and TLS listeners and embedded TCP listener. This new
test suite helped uncover a misplaced `monitor/2` call
- added during the development of Ranch 2.0.
+ added during the development of Ranch 2.0 (we were using a
+ similar tool, `havoc`, at the time of finding that issue).
* The supervisor for acceptors and the parent supervisor for
connection supervisors now have an adaptive restart
diff --git a/docs/en/ranch/2.0/guide/migrating_from_1.7/index.html b/docs/en/ranch/2.0/guide/migrating_from_1.7/index.html
index 910b26bc..c943efae 100644
--- a/docs/en/ranch/2.0/guide/migrating_from_1.7/index.html
+++ b/docs/en/ranch/2.0/guide/migrating_from_1.7/index.html
@@ -65,10 +65,12 @@
<p>Ranch 2.0 adds support for multiple connection supervisors.</p>
<p>Ranch 1.x had a bottleneck because it used only a single connection supervisor. This was more evident when many connections were dropped at once as the supervisor couldn&apos;t keep up and failed to accept new connections while cleaning up the old ones. Ranch 2.0 behaves much better in this scenario by default. Multiple connection supervisors also helps with concurrently accepting new connections.</p>
<p>Ranch 2.0 also adds experimental support for opening more than one listening socket on a single port.</p>
-<p>Starting with Ranch 2.0 we are also providing a Prometheus collector as a separate project as well as a Grafana dashboard.</p>
+<p>Starting with Ranch 2.0 we are also providing a <a href="https://github.com/juhlig/prometheus_ranch">Prometheus collector</a> as a separate project as well as a <a href="https://github.com/juhlig/prometheus_ranch/blob/master/dashboards/ranch-dashboard.json">Grafana dashboard</a>.</p>
<p>Ranch 2.0 is compatible with Erlang/OTP 21.0 onward. Support for Erlang/OTP 19 and 20 has been removed.</p>
<h2 id="_features_added">Features added</h2>
-<ul><li>The <code>num_conns_sups</code> option has been added. It allows configuring the number of connection supervisors. It now defaults to <code>num_accceptors</code>. The old behavior can be obtained by setting this value to 1.
+<ul><li>Ranch now comes with a <code>ranch.appup</code> file necessary for performing release upgrades. A test suite has been added to confirm release upgrades work from one tag to the next. Numerous fixes were made that will also improve error recovery. Release upgrades will only be supported from Ranch 2.0 onward.
+</li>
+<li>The <code>num_conns_sups</code> option has been added. It allows configuring the number of connection supervisors. It now defaults to <code>num_accceptors</code>. The old behavior can be obtained by setting this value to 1.
</li>
<li>The <code>logger</code> option is no longer experimental. It now defaults to <code>logger</code> instead of <code>error_logger</code>.
</li>
@@ -92,7 +94,7 @@
<h2 id="_changed_behaviors">Changed behaviors</h2>
<ul><li>The callback function <code>Transport:listen/1</code> and its implementations in <code>ranch_tcp</code> and <code>ranch_ssl</code> have changed to accept a map of transport options instead of only socket options.
</li>
-<li>The callback function <code>Transport:messages/0</code> return value now include the tag used for passive messages.
+<li>The callback function <code>Transport:messages/0</code> return value now includes the tag used for passive messages.
</li>
<li>The <code>Socket</code> argument was removed from <code>Protocol:start_link/3</code>. The socket must now be obtained by calling <code>ranch:handshake/1,2</code>.
</li>
@@ -126,7 +128,9 @@
<h2 id="_other_changes">Other changes</h2>
<ul><li>Connection draining has now been documented in the guide following user feedback and discussions.
</li>
-<li>Ranch is now tested against <code>havoc</code>, a chaos monkey style testing tool. Currently includes three scenarios: normal TCP and TLS listeners and embedded TCP listener. This new test suite helped uncover a misplaced <code>monitor/2</code> call added during the development of Ranch 2.0.
+<li>Ranch is now tested against <a href="https://concuerror.com/">Concuerror</a>, a model checking tool for debugging, testing and verifying concurrent Erlang programs. Two tests have been added in this release and more will follow in the future.
+</li>
+<li>Ranch is now tested against <code>stampede</code>, a chaos monkey style testing tool. Currently includes three scenarios: normal TCP and TLS listeners and embedded TCP listener. This new test suite helped uncover a misplaced <code>monitor/2</code> call added during the development of Ranch 2.0 (we were using a similar tool, <code>havoc</code>, at the time of finding that issue).
</li>
<li>The supervisor for acceptors and the parent supervisor for connection supervisors now have an adaptive restart intensity limit set to <code>1 + ceil(math:log2(NumChildren))</code> to allow room for errors when they have many children.
</li>
diff --git a/docs/en/ranch/2.0/guide/protocols.asciidoc b/docs/en/ranch/2.0/guide/protocols.asciidoc
index b455143e..73a0bf5f 100644
--- a/docs/en/ranch/2.0/guide/protocols.asciidoc
+++ b/docs/en/ranch/2.0/guide/protocols.asciidoc
@@ -8,7 +8,7 @@ protocol logic executed in this process.
All protocol handlers must implement the `ranch_protocol` behavior
which defines a single callback, `start_link/3`. This callback is
responsible for spawning a new process for handling the connection.
-It receives four arguments: the name of the listener, the socket, the
+It receives three arguments: the name of the listener, the
transport handler being used and the protocol options defined in
the call to `ranch:start_listener/5`. This callback must
return `{ok, Pid}`, with `Pid` the pid of the new process.
diff --git a/docs/en/ranch/2.0/guide/protocols/index.html b/docs/en/ranch/2.0/guide/protocols/index.html
index 34817316..2388c2e8 100644
--- a/docs/en/ranch/2.0/guide/protocols/index.html
+++ b/docs/en/ranch/2.0/guide/protocols/index.html
@@ -64,7 +64,7 @@
<p>A protocol handler starts a connection process and defines the protocol logic executed in this process.</p>
<h2 id="_writing_a_protocol_handler">Writing a protocol handler</h2>
-<p>All protocol handlers must implement the <code>ranch_protocol</code> behavior which defines a single callback, <code>start_link/3</code>. This callback is responsible for spawning a new process for handling the connection. It receives four arguments: the name of the listener, the socket, the transport handler being used and the protocol options defined in the call to <code>ranch:start_listener/5</code>. This callback must return <code>{ok, Pid}</code>, with <code>Pid</code> the pid of the new process.</p>
+<p>All protocol handlers must implement the <code>ranch_protocol</code> behavior which defines a single callback, <code>start_link/3</code>. This callback is responsible for spawning a new process for handling the connection. It receives three arguments: the name of the listener, the transport handler being used and the protocol options defined in the call to <code>ranch:start_listener/5</code>. This callback must return <code>{ok, Pid}</code>, with <code>Pid</code> the pid of the new process.</p>
<p>The newly started process can then freely initialize itself. However, it must call <code>ranch:handshake/1,2</code> before doing any socket operation. This will ensure the connection process is the owner of the socket. It expects the listener&apos;s name as argument.</p>
<div class="listingblock"><div class="title">Perform the socket handshake</div>
<div class="content"><!-- Generator: GNU source-highlight 3.1.9
diff --git a/docs/index.xml b/docs/index.xml
index c9ea6a64..878665ab 100644
--- a/docs/index.xml
+++ b/docs/index.xml
@@ -680,7 +680,7 @@ Writing a protocol handler All protocol handlers must implement the ranch_protoc
<guid>https://ninenines.eu/docs/en/ranch/2.0/guide/protocols/</guid>
<description>A protocol handler starts a connection process and defines the protocol logic executed in this process.
-Writing a protocol handler All protocol handlers must implement the ranch_protocol behavior which defines a single callback, start_link/3. This callback is responsible for spawning a new process for handling the connection. It receives four arguments: the name of the listener, the socket, the transport handler being used and the protocol options defined in the call to ranch:start_listener/5.</description>
+Writing a protocol handler All protocol handlers must implement the ranch_protocol behavior which defines a single callback, start_link/3. This callback is responsible for spawning a new process for handling the connection. It receives three arguments: the name of the listener, the transport handler being used and the protocol options defined in the call to ranch:start_listener/5.</description>
</item>
<item>
diff --git a/donate/index.html b/donate/index.html
index 48856428..2668c7c3 100644
--- a/donate/index.html
+++ b/donate/index.html
@@ -728,6 +728,8 @@
+
+
<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
diff --git a/index.html b/index.html
index dc61ec81..1aa0b169 100644
--- a/index.html
+++ b/index.html
@@ -871,6 +871,8 @@
+
+
<p>Reward my work via <a href="https://github.com/sponsors/essen">GitHub Sponsors</a> and<br/>GitHub will double the funds I receive!</p>
diff --git a/index.xml b/index.xml
index 89e04400..31553ef5 100644
--- a/index.xml
+++ b/index.xml
@@ -681,7 +681,7 @@ Writing a protocol handler All protocol handlers must implement the ranch_protoc
<guid>https://ninenines.eu/docs/en/ranch/2.0/guide/protocols/</guid>
<description>A protocol handler starts a connection process and defines the protocol logic executed in this process.
-Writing a protocol handler All protocol handlers must implement the ranch_protocol behavior which defines a single callback, start_link/3. This callback is responsible for spawning a new process for handling the connection. It receives four arguments: the name of the listener, the socket, the transport handler being used and the protocol options defined in the call to ranch:start_listener/5.</description>
+Writing a protocol handler All protocol handlers must implement the ranch_protocol behavior which defines a single callback, start_link/3. This callback is responsible for spawning a new process for handling the connection. It receives three arguments: the name of the listener, the transport handler being used and the protocol options defined in the call to ranch:start_listener/5.</description>
</item>
<item>
@@ -3148,6 +3148,17 @@ HTTP IANA Registries HTTP Method Registry HTTP Status Code Registry Message He
</item>
<item>
+ <title>Ranch 2.0</title>
+ <link>https://ninenines.eu/articles/ranch-2.0.0/</link>
+ <pubDate>Thu, 25 Jun 2020 07:00:00 +0100</pubDate>
+
+ <guid>https://ninenines.eu/articles/ranch-2.0.0/</guid>
+ <description>Ranch 2.0.0 has been released!
+In Ranch 1.x, there is only one supervisor per Ranch listener to start and manage connection processes. Under high load (many clients rapidly connecting and/or disconnecting), the message queue of this one supervisor could become congested, leading to declining accept rates or a stalled listener.
+Ranch 2.0 introduces the num_conns_sups option (defaulting to the number of acceptors), which allows the message load to be divided between the specified number of connection supervisors.</description>
+ </item>
+
+ <item>
<title>Cowboy 2.8</title>
<link>https://ninenines.eu/articles/cowboy-2.8.0/</link>
<pubDate>Tue, 26 May 2020 07:00:00 +0100</pubDate>
diff --git a/services/index.html b/services/index.html
index 888b713e..a3974d23 100644
--- a/services/index.html
+++ b/services/index.html
@@ -754,6 +754,8 @@
+
+
<h3 id="_like_my_work__donate">Like my work? Donate!</h3>
<p>Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:</p>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="display:inline">
diff --git a/sitemap.xml b/sitemap.xml
index 39de40e6..d80c71da 100644
--- a/sitemap.xml
+++ b/sitemap.xml
@@ -1148,7 +1148,12 @@
<url>
<loc>https://ninenines.eu/articles/</loc>
- <lastmod>2020-05-26T07:00:00+01:00</lastmod>
+ <lastmod>2020-06-25T07:00:00+01:00</lastmod>
+ </url>
+
+ <url>
+ <loc>https://ninenines.eu/articles/ranch-2.0.0/</loc>
+ <lastmod>2020-06-25T07:00:00+01:00</lastmod>
</url>
<url>