Urgent.News

What's breaking now, across thousands of outlets.

Tech

Retry, Backoff, and Jitter for NHTSA DecodeVinValues Without Thundering Herds

Public NHTSA vPIC endpoints do not give you a private SLA. When your free VIN tool, a marketplace embed, and a cron job all refresh at once, naive retries make outages worse. Every client wakes up, fails, sleeps the same 500ms, and hits DecodeVinValues together again. This post covers a small TypeScript retry helper with exponential backoff and jitter, plus product rules so retries do not lie to…

The article discusses the importance of implementing a retry mechanism with exponential backoff and jitter for the NHTSA DecodeVinValues API to prevent "thundering herds" of requests when multiple clients fail simultaneously. The author provides a TypeScript helper function, singleFlight, which ensures that only one request is made for a given VIN, rather than multiple concurrent requests.

The article also outlines the criteria for when to retry requests, focusing on transient failures like network resets and timeouts, while discouraging retries for non-transient issues such as invalid VINs or sparse 200 responses with incomplete data. The recommended approach for handling retries is to use exponential backoff with full jitter, which spreads out the requests more evenly and avoids overwhelming the API during peak times.

Brief written by urgent.news from Dev.to's own syndicated text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

RepoDNA v1.2.2

RepoDNA v1.2.2: A Small Follow-Up for Better Mobile Tables and npm Releases RepoDNA v1.2.2 is now available. This release is intentionally small.

  • Improved table scrolling on mobile devices with consistent shading across entire edge
  • Predictable npm releases by checking if older version should be published after newer
  • RepoDNA remains unchanged, open-source repository intelligence tool with versioned artifact

The Cache Stampede Problem: Why a Popular Cache Key Can Take Down Your Backend

Caches are supposed to protect your backend from load. Most of the time they do. But there is a specific failure mode where the cache itself becomes the trigger for an outage: the cache stampede, also…

  • Cache stampede occurs when multiple requests hit backend simultaneously after cache miss.
  • Probabilistic early expiration minimizes chance of many requests served from cache at stale moment.

More from Wednesday 7 October →