Urgent.News

What's breaking now, across thousands of outlets.

Tech

Advanced Webhook Operations & Resiliency: Architecture Patterns for Production Engineers

Webhooks are the main way SaaS platforms, payment processors and internal microservices tell other systems that something happened. At a few thousand events a day, a loop that POSTs to a URL and retries on failure is enough. At hundreds of millions of events a day, the same loop turns small outages into large ones. Retries pile up, healthy customers get starved by unhealthy ones, and the…

Webhooks enable SaaS platforms, payment processors, and microservices to notify other systems of events. While a few thousand daily events can be handled with a simple POST loop and retry on failure, hundreds of millions of events daily require more sophisticated approaches. At high volumes, retries can exacerbate problems, causing small outages to turn into large ones.

This guide explores four key areas of production webhook operations: adaptive backoff combined with per-endpoint circuit breakers, preventing retry storms and cascading failures, zero-downtime migration of delivery infrastructure and payload schemas, and managing header bloat and request-size limits of reverse proxies and load balancers.

The examples provided include illustrative values for timeouts, thresholds, and cooldowns, which should be adjusted based on specific traffic patterns. The guide breaks down the response types and their likely causes, as well as suggested actions:

1. HTTP 429 (Too Many Requests): If a consumer or its gateway implements rate limiting, honoring the Retry-After header (either as seconds or an HTTP date) and pausing delivery to that endpoint is crucial. If the header is missing, a steeper backoff multiplier should be used compared to a 5xx response.

2. HTTP 5xx (Server Errors): The consumer is likely crashing, deploying, or out of database connections. Fast retries can add unnecessary load to a system trying to recover. Short client timeouts and immediately scheduling the request for later retry can help.

3. Timeouts and Connection Resets: These indicate the consumer is slow, overloaded, or unreachable. Keeping client timeouts short and quickly releasing workers are essential strategies in this scenario.

4. Bad Requests (4xx): These are often transient and not worth retrying quickly. Dead-lettering after a few attempts or retrying slowly may be more appropriate, especially during consumer deployments.

For production webhooks, full jitter is recommended as it spreads out retries by choosing a random delay between 0 and the capped exponential ceiling. This avoids synchronized retries that could trigger rate limiting or IDOR vulnerabilities. A Redis-backed circuit breaker per endpoint, or per consumer domain, can prevent retry storms and cascading failures when one endpoint fails repeatedly.

In the closed state, events are dispatched normally; in the open state, events are skipped and placed in a delayed retry queue; and in the half-open state, one probe request is sent before deciding to reopen or remain open.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Four bugs that cost me 40 test games writing a tank bot for battle.training

battle.training is an arena where AI coding agents write a JavaScript controller, upload it, and their bots fight on a ladder 24/7.

  • Four bugs hindered tank bot's progress in battle.training arena
  • Swallowed exception caused matches to complete despite crashes
  • Fixed-point Q16.16 numbers led to inaccurate range checks

Normal Maps Without Extra Geometry: A Practical Texture Workflow

A normal map adds surface detail by changing how lighting responds to a surface, without changing the mesh silhouette. It stores surface directions as color values, which a material uses when…

  • Normal maps simulate surface detail without altering mesh geometry
  • Generate and inspect normal maps in 2D preview to detect artifacts
  • Ensure UV layout and scale consistency between source texture and maps

How to find a contact email for a list of company websites (free Python script, no API keys)

Disclosure: I build and sell a paid Apify Actor that automates this workflow. It's mentioned at the end as one option. Everything else here works with free tools.

  • Free Python script locates contact emails for 200+ websites without API keys
  • Script scans homepage, /contact, /about, /impressum pages for 'contact', 'impressum', etc.
  • Extracted emails filtered to company domain, saved in CSV file contacts.csv

More from Wednesday 28 October →