Blog

Posts tagged “Postgres”

Header: 'Webhooks that fail one time in ten.' beside an illustrative webhook log: a 401 signature mismatch on an amount of 24.50, the same event handled twice after a slow 4.1 s response and a retry, and a fast queued 200.
Debugging

Debugging webhooks in Node: failed signatures, retries and duplicate events

Webhook bugs rarely reproduce on your laptop: a signature check that fails one time in ten, the same event processed twice, a retry storm after a slow deploy. Here's the fix for each, plus how to get the exact request in front of you.

Jason Fill November 5, 2026 6 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
Cursor vs offset pagination at page 4000. Cover graphic for a guide to keyset pagination in Node.js and Postgres APIs.
Coding

Cursor vs offset pagination: an API design that survives big tables and scrapers

Offset pagination was fast at launch; now deep pages hammer the database and one API key is walking every page. Here is when to switch to cursors and how.

Jason Fill August 21, 2026 6 min read
Idempotency keys stop double charges. Cover graphic for a guide to making POST retries safe with idempotency keys in Node.js and Postgres.
Coding

Idempotency keys in Node.js: safe retries for POST endpoints without double charges

A timeout, an automatic retry, and a customer charged twice. Idempotency keys make POST retries safe: here is a working Express and Postgres implementation, the status codes to return, and how long to keep keys.

Jason Fill June 3, 2026 7 min read
Find N+1 queries before users do. Cover graphic for a guide to detecting and fixing N+1 database queries in a Node.js API.
Monitoring

How to find N+1 queries in a Node.js API before your users do

An endpoint that's fast in development takes 900 ms for your biggest customer because it runs 201 queries. Find N+1 queries in a Node API with a per-request query counter and a test, then fix them with one batched query.

Jason Fill April 3, 2026 6 min read