Skip to content
CAI
Software that uses CAICheck a score

emqx/ecpool

54.5

Adequate · 2 October 2026

1.1k

lines of production code

Erlang

primary language

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

ecpool is an Erlang library that manages and monitors client connections to external services, designed to prevent application crashes when those services become unavailable. It supports multiple connection strategies, such as round-robin and hash-based distribution, and includes auto-reconnection capabilities with configurable callbacks. The system also provides robust upgrade support through a global monitor for client discovery and integrity checks, ensuring state preservation during hot code changes.

Features

Initial release of ecpool Erlang connection pool library

This change introduces the ecpool library, an Erlang connection/client pool designed to manage and monitor connections to servers or databases while preventing application crashes when those services go down. The release includes the core source code, a Makefile for build and test automation (deps, compile, xref, ct, cover, dialyzer), and a rebar.config specifying a minimum OTP version of R20 and a dependency on gproc 1.0.0. The library supports various pool types (round\_robin, random, hash) and auto-reconnection strategies, allowing users to define custom callback modules for connection logic.

(repo-wide) · high confidence

Behavioural changes

Define core type and option specifications for the connection pool

The include file now defines the fundamental type specifications for the connection pool library. This includes types for callbacks and actions, the apply\_mode configuration (supporting handover, handover\_async, and no\_handover variants), pool\_type strategies (random, hash, direct, round\_robin), and the option tuple structure for configuring pool size, type, auto-reconnect behavior, and connection lifecycle callbacks.

include · high confidence

Introduce global client discovery via ecpool\_monitor

The library now includes an \ecpool\_monitor\ process that tracks client PIDs in a global ETS table, enabling reliable client lookup during hot code upgrades (relup) and providing a \check\_pool\_integrity/1\ API to verify supervision tree health. This change updates the \appup\ migration scripts to add, start, and clean up the monitor module when upgrading from versions 0.4.2 through 0.5.8, ensuring that client state is preserved and accessible across version boundaries.

src · high confidence

Test coverage

Added comprehensive test suite for ecpool

Added a new Common Test suite (ecpool\_SUITE) and several mock worker modules (test\_client, test\_client\_connect\_fail, test\_failing\_client, test\_timeout\_client) to verify pool lifecycle, connection failure handling, empty pool states, supervision tree integrity, and shutdown timeouts.

test · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 54 → 54 (+0.0)
  • Rubric changed (rubric-2026.09.12 → rubric-2026.09.18) — scores are not directly comparable.

Lenses

  • Code Health 96 → 96 (+0.0)
  • Architecture 69 → 69 (+0.0)
  • Maturity 42 → 42 (+0.0)
  • Readiness 64 → 64 (+0.0)
  • Security 60 → 60 (+0.0)

Resolved (4)

  • Coverage not measured — no coverage collector is wired up
  • Documentation: no architecture or design documentation (README.md)
  • Documentation: no installation or build instructions (README.md)
  • Off-boarding risk: anonymized user #1

New (3)

  • Dependency hygiene PARTLY measured — rebar3 pinning read, dependency currency not (no rebar.lock-pinned Hex declaration to grade)
  • No dependency lockfile committed (rebar.config)
  • Off-boarding risk: anonymized user #1

Changes since last survey

  • 3 commits — 3 feature/other, 0 fixes

By area

  • src/ecpool_worker.erl — 2 commits
  • (repo) — 1 commit

Notable commits

  • change: Merge pull request #63 from thalesmg/20260917-record-last-error
  • change: chore: return time since registered per review request
  • change: feat: return last known start error when fetching a worker's client

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

emqx/ecpool 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 2 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit a4eeb63fcfe4ec189698bac162e6ade326e1bedb — the exact code this score is about.
  • Scored under rubric-2026.09.18 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-e569280dd5e2.