Node.js
Browse all articles, tutorials, and guides about Node.js
Posts
How Stripe Avoids Double-Charging Anyone
A payment request times out. Did the charge happen? Stripe answers that question with idempotency keys, and the design behind them is more than a cache of responses: locked key rows, recovery points, and a rule about which calls can be retried. Here is the design, a working Postgres implementation, the run where our own version double-created rides, and the constraint that caught it.
Stop Building Webhook Retries Yourself
We pointed a webhook sender at a receiver built to fail the common ways production fails: outages, 429s, timeouts, dead endpoints, bad signatures. Then we watched the retries, the schedule, the signature checks, and the replay happen without writing any of it. Here is the run, with the code and the attempt logs.
Running a Background Job That Must Not Be Lost
A queue gets your job to a worker, not to the finish line. What happens when the worker dies halfway, and a durable executor in 90 lines of TypeScript.
What It Actually Takes to Deliver a Webhook in Production
Sending a webhook is one HTTP POST. Delivering one is a retry schedule, a signature scheme, an idempotency story, and a way to answer "did you get it?" six hours later. Here is the whole problem, and a working Node implementation of both sides.