ninenines/ranch
60.2
Adequate · 13 November 2026
4.3k
lines of production code
Erlang
primary language
8
measurements over time
What this system is
Features
Add TCP Echo protocol example
A new TCP echo example has been added to demonstrate a Ranch protocol implementation. The example includes a release configuration and build instructions, allowing users to start a server on port 5555 that echoes back received data. It utilizes the modern Ranch API, specifically \ranch:handshake/1\ and the Transport module for socket operations, and includes a 60-second timeout for inactivity.
_examples/tcp\echo · high confidence
Initial release of Ranch 2.3.0
This entry introduces Ranch version 2.3.0, a socket acceptor pool for TCP protocols. The release includes the core application code, a Makefile-based build system using erlang.mk, and updated documentation in Asciidoc format (README.asciidoc, User Guide, and Function Reference). It also establishes the project's ISC license and initial test infrastructure.
(repo-wide) · high confidence
New TCP reverse example using gen\_statem
Added a new example demonstrating a TCP reverse protocol implementation using gen\_statem instead of gen\_server. The example listens on port 5555, reverses input text, and includes a 60-second inactivity timeout before disconnecting. It also updates the dependency to use the Ranch master branch and modernizes the code to use the new transport options format and Transport:handshake/1.
_examples/tcp\reverse · high confidence
Ranch 2.3.0 release with upgrade instructions and new transport behaviors
This release introduces the \ranch\_transport\ and \ranch\_protocol\ behaviours, allowing custom transport implementations and separating connection supervision from the protocol logic. It adds support for the PROXY protocol (v1 and v2) via \ranch\_proxy\_header\, enables TLS handshakes on existing sockets, and allows connection processes to be supervisors. The \ranch.appup\ file provides upgrade instructions from 2.1.x and 2.2.x to 2.3.0, detailing the necessary module updates and acceptor restarts.
src · high confidence
Behavioural changes
Ranch User Guide converted to Asciidoc with comprehensive migration documentation
The Ranch documentation has been converted from its previous format to Asciidoc, restructured into a cohesive book with dedicated chapters for Listeners, Transports, Protocols, Embedded mode, and Internals. This update introduces new guides for writing parsers and configuring SSL client authentication, and adds a detailed section on connection draining to help users gracefully stop listeners. Crucially, the guide now includes a series of migration appendices covering upgrades from Ranch 1.5 through 2.2 to 2.3, documenting breaking changes such as the removal of the \Socket\ argument from protocol handlers, the shift to map-based options, and the new \ranch:handshake/1,2\ API.
doc/src/guide · high confidence
Ranch documentation converted to Asciidoc with expanded API coverage
The manual pages in doc/src/manual have been converted to Asciidoc format and significantly expanded to document new and updated API functions. This includes detailed documentation for listener suspension and resumption, transport handshake control (including pause, resume, and cancel), and new introspection functions like ranch:info/0, ranch:procs/2, and ranch:get\_addr/1. The documentation also reflects behavioral changes such as the removal of the Socket argument from ranch\_protocol:start\_link, the shift to map-based transport options, and the addition of PROXY protocol header support and TLS handshake capabilities.
doc/src/manual · high confidence
Test coverage
Expanded test coverage for listener lifecycle, transport features, and concurrency stability
The test suite now includes comprehensive suites for acceptor behavior, proxy protocol header parsing (v1 and v2), file sendfile operations, and listener shutdown modes (including brutal\_kill, timeout, and infinity). New test protocols and transport mocks validate handshake continuations, active N mode, connection removal, and embedded supervisor interactions. Concurrency stability is verified through Concuerror checks and stampede-based stress tests for TCP, SSL, and embedded listeners, ensuring robustness under rapid start/stop cycles and high connection volumes.
test · high confidence
Dependencies
Ranch library updated to version 2.3.0
The Ranch socket acceptor pool has been updated to version 2.3.0, as reflected in the regenerated application metadata file. This version bump includes the addition of the ssl application to the required dependencies list, ensuring that SSL/TLS functionality is properly resolved at runtime.
ebin · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 61 → 60 (-0.4)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.3) — scores are not directly comparable.
Lenses
- Code Health 72 → 72 (-0.6)
- Architecture 100 → 100 (+0.0)
- Maturity 47 → 46 (-0.8)
- Readiness 57 → 57 (+0.0)
- Security 100 → 100 (+0.0)
- Event Sourcing 100 → 100 (+0.0)
Resolved (1)
- Off-boarding risk: anonymized user #1
New (6)
- Edited copy of a member (4 corresponding lines) (src/ranch_ssl.erl)
- Edited copy of a member (6 corresponding lines) (src/ranch.erl)
- Hotspot: src/ranch_proxy_header.erl (src/ranch_proxy_header.erl)
- Off-boarding risk: anonymized user #1
- TooManyFunctions: ranch_server (src/ranch_server.erl)
- ranch_proxy_header.parse_tlv (cyclomatic 17) (src/ranch_proxy_header.erl)
Changes since last survey
- 8 commits — 7 feature/other, 1 fixes
By area
- doc/src — 5 commits
- (root) — 1 commit
- src/ranch.appup — 1 commit
- test/acceptor_SUITE.erl — 1 commit
Notable commits
- fix: Fix race in acceptor_SUITE:tcp_set_max_connections
- change: Describe PROXY sig_alg and key_alg as the frontend certificate
- change: Do not copy socket options when checking PROXY peers
- change: Do not report PROXY verified without cert_conn or cert_sess
- change: Do not return a PROXY CN without cert_conn or cert_sess
- change: Do not return a PROXY client certificate without cert_conn or cert_sess
- change: Fix typo in documentation
- change: Ranch 2.4.0
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
ninenines/ranch was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 13 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit ea42d6cbfa24f16ec5a12b8d0ce5dc2f5983a0f3 — the exact code this score is about.
- Scored under rubric-2026.11.3 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.57+preprod-8ebfb01cf4c0.