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
- 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
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
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, 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:
- 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
1
Prepare target metadata store
For Etcd:For Object Store:
2
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.
3
Create target configuration file
Create a TOML file (e.g., For Object Store:
target-metadata.toml) with your target metadata client configuration:For Etcd:target-metadata.toml
target-metadata.toml
4
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
5
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.6
Restart all nodes normally
Stop all nodes running in migration mode and restart them with their updated configurations:Verify the cluster is healthy:
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 - 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