All posts
Developers·· 10 min read

Background Jobs in Fintech: Sidekiq vs Temporal 2027

Sidekiq is fast, cheap, and fine — until a payment saga spans three microservices and Redis flushes at 2 a.m. Here's where we draw the line.

By AtlasForge Financial Editorial
Background Jobs in Fintech: Sidekiq vs Temporal 2027

Most fintech engineering teams reach for Sidekiq the way a carpenter reaches for a hammer: it's reliable, well-understood, and already in the box. At AtlasForge Financial, we ran Sidekiq in production for four years across our developer platform before we introduced Temporal for specific workflows in late 2025. By Q1 2027, roughly 18% of our background job volume runs on Temporal — not because Sidekiq failed us, but because a subset of our work finally outgrew what a job queue was ever designed to do.\n\nThis post is an honest account of that migration: the operational cost, the wins, and the two payment flows we moved first. If you're evaluating the same decision, these are the criteria that actually mattered.\n\n## What Sidekiq Gets Right (and Why We Still Use It)\n\nSidekiq processes roughly 2.4 million jobs per day across our infrastructure as of March 2027. The vast majority of those jobs — webhook fanouts, PDF statement generation, push-notification dispatching, fraud-score cache warming — are a perfect fit for a Redis-backed job queue.\n\nHere's what makes Sidekiq the right default:\n\n- Low operational overhead. A well-tuned Sidekiq deployment needs a Redis instance, a supervisor like Systemd or Kubernetes, and some queue-depth alerting. That's it.\n- Predictable latency. P99 job start latency on our largest queue is under 400 ms. Temporal's gRPC round-trip adds overhead that makes it a poor choice for anything that needs to feel synchronous.\n- Excellent observability out of the box. Sidekiq Pro's Web UI, combined with Datadog's Redis integration, gives us job throughput, retry rates, and dead-job counts without custom instrumentation.\n- Ruby-native ergonomics. Our backend is predominantly Rails. Sidekiq workers live next to the domain code they serve. The cognitive overhead is near zero.\n\nSidekiq's retry semantics — exponential backoff with a configurable maximum — handle the overwhelming majority of transient failure modes: a downstream API timeout, a momentary database lock, a brief Redis blip.\n\n> The honest heuristic: If your job can be described as "do X once, retry if it fails, and we can tolerate a duplicate if the worst happens" — Sidekiq is the right tool. Full stop.\n\n## Where Job Queues Break Down in Payment Systems\n\nPayment infrastructure introduces a class of problems that job queues handle poorly by design. The root issue is state. A Sidekiq job is a procedure, not a process. It executes, succeeds or fails, and disappears. Any state it accumulates lives in your database, your Redis instance, or nowhere.\n\nThat's fine until you need to model something like this:\n\n1. Initiate a payout to a partner bank via ACH.\n2. Wait up to 72 hours for a settlement confirmation webhook.\n3. If no confirmation arrives, query the bank's status API.\n4. If the bank reports a failed transfer, attempt a fallback to RTP.\n5. Log a reconciliation record and notify the end user.\n6. If that fails, escalate to our operations queue for manual review.\n\nThis is a saga — a long-running, multi-step workflow with conditional branches, external waits, and compensating actions. Implementing it in Sidekiq is possible but requires you to manually manage state transitions in your database, chain jobs with careful dependency logic, and write custom dead-letter handling for each failure branch. We did this for 18 months. The code was brittle, the on-call burden was real, and the failure modes were subtle.\n\nThe CFPB's supervisory guidance on payment system resilience and the Federal Reserve's FedNow operational standards both emphasize auditability and deterministic recovery — properties that are architecturally native to durable execution engines and architecturally awkward for job queues.\n\n## What Temporal Actually Gives You\n\nTemporal's core abstraction is the durable workflow: a function whose execution state is automatically persisted to a backing store (Temporal's own Postgres/Cassandra cluster, or Temporal Cloud) after every step. If your worker process crashes mid-workflow, execution resumes exactly where it left off when a new worker picks it up.\n\nThe practical consequences for the payout saga above:\n\n- workflow.Sleep(72 * time.Hour) is a real line of code. The workflow timer persists in Temporal's event history. No cron job, no polling worker, no "wake-up-at" column in your database.\n- Activity retries are declarative. You specify retry policy, backoff coefficients, and non-retryable error types in a struct. The engine enforces them.\n- The event history is the audit log. Every activity input, output, and timestamp is stored and queryable. Regulators and operations teams love this.\n- Signals and queries. External systems (like a bank webhook) can signal a running workflow to advance its state. No polling loop required.\n\nThe cost is real, though. Temporal requires a dedicated cluster (or Temporal Cloud at ~$0.19 per 10,000 workflow actions as of January 2027), Go or Java workers for performance-sensitive paths (our Temporal workers are Go; our Sidekiq workers remain Ruby), and meaningful investment in local development tooling — tctl, the Temporal UI, and replay testing.\n\n## The Two Payment Flows We Migrated First\n\n### 1. ACH Payout Reconciliation\n\nOur ACH payout flow was the canonical example of a saga grown too complex for Sidekiq. Before migration, we had seven distinct job classes, three database state machines, and a custom "saga coordinator" service that had become the scariest file in our codebase.\n\nAfter migrating to a Temporal workflow in November 2025:\n\n- Mean time to detect a failed payout dropped from 6.2 hours to 41 minutes, because the workflow now actively queries bank status rather than waiting for a webhook that might never arrive.\n- On-call pages related to "stuck payouts" dropped 83% in the six months following migration (November 2025 through April 2026).\n- The workflow definition itself — including all retry logic, fallback branches, and reconciliation steps — is 340 lines of Go. The equivalent Sidekiq implementation was spread across ~1,100 lines across nine files.\n\n### 2. Dispute Evidence Collection\n\nCard dispute workflows have a hard regulatory deadline: under Visa's core rules (October 2026 update), issuers must respond to a chargeback representment within 30 calendar days. Missing that window has direct financial consequences.\n\nWe previously managed dispute deadlines with a combination of Sidekiq-Cron scheduled jobs and a disputes table with a deadline_at column. The system worked until it didn't: a Redis failover event in February 2025 caused 14 disputes to miss their scheduled evidence-submission job. We caught 12 in time through manual review. Two were late.\n\nTemporal's durable timers made the deadline structurally unlosable. The workflow sleeps until 48 hours before deadline, runs a pre-flight checklist activity, and only proceeds to submission when evidence documents pass validation. If the worker fleet goes down and comes back up, the timer resumes. The deadline cannot be silently dropped.\n\n## Decision Framework: Which Tool for Which Job\n\nBased on two years of running both systems in production, here's how we make the call:\n\nUse Sidekiq when:\n- The job is self-contained and stateless (or its state lives entirely in your main database).\n- Failure means "retry and alert," not "compensate and rollback."\n- Job duration is under 60 seconds in the P95 case.\n- You need sub-second scheduling latency.\n- The team is small and operational simplicity is a hard constraint.\n\nUse Temporal when:\n- The workflow spans multiple services or external systems.\n- You need to wait on an external event (webhook, human approval, batch file) for hours or days.\n- A silent failure has regulatory or financial consequences.\n- You need a built-in, queryable audit trail of every step.\n- The compensating-action logic ("undo what we did if step 4 fails") is non-trivial.\n\nOne number that clarifies the calculus: according to Temporal's own benchmarks published in January 2027, Temporal Cloud can sustain 1,500 workflow starts per second on a standard namespace. That is not a job queue replacement — it's a workflow engine for the cases where workflow semantics matter.\n\nFor further reading on distributed systems patterns in financial infrastructure, the SEC's technology risk examination guidance for broker-dealers is a useful frame for why durable execution matters at the regulatory layer, not just the engineering layer.\n\n## Operational Considerations Nobody Talks About Enough\n\nA few things that surprised us after running Temporal in production for 18 months:\n\n- Versioning workflows is genuinely hard. Temporal's determinism requirement means you cannot change workflow logic in a way that would cause a replay of existing event histories to diverge. This requires explicit workflow.GetVersion() calls and careful deprecation planning. Budget time for this.\n- Local development parity matters more than you think. We run temporalite (Temporal's embedded server) in our Docker Compose stack. Without it, testing workflow behavior locally requires mocking in ways that defeat the purpose.\n- Worker fleet sizing is different. Temporal workers are long-polling gRPC clients. Worker count and task-queue partitioning require different mental models than Sidekiq's concurrency setting.\n- Cost is manageable but non-trivial. Our Temporal Cloud bill in February 2027 was $1,840 for ~9.7 million workflow actions. Sidekiq's Redis infrastructure for the same period cost $210. The Temporal cost is justified by the workflows it runs — but it would be absurd to route webhook fanout jobs through it.\n\nFor teams evaluating the AtlasForge Financial API as a payment infrastructure layer, these architectural decisions are increasingly relevant: our API surfaces Temporal-backed workflows for multi-step operations (payouts, disputes, ledger reconciliation) while keeping Sidekiq for high-throughput, low-stakes async work. You don't have to pick one paradigm — you pick the right paradigm per job class.\n\n## What We'd Do Differently\n\nIf we were starting over in 2027, we would:\n\n1. Define a written decision checklist (the framework above, or something like it) before writing a single line of Temporal code.\n2. Migrate the dispute workflow before the ACH reconciliation workflow — the deadline-safety property of durable timers is the most immediately legible win for non-engineers, and it builds organizational buy-in faster.\n3. Invest in Temporal UI access for the operations team on day one. Half the value of workflow auditability is wasted if ops can't see the event history without pinging an engineer.\n4. Run both systems side by side for at least 90 days before decommissioning any Sidekiq saga code. The edge cases surface slowly.\n\n## Start With the Right Foundation\n\nBackground jobs and durable workflows solve related but distinct problems. Sidekiq is not legacy technology — it is the correct tool for the majority of async work in a fintech stack, and we have no plans to change that. Temporal earns its operational cost on the specific class of workflows where implicit state management, long timers, and audit trails are architectural requirements rather than nice-to-haves.\n\nIf you're building on the AtlasForge Financial API and wrestling with payout reconciliation, dispute management, or multi-step ledger operations, our developer documentation covers how we've exposed these patterns as first-class API primitives — so you can get the durability guarantees without running your own Temporal cluster. Reach out via our contact page if you want to talk through architecture; we're candid about tradeoffs, including the ones that don't favor our own products.

Further reading

Ready to build on AtlasForge?

Get sandbox API keys in 60 seconds — or install the Safe to Spend 365 app.