summaryrefslogtreecommitdiffstats
path: root/_build/content
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 /_build/content
parent849fab7227a2fd1ff5fa4d603ba89037e1c462b4 (diff)
downloadninenines.eu-e7feea1ec8a65311f9da998605031df77e5d26ea.tar.gz
ninenines.eu-e7feea1ec8a65311f9da998605031df77e5d26ea.tar.bz2
ninenines.eu-e7feea1ec8a65311f9da998605031df77e5d26ea.zip
Ranch 2.0
Diffstat (limited to '_build/content')
-rw-r--r--_build/content/articles/ranch-2.0.0.asciidoc75
1 files changed, 75 insertions, 0 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!