Skip to main content
Restate lets you write workflows as regular code in your preferred programming language, with automatic resilience.

Workflows as code

Write resilient workflows using familiar programming constructs:
  • Automatically retry transient errors like infrastructure crashes and network failures
  • Use standard language constructs (if/else, loops) and durable versions of familiar building blocks (e.g., timers, promises)
  • Handle errors naturally with try/catch blocks and automatic retries
  • Test and debug with your existing IDE and standard development tools
export const userSignup = restate.workflow({
  name: "user-signup",
  handlers: {
    run: async (ctx: WorkflowContext, user: User) => {
      const userId = ctx.key; // unique workflow key

      // Use regular if/else, loops, and functions
      const success = await ctx.run("create", () => createUser(userId, user));
      if (!success) return { success };

      // Execute durable steps
      await ctx.run("activate", () => activateUser(userId));
      await ctx.run("welcome", () => sendWelcomeEmail(user));

      return { success: true };
    },
  },
});

Low-Latency Workflows

Restate is built from the ground up for low-latency workflow execution. Restate workflows can be placed directly in the latency-sensitive path of user interactions:
  • Lightweight execution: Workflows run like regular functions with minimal overhead
  • Event-driven foundation: Built in Rust for high-performance, low-latency operations
  • No coordination delays: Immediate workflow execution via a push-based model

Simple Deployment Model

Application Structure Restate Server: Restate is packaged as a single binary with built-in persistence and messaging. Run it as a single instance or in a high-availability cluster. Service Deployment: Deploy your workflows using your existing deployment pipeline: containers, Kubernetes, serverless functions, or any HTTP-capable platform. On FaaS, Restate suspends workflows while they are waiting (e.g. timer) to reduce costs.

Key Workflow Patterns

Query Workflow State

Store workflow state that survives crashes and can be queried from external systems

Event-Driven Coordination

Handle external events and signals without complex event sourcing infrastructure

Durable Timers and Scheduling

Long-running processes with built-in timer management and timeout handling

Flexible Activity Execution

Execute steps inline within the workflow or split them out into separate services

Parallelize Work

Speed up multi-step workflows with recoverable parallel tasks

Resilient rollback

Automatically undo previous actions when later steps fail

Comparison with Other Solutions

FeatureRestateTraditional Orchestrators
PerformanceLow-latency, lightweight executionHigh overhead, poll-for-work delays
LanguageNative code (TS, Python, Go, Java, Kotlin, Rust)DSLs or YAML
DevelopmentStandard IDE, testing, debuggingPlatform-specific tooling
InfrastructureSingle binary, no dependenciesSeparate databases and queues
Service DeploymentAny platform (containers, serverless, K8s)Worker-based deployment models
State ManagementBuilt-in K/V state storeExternal state stores required

Getting Started

Ready to build workflows with Restate? Here are your next steps:

Quickstart

Run your first Restate service

Hands-on Tutorial

Explore the APIs to build workflows with Restate

Examples

Explore templates, patterns, and end-to-end applications
Evaluating Restate and missing a feature? Contact us on Discord or Slack.