proomt

Search

Search posts, papers, and topics

All posts

CanvaMikalai Barysau10 min readintermediate

Worker Backpressure (Part 1)

Summary

Canva added a lightweight, local backpressure loop to its queue worker library that monitors per‑message success/failure, computes a backoff factor against a configurable failure‑rate set‑point, and throttles the worker’s concurrency. In two real incidents the mechanism kept failure rates under 2 % fleet‑wide, limited DLQ growth to a handful of messages, and maintained throughput without manual i…

  • A per‑worker feedback loop (signals → controller → permits) can adaptively throttle workers without a central coordinator.
  • Using a configurable failure‑rate set‑point (e.g., 5 %) lets the system stay at full speed under normal conditions and back off only when errors exceed background noise.
  • The controller’s backoff factor is a single float (0.0‑1.0) that scales the number of concurrent polls, costing only two arithmetic ops per message.
  • Real‑world data: during a 4‑hour cloud‑provider outage, fleet‑wide failure peaked at 1.42 % and DLQ grew by 1 message; during a 32.5‑hour sustained overload, fleet‑wide failure peaked at 3.7 % and only 22 messages hit t…

At scale, greedy workers amplify downstream failures, causing cascading overload, DLQ storms, and on‑call fatigue. A self‑regulating backpressure mechanism protects shared dependencies, reduces noise in incident response, and preserves throughput without manual scaling or complex coordination.

8/10

Related reading

  1. How Uber Protects Against Retry Storms

    Uber developed a context-aware mechanism to prevent retry storms in deep microservice dependency chains. It introduces "error ownership" where services claim errors they originate and unclaim errors they propagate, allowing upstream callers to make informed retry decisions and avoid amplifying load on already struggling services.

    Hacker News front pageuber.com12 minHN11949
  2. Server Monitoring in the age of AI: What static thresholds miss and how adaptive monitoring fixes it?

    Static CPU/memory thresholds generate noise because workloads vary by time‑of‑day, day‑of‑week, and long‑term trends. Adaptive monitoring learns per‑server baselines (using simple ML on historic metrics) and creates dynamic thresholds plus anomaly alerts. ManageEngine OpManager’s Zia engine is presented as a turnkey AIOps solution that auto‑learns baselines, lets you set sensitivity, and adds ale…

    SitePointsitepoint.com6 min
  3. How Factory scaled its cloud backend to one billion monthly requests on Vercel

    Factory runs its entire SaaS backend on a single Next.js app deployed to Vercel, handling about a billion API requests per day with 350 ms p95 latency. They achieve this with Vercel’s Fluid compute to avoid cold starts, built‑in observability and WAF for security, and internal automation (“Droids”) that let non‑engineers deploy tools without extra infrastructure.

    Vercelvercel.com4 min