This page explains the key concepts and architecture that make Restate applications reliable and resilient.

Application Structure

A Restate application consists of the following components: Application Structure

Restate Services

Your business logic lives in services: regular applications that embed the Restate SDK. Services contain handlers (durable functions) that process requests and execute business logic.
  • Deploy anywhere: Services run in your infrastructure as containers, serverless functions, VMs, or Kubernetes pods
  • Familiar programming model: Services look and feel like normal applications with added reliability by using the Restate SDK. Restate has SDKs for TypeScript, Java, Kotlin, Python, Go, and Rust.

Restate Server

The Restate Server sits in front of your services, similar to a reverse proxy or message broker. It handles incoming requests, manages service discovery, and provides durable execution capabilities. The server is a single binary written in Rust with a stream-processing architecture for low latency and high throughput. It can be deployed in a high-availability cluster or as a single-node instance.

Restate Cloud

Look at the options for Restate Cloud for a fully managed Restate deployment.

Invocations

An invocation represents a request to execute a handler. Restate tracks each invocation through completion, ensuring it runs exactly once regardless of failures. You can invoke Restate handlers over HTTP, Kafka, or programmatically.

Durable Execution

Restate’s core feature is durable execution: the ability to make any code execution reliable and fault-tolerant without changing how you write business logic.

How it works

Restate tracks every step of your code execution in a journal. When you call other services, update databases, set timers, or perform any side-effecting operation, Restate records both the operation and its result. If your function crashes or fails, Restate replays the journal, skipping completed steps and resuming from exactly where it left off. Durable Execution In this example, if sending the receipt fails, Restate automatically retries the function but skips the payment processing since it already completed successfully. Each step is recorded in the journal and won’t repeat on retry.
For a detailed technical walkthrough of the lifecycle of a request, read this guide.

What it covers

Restate’s implementation of Durable Execution protects your applications from common failure scenarios:

Resilient Communication

Beyond executing individual handlers reliably, Restate also ensures that communication between services is resilient.
communication
Restate proxies all communication towards and between services. It provides a resilient RPC framework:
  • Automatic retries and recovery: Failed calls are retried until they succeed
  • No duplicates: Same call won’t execute twice
  • Full observability: See all calls and call chains in the UI
  • No message queues needed: Restate handles message delivery

Consistent State

The Restate Server includes an embedded key-value store for persisting application state in Virtual Objects and Workflows. Virtual Objects Key characteristics:
  • Usage: Implement consistent state machines, session state, or agent context and memory.
  • Scoped per entity: Each Virtual Object and Workflow execution has its own isolated state.
  • Automatically journaled: State updates are recorded alongside execution steps for consistency. State is never out of sync with the execution.
  • Single-writer guarantee: Only one handler can modify state at a time, preventing race conditions.
  • Stateless services: The Restate Server stores all state and execution history, delivering them with each request. Your services remain stateless, can scale horizontally, and run stateful logic even on serverless platforms.
Learn more about when to store state in Restate vs. in a database with this guide.

Suspensions on FaaS

When running handlers on function-as-a-service platforms (FaaS), like AWS Lambda, Restate can suspend functions while they wait for external events (like user input or long-running tasks). For example, if a handler needs to wait for a user to approve an order, Restate can suspend the function until the user responds. This lets you run long-running workflows on FaaS platforms without paying for wait time.

Next Steps

Now that you understand the core concepts, dive deeper into how to build with Restate:
  • Services: Understand the three service types and when to use each
  • Handlers: Learn how to write handlers that take advantage of durable execution
  • Actions: Master the context helpers for state management, service calls, and timing control