Registry / http-networking / poolee

poolee

JSON →
library1.0.1jsnpmunverified

HTTP pool and load balancer for Node.js (v1.0.1, stable). Provides connection pooling, load balancing across multiple endpoints, automatic retries with exponential backoff, health checks via ping endpoints, and configurable timeouts. Differentiators: simple API, built-in retry filtering, and endpoint health management. Last release in 2017; maintenance mode.

npm install poolee
INSTALL
IMPORT
SIG · POOLEE
P
poolee
http-networkingjavascriptv1.0.1
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Pool
const Pool = require('poolee')
import Pool from 'poolee'
CJS only; no ESM support.
Pool
const { Pool } = require('poolee')
Default export is the Pool constructor; named export also available.
Pool.prototype.request
pool.request(options, body, callback)
pool.request(options, callback)
Body can be string/buffer; omit for GET.

Creates a pool with multiple servers, configures options including health checks and retry filter, then makes a GET request.

const Pool = require('poolee'); const http = require('http'); const servers = [ '127.0.0.1:8886', '127.0.0.1:8887', '127.0.0.1:8888', '127.0.0.1:8889' ]; const pool = new Pool(http, servers, { maxPending: 1000, maxSockets: 20, timeout: 60000, resolution: 1000, keepAlive: true, ping: '/health', pingTimeout: 2000, retryFilter: function(options, response, body) { return response.statusCode === 500; }, retryDelay: 20, maxRetries: 3 }); pool.request( { method: 'GET', path: '/api/data' }, null, function(error, response, body) { if (error) { console.error(error.message); return; } console.log(response.statusCode, body); } );
Debug
Known issues
deprecatedThe keepAlive option uses a non-standard internal agent; behavior may differ from Node's native keep-alive.
fix
Avoid using keepAlive: true unless you understand the internal implementation.
affects: <=1.0.1
gotchamaxRetries is capped by pool size; if maxRetries >= number of servers, retries will not work as expected.
fix
Set maxRetries < number of endpoints in pool.
affects: <=1.0.1
gotchaThe ping option only works if resolution is set; endpoint health checks may not occur otherwise.
fix
Ensure resolution is defined (default 1000ms) for ping to function.
affects: <=1.0.1
gotchaTimeout is approximate; actual timeout can be up to resolution ms later than specified timeout.
fix
Set resolution smaller than timeout for tighter accuracy.
affects: <=1.0.1
Errors
Common errors & fixes
TypeError: Cannot read property 'statusCode' of undefined
Callback invoked with error but response is undefined on timeout/connection error.
fix
Check if (error) return before accessing response.
Error: Max pending threshold reached
Too many concurrent requests; pool.maxPending exceeded.
fix
Increase maxPending or slow down request rate.
Error: All endpoints are unavailable
All servers are marked unhealthy or unreachable.
fix
Check server health; ensure ping endpoint returns 200.
Upgrade
Version history
1.0.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
poolee — npm install poolee · libregistry