Blog

Posts tagged “Latency”

ApiTraffic header: Express monitoring by route, not by URL, with a /metrics output panel listing route-labelled request counts for 200, 201, 404 and 500 responses
Monitoring

Express monitoring: route-level metrics, APM and alerts for Express 4 and 5

Most Express metrics are labelled by raw URL and miss async errors. Build route-level metrics with prom-client, add OpenTelemetry in the right load order, and set alerts, with code we ran on Express 4.22.3 and 5.3.0.

Jason Fill November 12, 2026 11 min read
Header: 'Node.js API monitoring: What to measure, how to set it up, and which tools fit a small team', with a metrics panel from the guide's example: /orders/:id p95 250ms and 2.0% 5xx, /report p95 250ms, unmatched 404, event loop delay p50 120.8ms against an idle 20.2ms.
Monitoring

Node.js API monitoring: what to measure, how to set it up, and which tools fit a small team

Uptime checks miss most of what breaks a Node API. What to measure per route and per process, a tested Express middleware for RED metrics and event loop delay, where OpenTelemetry fits, a fair tool comparison and the alerts worth paging on.

Jason Fill November 12, 2026 16 min read
Bar chart: ALB idle timeout 60 s, old Node keepAliveTimeout 5 s causing a 502 when the ALB reuses a closed socket, and a fixed keepAliveTimeout of 65 s, with the code server.keepAliveTimeout = 65_000; server.headersTimeout = 66_000;
Monitoring

Node.js server timeouts: requestTimeout, headersTimeout and keepAliveTimeout

Random 502s behind a load balancer often come down to one setting: keepAliveTimeout. What each Node.js server timeout controls, safe values behind an AWS ALB, and how to confirm the fix.

Jason Fill November 11, 2026 5 min read
Header: 'Your API isn't slow. It's waiting for a connection.' beside an illustrative terminal showing a pg pool with 10 total, 0 idle and waiting climbing from 47 to 240, and GET /v1/dashboard at p95 9.8s with 80 ms of database time.
Debugging

Your Node API isn't slow. It's waiting for a database connection.

Fine in testing, then 200 people open the same page and the endpoint takes ten seconds. CPU is flat and Postgres says every query is fast. That's pool starvation. Here's why it happens in Node, how to spot it, the fixes with code, and how to prove they worked.

Jason Fill November 3, 2026 6 min read
UV_THREADPOOL_SIZE in Node.js: terminal output where dns.lookup(localhost) takes 544 ms behind eight scrypt hashes with the default pool and 30 ms with UV_THREADPOOL_SIZE=16, measured on Node 22.23
Monitoring

UV_THREADPOOL_SIZE in Node.js: when DNS lookups, crypto and fs wait in the same line

Outbound calls slow down under load while CPU stays low? DNS lookups, crypto and fs share libuv's 4-thread pool in Node. How to reproduce the queue, measure it per upstream, and set UV_THREADPOOL_SIZE.

Jason Fill October 22, 2026 5 min read
Deploy markers name the guilty release: p95 per endpoint before and after a deploy, with /v1/search flagged as a regression
Monitoring

Deploy markers: tying a latency regression to the release that caused it

p95 doubled, and there were three deploys and a flag flip since yesterday. Deploy markers and a version field on every log line turn "which release did this" into a five-minute query. Here is how to set both up for a Node API.

Jason Fill October 13, 2026 6 min read
API latency percentiles, read honestly. Cover graphic for a guide to reading p50, p95 and p99 API latency correctly.
Monitoring

API latency percentiles: how to read p50, p95 and p99 without fooling yourself

Your average latency says 102 ms; a customer says the app hangs for two seconds. Both are true. Learn to read p50, p95 and p99, avoid the four classic mistakes, and record percentiles per route in Node.

Jason Fill December 18, 2025 7 min read