To understand the terminology used on this page, it might be helpful to read through the architecture reference.
What is Metadata?
Metadata in Restate includes critical cluster coordination information:- Cluster membership: Which nodes are part of the cluster and their roles
- Partition assignments: How partitions are distributed across worker nodes
- Service deployments: Registered service endpoints and their versions
- Log configuration: How the replicated log is configured and which nodes participate
Metadata Storage Providers
Restate supports four metadata storage providers, each suited to different deployment scenarios:- Replicated (Default) - Built-in Raft-based consensus metadata server
- Etcd - External etcd cluster integration
- DynamoDB - Amazon DynamoDB
- Amazon S3 - We strongly recommend against using other S3-compatible stores for metadata
When to Use Each Provider
Replicated (Default)
The replicated metadata server uses Raft consensus to provide a highly-available metadata store built directly into Restate nodes. Use cases:- Standard production deployments
- On-premises or multi-cloud environments
- Deployments where you want minimal external dependencies
- Environments where you already run stateful services
- Nodes must run the
metadata-serverrole - Persistent storage for metadata server nodes
- Odd number of metadata-server nodes for quorum (typically 3 or 5)
- ✅ No external dependencies - everything runs within Restate
- ✅ Battle-tested Raft consensus for strong consistency
- ✅ Works in any environment (cloud, on-prem, hybrid)
- ⚠️ Needs careful attention to node placement for fault tolerance
- ⚠️ Requires manual provisioning after majority of nodes are up to avoid split brain (other backends safely support auto-provisioning in a multi-node cluster)
Etcd
Use an external etcd cluster as the metadata store. This is ideal if you already operate etcd infrastructure or prefer to centralize metadata management. Use cases:- Organizations with existing etcd infrastructure
- Environments with dedicated etcd operations expertise
- Multi-tenant deployments with centralized control
- External etcd cluster (v3.x) must be available
- Network connectivity between Restate nodes and etcd
- etcd cluster properly configured for production use
- ✅ Leverage existing etcd infrastructure
- ✅ Separate metadata concerns from Restate node management
- ✅ Allows sharing metadata across clusters
- ⚠️ Adds external dependency that must be separately managed
- ⚠️ Network latency to etcd can affect cluster operations
- ⚠️ Requires etcd operations expertise
DynamoDB
Use Amazon DynamoDB as a fully-managed metadata store. This simplifies operations by eliminating the need to run the stateful metadata role on your nodes. Use cases:- AWS-native deployments
- Serverless or fully-managed infrastructure preferences
- Deployments prioritizing operational simplicity
- Multi-region AWS deployments
- AWS account with DynamoDB access
- DynamoDB table created with correct schema
- IAM permissions:
dynamodb:GetItem,dynamodb:PutItem,dynamodb:DeleteItem - Low-latency network access to DynamoDB
- ✅ Fully managed - no metadata servers to operate
- ✅ Automatic scaling and high availability from DynamoDB
- ✅ It’s possible to use multi-region DynamoDB table for consistent global metadata resilient to regional outages.
- ✅ Native AWS integration
- ✅ Supports multi-cluster setups with key prefixes
- ⚠️ AWS-specific - not portable to other clouds
- ⚠️ Additional AWS service costs
- ⚠️ Network latency-sensitive operations
- ⚠️ Requires proper IAM configuration
Object Store (Amazon S3)
Use Amazon S3 as a metadata store. This provides a lightweight alternative to running metadata servers while keeping all data in object storage. Use cases:- AWS deployments with existing S3 infrastructure
- Minimizing stateful components
- Environments optimizing for S3 as primary storage
- Amazon S3 bucket (not S3-compatible alternatives)
- IAM permissions for S3 operations
- Very low-latency access to S3 (same region recommended)
- ✅ No metadata servers to manage
- ✅ Integrates with existing S3 buckets
- ✅ Simple backup and recovery
- ⚠️ Only Amazon S3 is tested and supported (notably, MinIO is not supported for metadata)
- ⚠️ Tied to a single region!
- ⚠️ Network latency to S3 directly affects cluster operations
- ⚠️ Must ensure very low-latency access (typically same region)
Configuration Examples
Replicated (Default)
This is the default configuration for multi-node clusters. Each node needs to know about all metadata server addresses.restate.toml
For fault tolerance, run metadata-server on an odd number of nodes (typically 3 or 5). To tolerate
n node failures, you need at least 2n + 1 metadata server nodes.Etcd
Configure Restate to use an external etcd cluster:restate.toml
DynamoDB
Configure Restate to use AWS DynamoDB as the metadata store. 1. Create the DynamoDB table:- A string partition key named
pk(this is the only required attribute) - Choose an appropriate billing mode for your usage (PAY_PER_REQUEST or PROVISIONED)
restate.toml
Multi-cluster support: Use the
key-prefix option to share a single DynamoDB table across multiple Restate clusters. Each cluster will use its own namespace within the table.Object Store (Amazon S3)
Configure Restate to use Amazon S3 for metadata storage:restate.toml
Migrating Between Providers
Restate supports migrating metadata from the replicated provider to external providers (etcd, DynamoDB, or object-store) using therestatectl metadata migrate command. This allows you to change metadata providers without losing cluster state.
Migration Process
Prerequisites
Before starting the migration:-
Target metadata store must be accessible and ready:
- DynamoDB: Table created with correct schema
- Etcd: Cluster running and accessible
- Object Store: S3 bucket created and accessible
-
Prepare target configuration:
- Have your target
[metadata-client]configuration ready in TOML format - Test connectivity from Restate nodes to the target store
- Have your target
-
Plan for downtime:
- All nodes will need to be restarted in migration mode
- Invocation processing will be paused during migration
Step-by-Step Migration
Restart all nodes in migration mode
Stop all cluster nodes and restart them with the
--metadata-migration-mode flag:In migration mode, only the Admin and MetadataServer roles are active. The cluster will not process invocations or serve requests until migration is complete and nodes are restarted normally.
Create target configuration file
Create a TOML file (e.g., For Etcd:For Object Store:
target-metadata.toml) with your target metadata client configuration:For DynamoDB:target-metadata.toml
target-metadata.toml
target-metadata.toml
Run migration command
Execute the migration using By default, the migration will fail if any keys already exist in the target store. To override existing keys:The migration command will:
restatectl:- Read all metadata from the replicated store
- Write it to the target store
- Verify the migration succeeded
- Display next steps
Update node configurations
Update the Also remove or comment out the
[metadata-client] section in all node configuration files with the target configuration:restate.toml
[metadata-server] section if present, as it’s no longer needed with external metadata providers.Troubleshooting Migration
Migration fails with “target keys exist”:- The target store already contains metadata keys
- Either use
--forceto override, or clean the target store first - Verify you’re not accidentally sharing a metadata store with another cluster
- Check that nodes are actually running in migration mode
- Verify network connectivity to both source and target stores
- Check Restate server logs for errors
- Verify all nodes have the updated
[metadata-client]configuration - Check IAM permissions for DynamoDB or S3
- Verify etcd cluster is accessible if using etcd
- Check server logs for connection errors
Related Documentation
- Cluster Configuration: Understanding Restate cluster deployments
- Architecture Reference: Deep dive into metadata architecture
- Server Configuration: Complete server configuration guide
- Configuration Reference: Detailed metadata client options
- AWS Deployment Guide: Deploying Restate on AWS
- Kubernetes Deployment: Deploying Restate on Kubernetes