Using Temporal for durable microservice workflows
Learn how Temporal uses event history and durable execution to eliminate reliability plumbing for microservices. Discover pricing details for Temporal Cloud, such as the Essentials plan starting at $100 for 1 million actions.
The Mechanics of Durable Execution
Temporal ensures business logic completes even if servers crash or networks fail. It uses event history as the source of truth to replay execution and resume from the last persisted state. This process relies on the separation of Workflows and Activities. Workflows orchestrate the process using features like timers, signals, queries, updates, and schedules. They must remain deterministic to allow for successful replay. Activities handle non-deterministic side effects such as database writes, API calls, or file uploads. Activities are stateless and include configurable timeouts.
Workers execute your code.
If your engineering team spends more than 20 percent of its total development time on reliability plumbing like manual retry logic, state tracking, or timeout management, Temporal eliminates that entire category of work for your entire organization.
Developers implement these workflows using official SDKs for Go, Java, Python, TypeScript, PHP, .NET, Ruby, or Rust. The platform supports complex patterns including fan-out/fan-in, child workflows, and sagas. In a saga pattern, the orchestrator manages compensation logic to undo operations if a service fails. A healthcare workflow might involve a Patient Service, a Scheduler Service, an Inventory Service, and a Billing Service. The Temporal Service dispatches work to workers via task queues.
Scaling Realities and Alternatives
Temporal gets complex at scale. Managing Cassandra is hard. The SQL backend does not support horizontally scaled replicas because of consistency requirements. Modifying code baked into workflows becomes complex, as anything that modifies the history event ordering breaks determinism in already deployed workers.
You should know that the Go SDK makes writing activities boilerplatey. It does not play well with the concurrency model of Go because goroutines must go through special workflows.Go.
Teams often look for alternatives when they encounter high costs or deployment constraints. Camunda provides visual modeling via BPMN and supports users in regulated industries. Netflix Conductor utilizes JSON-defined workflows to handle massive production loads. AWS Step Functions provides deep integration with Lambda and DynamoDB for teams in the Amazon ecosystem. Azure Durable Functions uses orchestrator and activity functions to run on serverless compute.
Which tool scales better for your microservices?
If your team works heavily with the JVM, you might prefer Akka or Camunda.
Many engineers encounter the reliability boilerplate trap when building bespoke state machines. This happens when a simple queue-based architecture fails to handle retries or deduplication. For teams wanting a lighter footprint, Restate uses a journal-and-replay mechanism similar to Temporal but is designed to be simpler to operate. DBOS runs as a lightweight library inside your existing application and ties your durability layer to Postgres. Cadence, the predecessor to Temporal, allows for similar stateful, fault-tolerant workflows but lacks the managed cloud offerings of Temporal.
Managed Services and Pricing Models
Temporal Cloud uses monthly fees and consumption-based pricing. It bills based on Actions, such as starting workflows, recording heartbeats, or sending signals. Pay-as-you-go pricing starts at $50 per million Actions.
| Plan | Monthly Fee | Included Actions | Active Storage | Retained Storage |
|---|---|---|---|---|
| Essentials | $100 | 1M | 1GB | 40GB |
| Business | $500 | 2.5M | 2.5GB | 100GB |
| Enterprise | Contact Sales | 10M | 10GB | 400GB |
The Essentials plan costs $100. This plan includes 1 million actions, 1 GB of active storage, and 40 GB of retained storage. The Business plan costs $500 and provides 2.5 million actions. It also includes SAML SSO and improved support response times.
Active Storage is billed at $0.042 per GBh after plan allocations. Retained Storage costs $0.00105 per GBh. Temporal Cloud imposes a 2 MB max payload limit for a single request and a 4 MB Event History transaction limit. The maximum limit for a Workflow Event History is 51,200 events or 50 MB. Companies with less than $30 million in funding can access the startup program, which provides $6,000 in credits.
Stripe, Snap, and Coinbase use Temporal in production.