Urgent.News

What's breaking now, across thousands of outlets.

Tech

WJb Resilient Actions: Designing Fault-Tolerant Background Jobs

Resilient Actions One night, Cron was generating jobs as expected. The queue was accepting them as expected. The Worker was running as expected. Then a single Action got stuck. As a result: Cron continued generating new jobs; the queue continued growing; other Actions stopped executing; the issue was resolved only after a restart. This is a classic example of how system reliability is determined…

Resilient Actions require careful design to handle failures gracefully. Cron, the queue, and Worker function correctly, but a single stuck Action brings the entire system to a halt. This highlights the importance of designing Actions to tolerate failures.

Every Action must anticipate failures, including network issues, database slowness, external API hang-ups, server restarts, and user cancellations. The system should always use CancellationToken to gracefully stop operations when needed. Waiting indefinitely without a cancellation token can cause irreparable damage.

Timeouts should be explicitly defined in the code, even when a CancellationToken is present. This ensures that operations do not hang forever, even if the resource does not respond promptly. Regular logging of key execution stages helps identify where the process stops if an Action becomes stuck.

Actions should be designed to be idempotent, meaning they can be safely retried without creating duplicate data or causing the system to fall into an inconsistent state. State should not be stored in memory but in a database, queue, or persistent state store to survive process restarts.

Large operations should be broken down into smaller, manageable Actions. This makes it easier to cancel, retry, and troubleshoot individual steps. After a timeout, the system must be verified to continue operating correctly. A good integration test includes simulating a stuck Action, a timeout, and ensuring the subsequent Action executes successfully, maintaining the queue's performance.

In essence, a resilient Action should have five key attributes: support for CancellationToken, defined timeouts, key execution stage logging, idempotency, and safe handling of re-execution. In an ideal world, failures would never occur, but in production, they are inevitable. A truly resilient Action ensures that the system continues to operate even after encountering failures.

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

CVE-2026-76269: Improper Access Control in Splunk Enterprise REST Search Job Retrieval

CVE-2026-76269: Improper Access Control in Splunk Enterprise REST Search Job Retrieval Vulnerability overview CVE-2026-76269 is rated 6.5 and classified as CWE-639, Authorization Bypass Through…

  • Unauthorized access to search job results via Splunk Enterprise REST API
  • CWE-639: Improper authorization check enabling job artefact access
  • Patches released in October 2026 security advisories SVD-2026-1001 and SVD-2026-1002

More from Friday 16 October →