{"id":18673,"library":"poolee","title":"poolee","description":"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.","status":"maintenance","version":"1.0.1","language":"javascript","source_language":"en","source_url":"ssh://git@github.com/dannycoates/poolee","tags":["javascript","pool","http","retry","health","load balancer"],"install":[{"cmd":"npm install poolee","lang":"bash","label":"npm"},{"cmd":"yarn add poolee","lang":"bash","label":"yarn"},{"cmd":"pnpm add poolee","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"CJS only; no ESM support.","wrong":"import Pool from 'poolee'","symbol":"Pool","correct":"const Pool = require('poolee')"},{"note":"Default export is the Pool constructor; named export also available.","wrong":"","symbol":"Pool","correct":"const { Pool } = require('poolee')"},{"note":"Body can be string/buffer; omit for GET.","wrong":"pool.request(options, callback)","symbol":"Pool.prototype.request","correct":"pool.request(options, body, callback)"}],"quickstart":{"code":"const Pool = require('poolee');\nconst http = require('http');\n\nconst servers = [\n  '127.0.0.1:8886',\n  '127.0.0.1:8887',\n  '127.0.0.1:8888',\n  '127.0.0.1:8889'\n];\n\nconst pool = new Pool(http, servers, {\n  maxPending: 1000,\n  maxSockets: 20,\n  timeout: 60000,\n  resolution: 1000,\n  keepAlive: true,\n  ping: '/health',\n  pingTimeout: 2000,\n  retryFilter: function(options, response, body) {\n    return response.statusCode === 500;\n  },\n  retryDelay: 20,\n  maxRetries: 3\n});\n\npool.request(\n  { method: 'GET', path: '/api/data' },\n  null,\n  function(error, response, body) {\n    if (error) {\n      console.error(error.message);\n      return;\n    }\n    console.log(response.statusCode, body);\n  }\n);","lang":"javascript","description":"Creates a pool with multiple servers, configures options including health checks and retry filter, then makes a GET request."},"warnings":[{"fix":"Avoid using keepAlive: true unless you understand the internal implementation.","message":"The keepAlive option uses a non-standard internal agent; behavior may differ from Node's native keep-alive.","severity":"deprecated","affected_versions":"<=1.0.1"},{"fix":"Set maxRetries < number of endpoints in pool.","message":"maxRetries is capped by pool size; if maxRetries >= number of servers, retries will not work as expected.","severity":"gotcha","affected_versions":"<=1.0.1"},{"fix":"Ensure resolution is defined (default 1000ms) for ping to function.","message":"The ping option only works if resolution is set; endpoint health checks may not occur otherwise.","severity":"gotcha","affected_versions":"<=1.0.1"},{"fix":"Set resolution smaller than timeout for tighter accuracy.","message":"Timeout is approximate; actual timeout can be up to resolution ms later than specified timeout.","severity":"gotcha","affected_versions":"<=1.0.1"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Check if (error) return before accessing response.","cause":"Callback invoked with error but response is undefined on timeout/connection error.","error":"TypeError: Cannot read property 'statusCode' of undefined"},{"fix":"Increase maxPending or slow down request rate.","cause":"Too many concurrent requests; pool.maxPending exceeded.","error":"Error: Max pending threshold reached"},{"fix":"Check server health; ensure ping endpoint returns 200.","cause":"All servers are marked unhealthy or unreachable.","error":"Error: All endpoints are unavailable"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}