
Security News
The Next Open Source Security Race: Triage at Machine Speed
Claude Opus 4.6 has uncovered more than 500 open source vulnerabilities, raising new considerations for disclosure, triage, and patching at scale.
adaptive-timeout
Advanced tools
Adaptive timeout calculation with EWMA-based tracking and fallback strategies.
npm install adaptive-timeout
const AdaptiveTimeout = require('adaptive-timeout')
const timeouts = new AdaptiveTimeout()
// Record a sample when you get a response
timeouts.put('10.0.0.1:8080', 150)
// Get timeout for next request (attempt 1, 2, 3...)
timeouts.get('10.0.0.1:8080', 1) // adaptive based on recorded samples
timeouts.get('unknown-peer', 1) // uses fallback strategy
const timeouts = new AdaptiveTimeout([options])Create a new instance.
Options:
maxSize - max cache entries (default: 65536)maxAge - entry TTL in ms (default: 600000 / 10 minutes)fallback - timeout sequence for unknown keys (default: [500, 750, 1000, 1500, 2000])min - minimum timeout for known keys (default: 300)max - maximum timeout for known keys (default: 5000)jitter - random jitter range in ms (default: 256)timeouts.put(key, value)Record a sample. Updates the exponentially weighted moving average.
Returns { avg, variance }.
timeouts.get(key, [attempt])Get a timeout value.
For known keys: calculates adaptive timeout with linear backoff based on attempt number.
For unknown keys: returns value from fallback sequence based on attempt number.
timeouts.getValue(key)Get raw stats for a key. Returns { avg, variance } or null.
timeouts.has(key)Check if a key exists.
timeouts.delete(key)Remove a key.
timeouts.clear()Remove all entries.
timeouts.sizeNumber of entries.
Uses TCP-style EWMA (exponentially weighted moving average) to track values:
avg blends 87.5% old + 12.5% new samplevariance blends 75% old + 25% new deviationTimeout for known keys: (avg + 2 * variance) * attempt + jitter
Unknown keys use an aggressive fallback sequence to probe quickly.
Apache 2.0
FAQs
adaptive-timeout
We found that adaptive-timeout demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Claude Opus 4.6 has uncovered more than 500 open source vulnerabilities, raising new considerations for disclosure, triage, and patching at scale.

Research
/Security News
Malicious dYdX client packages were published to npm and PyPI after a maintainer compromise, enabling wallet credential theft and remote code execution.

Security News
gem.coop is testing registry-level dependency cooldowns to limit exposure during the brief window when malicious gems are most likely to spread.