Disclosure: I'm the founder of JoobQ, a self-hosted job queue and durable workflow engine. We talk to teams evaluating Temporal every week, and we regularly tell some of them to pick Temporal over us. This post is the exact tradeoff breakdown we share with them.
Most teams don't choose a workflow engine because they want a distributed systems project. They choose one because a multi-step job—charging a card, provisioning an account, sending a webhook, rolling back on failure—crashed halfway through a deploy and left production data in a half-baked state.
When engineering leaders look for a durable answer to that problem, Temporal is the default benchmark. And for good reason: Temporal's core abstraction—deterministic replay—is one of the most genuinely impressive pieces of infrastructure built in the last decade.
It is also one of the most expensive abstractions you can adopt, both operationally and cognitively. Before you commit your team to it, you should know exactly what deterministic replay buys you, what it charges you in return, and when an event-sourced saga engine like JoobQ Pro gets you the durability you need without the cluster tax.
1. What Deterministic Replay Actually Buys You
To critique Temporal fairly, you have to start with why engineers who run it in production love it.
In Temporal, you write workflows as ordinary imperative code—loops, if branches, local variables, await calls—rather than YAML or state-machine graphs. Under the hood, the Temporal Server records every workflow state transition as an append-only Event History. When a worker crashes, gets evicted from cache, or restarts during a deploy, another worker picks up the workflow task, fetches the Event History, and replays your workflow function from line one—feeding recorded results back in place of re-executing side effects—until it reconstructs the exact in-memory call stack and local variables where execution left off.
That model buys three things that are genuinely hard to replicate without it:
- Arbitrarily long durable sleeps. A workflow can call
sleep(30 days)or wait six months for an external signal. No thread or container stays pinned in memory; the History Service persists a durable timer in its internal Timer Task Queue, evicts the execution from worker memory, and wakes it up months later on whatever worker is alive then. - Exact mid-function resumption. Because the SDK replays the entire function to rebuild local state, you don't have to manually serialize intermediate variables into a database column between steps. Your stack frame is your state machine.
- Auditable, versioned execution history. Every activity scheduled, started, retried, or completed—plus every signal and timer—is captured in an immutable, inspectable ledger. You can take a failed production Event History, download it, and replay it locally in a debugger to reproduce the exact failure path.
If your domain truly requires workflows that behave like immortal, single-threaded processes living for weeks or years, deterministic replay is the cleanest programming model available.
2. The Cost Side (With Receipts)
The catch is that making imperative code look immortal requires heavy machinery underneath—and strict rules on top. Those costs show up in four places.
Persisting every state transition—and paying replay debt
Temporal does not just save "step 3 succeeded." A single activity execution generates a chain of lifecycle events (scheduled, started, completed, plus workflow task boundaries) persisted to the Event History.
- Hard history ceilings: Temporal caps a single Workflow Execution's Event History at 51,200 events or 50 MB, emitting warnings at 10,240 events or 10 MB (Workflow Execution Limits). Long-running or chatty workflows must explicitly checkpoint state and call
Continue-As-Newto start a fresh history chain (Continue-As-New). - Replay latency: Every event saved is future CPU and network work on cache miss or worker handoff. Splitting work into dozens of fine-grained activities or streaming high-frequency signals into a workflow compounds payload transfer and replay overhead.
- Cloud usage billing: If you offload operations to Temporal Cloud, pricing is metered per Action—starting at $50 per million Actions (scaling down to $25/M at higher self-serve volumes)—plus $0.042/GB-hour for Active Storage and $0.00105/GB-hour for Retained Storage (Temporal Pricing). At high throughput with chatty workflows, Actions accumulate faster than raw job counts because every activity, timer, signal, and child workflow triggers billable state transitions.
Concrete math: what 10M sagas/month actually costs
To see how Actions compound, take the 3-step OrderSaga from Section 3 (reserve → charge → wait_for("approve") with a 15-minute timeout → fulfill). On a clean happy-path run with zero retries, a single workflow execution generates 6 billable Actions in Temporal Cloud (Temporal Cloud Actions):
- 1 Action — Start Workflow Execution
- 3 Actions — Execute 3 Activities (
reserve,charge,fulfill) - 2 Actions — 1 Timer (approval timeout) + 1 Signal (
approve)
(Retries, heartbeats, and compensation steps add additional Actions; worker-side replay itself is not billed as Actions.)
Using Temporal's published Pay-As-You-Go and Business volume tiers—$50/M flat on Pay-As-You-Go, or $500/mo on Business (2.5M Actions included, then progressive tiers: $50/M for the first 5M, $45/M for the next 5M, $40/M for the next 10M, $35/M for the next 30M, and $30/M for the next 50M)—here is how monthly orchestration cost scales before Active ($0.042/GB-hr) and Retained ($0.00105/GB-hr) storage:
| Monthly Sagas (6 Actions/run) | Total Actions | Temporal Cloud (Pay-As-You-Go) | Temporal Cloud (Business Plan) | JoobQ Pro (Self-Hosted) |
|---|---|---|---|---|
| 2M sagas / mo | 12M | $600 / mo + storage | $952.50 / mo + storage | $149 / mo + Redis/compute |
| 5M sagas / mo | 30M | $1,500 / mo + storage | $1,637.50 / mo + storage | $149 / mo + Redis/compute |
| 10M sagas / mo | 60M | $3,000 / mo + storage | $2,650.00 / mo + storage | $149 / mo + Redis/compute |
(Sources: Temporal Cloud Pricing Docs and JoobQ Pricing & Benchmarks. Both options require you to run and pay for your own worker compute; JoobQ Pro additionally runs on your own Redis instance and single-container JoobQUI server.)
The cluster's moving parts and datastore
If you decide to self-host to avoid Action-based billing, you are not deploying a single binary next to Redis. A Temporal Server consists of four independently scalable services coordinated via Ringpop membership (Temporal Server Architecture):
- Frontend Service: Stateless gRPC gateway handling rate limiting, auth, routing, and worker polls.
- History Service: Partitioned into History Shards (which cannot be changed after cluster initialization without migration), managing mutable state, Event History persistence, and four internal queues—Transfer, Timer, Replicator, and Visibility.
- Matching Service: Hosts user-facing Task Queues and dispatches tasks to polling workers.
- Worker Service: Runs internal system and background workflows.
Backing those services requires a tuned persistence store (Cassandra, PostgreSQL, or MySQL) plus a Visibility index (Elasticsearch or SQL-backed Advanced Visibility), mTLS between nodes, and careful shard-count planning (Temporal Service Configuration). Running it reliably in production is a real infrastructure commitment.
NonDeterministicError in production
Because workers reconstruct state by re-running your current code against historical events, your workflow code must be strictly deterministic.
If a developer adds, removes, or reorders an activity call, timer, or child workflow—or accidentally introduces non-deterministic behavior inside workflow code—existing in-flight executions will diverge from their recorded history and fail workflow tasks with a non-determinism error (Versioning & Runtime Checking). Worse, runtime sanity checks vary by SDK and do not catch everything (such as changed input arguments or timer durations), which means safe deployments require maintaining a Replay Testing suite against captured production histories.
Patching and versioning workflow code
In a normal web app, you ship a bug fix and move on. In Temporal, you cannot safely deploy a structural change to a workflow while older executions are still open. You have two paths, and both add ceremony:
- Patching (
patched()/getVersion): You guard new code paths behind version branches—essentially permanent-until-drained feature flags—following a three-step deploy lifecycle: addpatched("my-patch"), wait until all pre-patch executions close, deploydeprecate_patch("my-patch"), wait again, then delete the branch (Patching, Python Versioning). Even ordering matters: placing an older patch check ahead of a newer one can silently route executions down stale branches or trigger non-determinism errors. - Worker Versioning: You tag workers with Deployment Versions so old workers keep draining old executions while new workers pick up new ones (Worker Versioning). That eliminates code-level
if patched()clutter, at the cost of operating multiple concurrent worker fleets until long-lived runs finish.
None of this is a flaw in Temporal—it is the unavoidable physics of deterministic code replay. The question is whether your workloads actually need to pay that physics tax.
3. How JoobQ Pro's Event-Sourced Sagas Work Instead
Most production workflows aren't six-month state machines with arbitrary branching. They are bounded, multi-step business transactions—onboarding a tenant, processing an order, syncing a billing state, running a fan-out pipeline—where you need:
- Typed steps with explicit dependencies and randomized-backoff retries
- Automatic rollback (compensations) when a downstream step fails
- Pause/resume for webhooks, human approvals, or timers
- Survivable state across worker crashes, without operating a 4-service cluster
JoobQ takes a different architectural bet: start with an MIT-licensed, high-throughput Redis job queue, and layer JoobQ Pro on top when you need durable orchestration. Instead of forcing your application runtime to deterministically replay arbitrary imperative call stacks, the engine conducts a declarative workflow graph and folds its state from an append-only event history in Redis.
How execution works under the hood
- Declarative steps, ordinary worker code. Your step handlers are normal functions—native Crystal jobs, or thin SDK workers in Python, TypeScript, Ruby, Go, Rust, Java, PHP, .NET, or Elixir talking to the self-hosted JoobQUI SDK gateway (your polyglot workers never touch Redis directly).
- Engine-conducted state transitions. The
joobq-proengine owns step ordering, dependency resolution, retries, signals, timers, queries, child workflows, and workflow timeouts. Every state transition is appended to the run's Redis history, so if any worker dies mid-step, the run survives and resumes from the last committed step. - First-class Saga compensations. Each step can declare a compensating action bound to its output. When a later step exhausts retries or the workflow is canceled, the engine automatically runs compensations in reverse order (newest first). (You can watch a live failure + compensation run—and inspect the audit log—in the interactive browser simulation at www.joobq.io/console.)
- Minimal operational footprint, flat pricing. One Redis instance (which most teams already run), your workers, and a single self-hosted JoobQUI container with live WebSocket triage, time-travel event history, RBAC, OIDC SSO, TOTP 2FA, and an immutable audit log—with zero payload data leaving your VPC. The core queue and SDKs are free forever; Pro is licensed flat per deployment ($149/mo) rather than metered per Action (www.joobq.io).
Real code: Crystal Engine & Polyglot SDK API
Native Crystal Workflow (src/workflows/demo/):
require "joobq" require "joobq_pro" module Demo # Step 1: Reserve inventory struct ReserveInventory include JoobQ::Job @queue = "orders" @retries = 3 property order_id : String property sku : String property quantity : Int32 def initialize(@order_id, @sku, @quantity) end def perform reservation_id = InventoryService.reserve(@order_id, @sku, @quantity) {reservation_id: reservation_id, sku: @sku, quantity: @quantity} end end # Compensation for Step 1: Release inventory if a downstream step fails struct ReleaseInventory include JoobQ::Job @queue = "orders" @retries = 5 property reservation_id : String def initialize(@reservation_id) end def perform InventoryService.release(@reservation_id) {released: true, reservation_id: @reservation_id} end end # Step 2: Charge payment method struct ChargePayment include JoobQ::Job @queue = "billing" @retries = 3 property order_id : String property reservation_id : String property amount_cents : Int64 def initialize(@order_id, @reservation_id, @amount_cents) end def perform charge_id = BillingService.charge(@order_id, @amount_cents) {charge_id: charge_id, status: "captured"} end end # Compensation for Step 2: Refund payment if approval times out or fails struct RefundPayment include JoobQ::Job @queue = "billing" @retries = 5 property charge_id : String def initialize(@charge_id) end def perform BillingService.refund(@charge_id) {refunded: true, charge_id: @charge_id} end end # Step 3: Fulfill order after human/webhook approval struct FulfillOrder include JoobQ::Job @queue = "fulfillment" @retries = 3 property order_id : String property reservation_id : String property charge_id : String def initialize(@order_id, @reservation_id, @charge_id) end def perform ShipmentService.dispatch(@order_id, @reservation_id, @charge_id) {dispatched: true} end end # Declarative Saga Blueprint # If `charge` fails, `release` runs automatically. # If `approve` times out or `fulfill` fails, `refund` then `release` run in reverse order. OrderSaga = JoobQ::Pro.workflow("order-saga") do step "reserve", ReserveInventory, input: { order_id: input(:order_id), sku: input(:sku), quantity: input(:quantity), }, compensate: compensation( ReleaseInventory, input: {reservation_id: ref("steps.reserve.output.reservation_id")} ) step "charge", ChargePayment, after: ["reserve"], input: { order_id: input(:order_id), reservation_id: ref("steps.reserve.output.reservation_id"), amount_cents: input(:amount_cents), }, compensate: compensation( RefundPayment, input: {charge_id: ref("steps.charge.output.charge_id")} ) wait_for "approve", after: ["charge"], timeout: 15.minutes step "fulfill", FulfillOrder, after: ["approve"], input: { order_id: input(:order_id), reservation_id: ref("steps.reserve.output.reservation_id"), charge_id: ref("steps.charge.output.charge_id"), } end end # Enqueue a run: # run = Demo::OrderSaga.start( # order_id: "ord_9f8a2c", # sku: "PRO-LICENSE", # quantity: 1, # amount_cents: 14_900_i64 # ) # # Deliver the external signal (e.g., from a webhook or JoobQUI console): # JoobQ::Pro.signal(run.id, "approve", {approved_by: "ops@company.com"}) Polyglot SDK Blueprint (Python excerpt):
Workers in Python—or any of the other 8 SDK languages—register the same workflow as a typed blueprint over the JoobQUI gateway (Workflow Docs):
from joobq import Worker, wf, input, output, compensation worker = Worker( gateway_url="https://joobqui.internal.company.com", api_key="jq_live_...", queue="orders", ) def reserve(payload: dict) -> dict: reservation_id = inventory_service.reserve( payload["order_id"], payload["sku"], payload["quantity"] ) return {"reservation_id": reservation_id} def release(payload: dict) -> dict: inventory_service.release(payload["reservation_id"]) return {"released": True} def charge(payload: dict) -> dict: charge_id = billing_service.charge( payload["order_id"], payload["amount_cents"] ) return {"charge_id": charge_id} def refund(payload: dict) -> dict: billing_service.refund(payload["charge_id"]) return {"refunded": True} def fulfill(payload: dict) -> dict: shipment_service.dispatch( payload["order_id"], payload["reservation_id"], payload["charge_id"] ) return {"dispatched": True} order_saga = ( wf("order-saga") .step( "reserve", reserve, input={ "order_id": input("order_id"), "sku": input("sku"), "quantity": input("quantity"), }, compensate=compensation( release, input={"reservation_id": output("reserve", "reservation_id")}, ), ) .step( "charge", charge, after=["reserve"], input={ "order_id": input("order_id"), "reservation_id": output("reserve", "reservation_id"), "amount_cents": input("amount_cents"), }, compensate=compensation( refund, input={"charge_id": output("charge", "charge_id")}, ), ) .wait_for("approve", after=["charge"], timeout=900) .step( "fulfill", fulfill, after=["approve"], input={ "order_id": input("order_id"), "reservation_id": output("reserve", "reservation_id"), "charge_id": output("charge", "charge_id"), }, ) ) worker.register_workflow(order_saga) if __name__ == "__main__": worker.run() Performance & footprint
Because JoobQ doesn't pay the serialization and replay overhead of a 4-service orchestration cluster, its baseline footprint is small enough to run the entire stack on a single modest box.
In our published SDK gateway benchmarks, we ran the JoobQ server (Crystal 1.22.2 release build, CRYSTAL_WORKERS=4), Redis 7, PostgreSQL 16, 8 producer threads, and the worker processes all inside one shared 4-core / 16 GB container (no-op handlers, 8 concurrent tasks per worker process, median of 3 runs):
| Worker | Processes | Drain (jobs/s) | Enqueue (jobs/s) | p50 Latency | p99 Latency |
|---|---|---|---|---|---|
| Go (SDK Gateway) | 1 / 4 | 2,656 / 5,595 | 3,557 / 3,882 | 7 ms / 7 ms | 9 ms / 10 ms |
| Python (SDK Gateway) | 1 / 4 | 2,680 / 5,234 | 3,455 / 3,515 | 7 ms / 7 ms | 8 ms / 9 ms |
| Java (SDK Gateway) | 1 / 4 | 2,099 / 3,218 | 2,970 / 3,646 | 7 ms / 7 ms | 15 ms / 14 ms |
| TypeScript (SDK Gateway) | 1 / 4 | 1,898 / 3,114 | 3,247 / 2,524 | 7 ms / 7 ms | 13 ms / 15 ms |
| Crystal (Direct Redis) | 1 / 4 | 6,436 / 14,213 | 22,372 / 20,559 | 41 ms / 40 ms | 91 ms / 90 ms |
(Source: JoobQ Gateway Benchmarks — One Server Instance. Enqueue rates reflect single-job audited HTTP calls without enqueue_many batching. Direct Redis latency reflects the Crystal worker's own polling interval rather than gateway overhead.)
What these numbers mean—and what they don't:
- Sub-15 ms gateway overhead: Across all four SDK languages, end-to-end latency from enqueue to
job.completedstayed between 6–8 ms at p50 and 8–15 ms at p99 (driven mostly by the SDK's 5 ms outcome-batching window after moving to notification-woken long polls). - Single-box saturation: Above ~5,000–5,600 jobs/s through the gateway, the shared 4-core container ran out of CPU across the server, Redis, and workers combined.
- Honest caveats: As noted on the benchmarks page, these runs used no-op job handlers—not multi-step saga workflows (which add a workflow task and per-step heartbeats)—and did not include TLS, cross-host network hops, or a load balancer. The benchmark harness is also not yet published as a standalone public repo, so treat these figures as order-of-magnitude gateway baselines rather than a production SLA.
Cost footprint at scale:
Because JoobQ Pro is licensed flat per deployment rather than metered per state transition, the economic curve looks very different from Action-based cloud pricing:
| Workload Profile | Temporal Cloud (Actions Only) | JoobQ Pro (Self-Hosted) |
|---|---|---|
| 10M Actions / month (e.g. ~1M–2M multi-step sagas) | ~$500/mo + active/retained storage (Temporal Pricing) | $149/mo flat license + your existing Redis/compute (joobq.io) |
| 50M Actions / month (e.g. ~5M–10M multi-step sagas) | ~$2,500/mo (or lower at volume tiers) + storage | $149/mo flat license + your existing Redis/compute |
What JoobQ Does Not Give You
Tradeoffs only matter if you state both sides plainly. Choosing JoobQ Pro over Temporal means explicitly giving up:
- Arbitrary imperative control flow as durable state. In Temporal, you can write a
whileloop with dynamic local variables, nested conditionals, and ad-hocPromise.racepatterns and have the runtime preserve the exact stack frame. In JoobQ's blueprint/graph model, dynamic control flow must be expressed explicitly via steps, branches, signals, or child workflows. - Multi-month / multi-year sleep economics on disk. Because JoobQ Pro stores active workflow histories in Redis, keeping hundreds of thousands of workflows parked for 9 months waiting on human sign-offs is a poor fit for an in-memory datastore.
- A battle-tested multi-region active/passive replication engine. Temporal has years of enterprise hardening around multi-cluster replication, cross-namespace Nexus calls, and massive-scale shard distribution. JoobQ is built for teams that want fast, self-hosted simplicity and predictable flat-rate licensing rather than a planetary-scale orchestration cluster.
4. When to Use What
Engineering decisions shouldn't be ideological. Here is the plain decision matrix:
| Dimension | Temporal | Oban / Oban Pro | JoobQ / JoobQ Pro |
|---|---|---|---|
| Core Model | Deterministic code replay over Event History | Transactional job queues & workflows on Postgres | High-throughput Redis queues & event-sourced sagas |
| Infrastructure | 4-service cluster + Cassandra/SQL + Visibility (or Cloud) | Existing PostgreSQL database | Redis + optional single self-hosted JoobQUI container |
| Languages | Polyglot (Go, TS, Python, Java, .NET, PHP, Ruby, Rust) | Elixir / BEAM only | Crystal native + 9 SDK languages via gateway |
| Pricing Model | OSS self-hosted, or Cloud per-Action + storage | OSS core; flat commercial license for Pro | MIT core ($0); flat per-deployment license ($149/mo Pro) |
Use Temporal when…
- Your workflows sleep for weeks or months awaiting human sign-offs, regulatory windows, or subscription billing cycles.
- Your business logic is genuinely complex, long-lived, and imperative—where expressing it as a DAG or saga graph turns clean code into spaghetti.
- You have the budget for Temporal Cloud (and predictable Action volume) or a dedicated platform team comfortable operating a sharded, multi-service cluster and enforcing replay tests in CI.
Use Oban (and Oban Pro) when…
- You are running an Elixir monolith on PostgreSQL.
- Transactional job insertion matters most—you want to insert a job inside the exact same Postgres transaction as your Ecto domain write so you never suffer dual-write drift.
- You don't need polyglot workers and want zero extra infrastructure beyond the database you already back up and monitor.
Use JoobQ Pro when…
- You want high-throughput background jobs and durable sagas in one stack without graduating to a 4-service orchestration cluster.
- Your team is polyglot (e.g., Python ML services, TypeScript APIs, Go workers) and wants a single self-hosted console with RBAC, SSO, audit logs, and flat-rate licensing where zero payload data leaves your VPC.
- Your workflows are bounded business transactions (seconds to days, not years) where explicit step graphs and automatic reverse-order compensations are a feature, not a constraint.
Try It Without Spinning Up a Cluster
If you're weighing whether your workloads actually need deterministic replay, you can evaluate JoobQ in under five minutes at www.joobq.io:
- Watch a saga roll back in your browser: Try the interactive operator console demo at www.joobq.io/console (click Failure + saga compensation or Happy path + signal approval).
- Read the workflow engine docs: See how steps, compensations, signals, and polyglot SDKs work at www.joobq.io/docs/develop/workflows/.
- Start with the MIT core: Run the open-source queue locally with zero lock-in, and add JoobQ Pro only when you need sagas and the console.
If you've run Temporal in production (self-hosted or Cloud): what was the moment you knew it was worth the operational overhead—or the moment you wished you'd used something simpler? Drop your stories in the comments.
