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
muslnode 18–226 runs
build_error
glibcnode 18–226 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);
}
);
Errors
Common errors & fixes
TypeError: Cannot read property 'statusCode' of undefined
Callback invoked with error but response is undefined on timeout/connection error.
fixCheck if (error) return before accessing response.
Error: Max pending threshold reached
Too many concurrent requests; pool.maxPending exceeded.
fixIncrease maxPending or slow down request rate.
Error: All endpoints are unavailable
All servers are marked unhealthy or unreachable.
fixCheck server health; ensure ping endpoint returns 200.
Audit
Dependencies
No dependency data recorded yet.