---
title: "High Availability by Offloading Work Into the Background"
description: "Moving slow, resource-heavy or error-prone work such as emails, image processing, webhooks and imports out of the request-response cycle into queued background jobs keeps application servers available and responsive."
url: "https://swe.quest/articles/high-availability-by-offloading-work-into-the-background-e2fbdc591d2490c8"
canonical: "https://shopify.engineering/high-availability-background-jobs"
source: "Shopify Engineering"
published: "2021-07-08"
difficulty: "medium"
kind: "Deep dive"
reading_minutes: 14
tags: ["messaging","resilience","ruby","scalability","consistency"]
---

# High Availability by Offloading Work Into the Background

A post on [Shopify Engineering](https://swe.quest/sources/shopify.md), published 2021-07-08, 14 min read, Deep dive. Original: [https://shopify.engineering/high-availability-background-jobs](https://shopify.engineering/high-availability-background-jobs)

## Summary

Moving slow, resource-heavy or error-prone work such as emails, image processing, webhooks and imports out of the request-response cycle into queued background jobs keeps application servers available and responsive. At Shopify that means tens of thousands of jobs per second and traffic spikes up to 170k requests per second. Task queues provide spike buffering, retries, parallelism, prioritization and scheduling, but they bring their own problems: breaking changes to job parameters during deploys, no exactly-once delivery (so jobs should be idempotent), non-transactional queuing (handled with the outbox pattern), local transactions and ordering (handled with SAGA), and long-running jobs that conflict with frequent deploys. Shopify addresses the last one with interruptible, resumable Active Job iteration that checkpoints progress.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Queues & messaging](https://swe.quest/tags/messaging.md) (Backend & APIs)
- [Resilience](https://swe.quest/tags/resilience.md) (Distributed systems)
- [Ruby](https://swe.quest/tags/ruby.md) (Languages)
- [Scaling](https://swe.quest/tags/scalability.md) (Distributed systems)
- [Consistency models](https://swe.quest/tags/consistency.md) (Distributed systems)

## Prerequisites

- web request-response cycle
- message queues ([easy posts on Queues & messaging](https://swe.quest/tags/messaging.md?difficulty=easy))
- database transactions ([easy posts on Databases](https://swe.quest/tags/databases.md?difficulty=easy))

## Keywords

Shopify, Sidekiq, Resque, Active Job, Redis, outbox pattern, SAGA pattern, Ruby on Rails

## Related posts

- [Keep the monolith, but split the workloads](https://swe.quest/articles/keep-the-monolith-but-split-the-workloads-a46b5ee6a5f1e352.md): incident.io · 2023-04-12 · Medium · 9 min read · Resilience, System design, PostgreSQL, Go, Microservices
  A Go monolith can get much of the reliability isolation of microservices by splitting workloads into separate deployments of the same binary, instead of breaking it into services.
- [Infrastructure patterns for agentic applications](https://swe.quest/articles/infrastructure-patterns-for-agentic-applications-ae04a737545ff7c9.md): Render · 2026-07-29 · Medium · 12 min read · AI agents, Resilience, Scheduling, Queues & messaging, System design
  Agents are long-running, stateful and non-deterministic, so running them inside an HTTP request handler breaks in production.
- [10 Tips for Building Resilient Payment Systems](https://swe.quest/articles/10-tips-for-building-resilient-payment-systems-94c9ade99576742c.md): Shopify Engineering · 2022-07-28 · Medium · 13 min read · Payments & fintech, Resilience, Observability, Incidents & postmortems, Ruby
  Ten lessons from Shopify's payment infrastructure for keeping payment systems reliable at scale.
- [How to Reliably Scale Your Data Platform for High Volumes](https://swe.quest/articles/how-to-reliably-scale-your-data-platform-for-high-volumes-d29cb64aded6f294.md): Shopify Engineering · 2020-12-08 · Medium · 9 min read · SRE, Capacity planning, Data pipelines, Scaling, Resilience
  Shopify's Data Platform Engineering team prepared Tier 1 and Tier 2 ingestion and query services for a forecast near-doubling of BFCM 2020 traffic with a five-step reliability process.
- [AI Changed How Spotify Builds. What We Learned (and Fixed) About Quality at Higher Velocity](https://swe.quest/articles/ai-changed-how-spotify-builds-what-we-learned-and-fixed-about-quality-at-higher-f3371ab51bf64587.md): Spotify Engineering · 2026-09-16 · Easy · 7 min read · SRE, AI for coding, Resilience, Capacity planning, Deployment
  Spotify's quality regressions during its AI ramp-up came not from AI-authored code but from change volume outpacing verification, plus AI-driven compute scarcity that made regional failovers visible to users.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
