Temporal Fundamentals
Temporal is a platform for running application code that must survive crashes, restarts, and outages without losing its place. You write a normal program that can take seconds or months to finish, and Temporal records every step so that if the machine running it dies, another one resumes exactly where it stopped. It exists to replace the retry loops, state tables, and reconciliation jobs teams otherwise write by hand to make long, failure-prone processes reliable.
itDistributed systems, messaging, and integration | OpenSkills.info
Course pathWalk it in order
Look it upDip in anytime
Go furtherLeaves this page
Don't Panic
Don't Panic — Temporal Fundamentals
Here is the corridor version, the one a colleague gives you instead of the homepage. Temporal is a way to run a normal program so that if the machine running it falls over, another machine picks it up at the exact line where it stopped — whether that was one second ago or six months ago. That is the whole pitch. Everything else is bookkeeping.
The problem it solves is depressingly familiar. You have a process — pay someone, onboard someone, provision a server — that takes several steps, calls other services, and occasionally waits days for a human to click approve. To make that survive crashes by hand, you write a state table, retry logic at every call, a queue, a scheduler, and a reconciliation job. None of it is about the actual task, and you maintain it forever. Temporal takes that entire layer and makes it the platform's problem.
Two ideas carry the rest. First, you split your code in two. A Workflow is your process written as ordinary loops and conditionals; an Activity is any single step that touches the outside world, like calling an API or charging a card. Second — and this is the bit that surprises everyone — Temporal does not save a snapshot of your program's memory. It keeps an ordered Event History of everything that happened, and to recover it simply runs your Workflow code again from the top, replaying that history until it catches up.
That replay is where the plausible first guess goes wrong. Because the code is re-run, it must be deterministic: given the same history, it must make the same choices every time. So reading the clock, rolling a random number, or calling the network directly in Workflow code is forbidden — those return something different on the second run and the whole thing derails. Push anything like that into an Activity, which is not replayed. This also means editing a Workflow while it has runs in flight can break them, because old history and new code stop agreeing.
A couple of pieces of vocabulary lie to you if you let them. A "Workflow Task failure" sounds fatal but usually is not — it means one step could not be processed, the step retries, and a fixed redeploy resumes the run. That is very different from the business process itself deciding to fail. Treat the first as the second and you will throw away perfectly recoverable work.
So where should you go from here? The Intro tab is the real overview and the place to actually understand the architecture. The Cheatsheet is where you will live once things click, especially the table of what must never run in Workflow code. Field Notes covers the things that bite in production — chiefly that an Event History has a size ceiling and long-running loops need a trick called Continue-As-New before they hit it. And the Practice tab hands you the temporal command line so you can start a local service and watch a Workflow replay for yourself, which is worth more than any amount of reading.
Where this skill leads
Relevant careers
See how this topic contributes to broader role-level skill maps.
Sources
- https://docs.temporal.io/temporal
Supports
- What Temporal is
- durable execution
- Temporal Service as Temporal Server in Go plus a database
- Temporal Cloud as hosted SaaS
- Worker Processes host your code
- Workflow Execution runs exactly once to completion
- https://docs.temporal.io/evaluate/understanding-temporal
Supports
- Two halves your code and the Temporal Service
- Workflows are deterministic code
- Activities touch the outside world
- Retry Policy timeouts and heartbeats from configuration
- Standalone Activity as a job queue
- eight SDKs .NET Go Java PHP Python Ruby Rust TypeScript
- polyglot cross-language Workflows
- https://docs.temporal.io/evaluate/why-temporal
Supports
- What Temporal replaces retry loops state table queue scheduler reconciliation job
- Worker crash and replay resumes at the stopped line
- long processes that must complete or compensate
- https://docs.temporal.io/workflows
Supports
- Workflow Definition Type and Execution
- Commands and Events and Event History
- replay rebuilds state
- determinism requirement
- direct clock random and network calls differ on replay
- replay-safe time and randomness and timers
- durable Timer
- Signals Updates Queries Child Workflows
- https://docs.temporal.io/activities
Supports
- Activity is a single well-defined action with a side effect
- registered by name on a Worker
- non-deterministic and any library allowed
- idempotency recommended
- Retry Policy and automatic retry with backoff
- heartbeat checkpointing returns details to next attempt
- Local Activity trades durability for latency
- Standalone Activity started by a client
- https://docs.temporal.io/tasks
Supports
- Task is a unit of work for Workers
- three Task types Workflow Activity Nexus
- Workflow Task advances one step
- when Workflow Tasks are scheduled start signal update activity-complete timer child-complete retry
- Worker replays entire Event History
- Workflow Task failure vs Workflow Execution failure
- non-determinism causes Workflow Task failure and retries
- https://docs.temporal.io/workers
Supports
- Worker Program Entity and Process
- a Worker Entity polls one Task Queue
- Workers are stateless
- a single Worker can hold millions of open Workflow Executions bounded by update rate
- blocked Executions evicted and rebuilt by replay
- default Worker Identity process.pid at hostname and container caveats
- https://docs.temporal.io/task-queue
Supports
- Task Queue is a lightweight dynamically allocated queue
- Workers poll via synchronous RPC
- pull-based self-limiting
- load balancing across Workers
- Task Routing
- Workflow and Activity Tasks persist
- Workers connect out and need no inbound ports
- https://docs.temporal.io/sending-messages
Supports
- Signals are asynchronous one-way input
- Queries are synchronous read-only
- Updates send input run handler logic and return a result
- Signal-With-Start lazily initializes a Workflow
- Workflow Update manually enabled before v1.25.0
- https://docs.temporal.io/cli
Supports
- temporal CLI provides terminal access to a Temporal Service
- temporal server start-dev embedded development service
- official Cloud extension manages Namespaces users service accounts and API keys
- https://docs.temporal.io/temporal-service/temporal-server
Supports
- Temporal Server has four services Frontend History Matching Worker Service
- Frontend is a stateless gateway for routing rate limiting and auth
- History holds mutable state queues and timers
- Matching hosts Task Queues for dispatch
- History Matching and Worker Service scale horizontally
- https://docs.temporal.io/workflow-execution/limits
Supports
- Event History limited to 51200 events or 50 MB with a warning at 10240 events or 10 MB
- no limit on concurrent Executions
- maximum 2000 incomplete Activities Child Workflows Signals or Cancellation requests per Execution per type
- exceeding a pending-operation limit fails the Workflow Task which retries
- https://docs.temporal.io/workflow-execution/continue-as-new
Supports
- Continue-As-New checkpoints state and starts a fresh Workflow with the same Workflow ID a new Run ID and a fresh Event History
- used for long or large histories approaching limits and for versioning
- enables Entity Workflows that run forever
- https://docs.temporal.io/patching
Supports
- Patch defines a logical branch for a change like a feature flag
- applies code change to new Executions without disrupting in-progress ones
- patched() function behavior across replay and non-replay
- non-deterministic exception when a marker appears after the current execution point
- https://learn.temporal.io/
Supports
- Official Temporal Learning courses with language-specific hands-on tracks
- https://github.com/temporalio/temporal/releases/tag/v0.10.0
Supports
- First public Temporal Server releases in February 2020
- https://github.com/temporalio/temporal/releases/tag/v1.0.0
Supports
- Temporal Server 1.0.0 general availability on 2020-09-30
- https://github.com/temporalio/temporal/releases/tag/v1.25.0
Supports
- Temporal Server v1.25.0 line in September 2024 where Workflow Update is enabled by default
- https://github.com/temporalio/sdk-typescript/releases/tag/v1.0.0
Supports
- TypeScript SDK 1.0.0 general availability on 2023-08-04
- https://github.com/temporalio/sdk-go/releases/tag/v1.0.0
Supports
- Go SDK 1.0.0 general availability on 2020-09-30
- first production-supported SDK for Workflows Activities and Workers
- https://github.com/cadence-workflow/cadence
Supports
- Cadence open-source workflow platform from Uber since 2017
- Workflow-and-Activity model and Event-History replay Temporal inherited
- Temporal is a fork of Cadence
- https://temporal.io/cloud
Supports
- Temporal Cloud hosted Temporal Service so teams run only Workers
- introduced 2021
- https://temporal.io/
Supports
- Temporal as an open-source durable execution engine
- self-host or hosted Cloud
- https://aws.amazon.com/step-functions/
Supports
- AWS Step Functions managed orchestrator using a JSON state machine within AWS
- https://learn.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-overview
Supports
- Azure Durable Functions durable-execution layer over Azure Functions using replay and deterministic orchestrators
- https://conductor-oss.org/
Supports
- Conductor OSS workflow orchestrator separating a JSON workflow definition from hosted task workers
- https://restate.dev/
Supports
- Restate durable execution engine built around durable handlers and a single binary
- https://www.dbos.dev/
Supports
- DBOS durable execution library recording step state in Postgres without a separate stateful service
- https://www.inngest.com/
Supports
- Inngest event-driven durable execution platform with event triggers and checkpointed steps
- https://github.com/temporalio/awesome-temporal
Supports
- Community-curated index of Temporal libraries samples and resources grouped by SDK
- https://community.temporal.io/
Supports
- Temporal Community Forum for operational questions on versioning non-determinism and deployment
- https://github.com/alexandrevilain/temporal-operator
Supports
- Kubernetes operator to deploy and manage self-hosted Temporal clusters
- https://registry.terraform.io/providers/temporalio/temporalcloud/latest
Supports
- Terraform provider for Temporal Cloud managing Namespaces users and API keys
- https://github.com/indeedeng/iwf
Supports
- iWF higher-level workflow framework built on Temporal from Indeed
- https://github.com/temporalio/temporal-polyglot
Supports
- temporal-polyglot sample of Workflows in one language signaling or starting Activities in another
