Urgent.News

What's breaking now, across thousands of outlets.

Tech

Failed Job Queue Retries: Rate Limits, FIFO, and Idempotency

Use an idempotency ledger and one authoritative rate limit before choosing a queue for retrying failed jobs. The comparison among SQS Standard, SQS FIFO, Cloud Tasks, and Redis/BullMQ matters, but none of those delivery modes can prove that a downstream side effect happened exactly once. The deciding constraint is where the irreversible work lives. A message can be delivered again after a worker…

When retrying failed jobs under rate limiting, it is essential to establish a clear boundary for downstream allowances. While workers can handle retries locally, separate instances may face challenges due to distinct clocks and shared quotas. To address this, a rate limiter should be placed in a component that oversees the entire limit, or a dispatcher should be used with a configured rate representing the overall limit.

Before making any side effects, the system should record the attempt. Retries should have a single owner to avoid creating multiple calls during the process.

When considering different queue modes, it is crucial to understand their impact on the system. Standard queues are suitable for independent work that can be duplicated or reordered, while FIFO queues are ideal for work requiring order within a specific entity group. HTTP task dispatchers are beneficial when there is a need for centralized control over the dispatch rate and concurrent delivery. Redis-backed job queues combine the data store, worker runtime, and capacity planning within the application's operating surface.

Key considerations for failure handling include tolerating duplicate and reordered messages for standard delivery, ensuring meaningful order within an entity group for FIFO delivery, and identifying a single authoritative dispatcher for the target's quota. The durable idempotency key and the ledger must be implemented using a data store with uniqueness rules to record job operations accurately.

To evaluate the performance of different queue modes, it is essential to run failure injection tests. These tests should mimic various failure scenarios, such as downstream call refusals, timeouts, and worker exits. By asserting the final ledger state, number of external calls, total attempts, job age, and terminal result reasons, teams can ensure that the chosen queue mode aligns with their specific requirements and provides the desired level of reliability and performance.

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

Fifty tools, none of them talk to each other

There is a pattern in how small utility sites die. They start as one page that does one thing well. Then someone adds an account, because accounts mean retention.

  • Single-page tools focus on one job, eliminating complexity.
  • No accounts or uploads simplify maintenance and enhance privacy.
  • Advertisements support maintenance while maintaining user trust.

115-Million-Year-Old Blood and the Case for Walking Inside Molecules

115-Million-Year-Old Blood and the Case for Walking Inside Molecules My grandmother kept a shoebox of things that shouldn't have survived: a dried corsage from 1962, a train ticket from a town that no…

  • Scientists confirmed ancient blood in 115-million-year-old dinosaur bones.
  • Biochemist visualized hemoglobin structure at molecular scale.
  • Educational software enables exploration of unseen molecular worlds.

One thousand pages, no database

Five sites, about a thousand pages, no CMS, no database, no build server beyond a script that runs on my laptop. That sounds like a boast.

  • Website consists of five separate sites totaling 1,000 HTML documents
  • No content management system or database used, only static files
  • Author manually generates sitemap to prevent silent errors

More from Tuesday 10 November →