Restate Single-Node Server
Restate is a distributed workflow engine for stateful services that provides durable execution, reliable messaging, and state management out of the box.
Features
- Durable Execution: Automatically persist execution state and resume on failures
- Reliable Messaging: Built-in message delivery guarantees
- State Management: Strongly consistent state with minimal overhead
- Service Discovery: Automatic service registration and discovery
- Admin API: Rich API for monitoring and managing services
Quick Start
-
Copy environment file:
cp .env.example .env -
Start the service:
docker compose up -d -
Verify the service is running:
curl http://localhost:9070/health
Service Endpoints
- Ingress API:
http://localhost:8080- Main API for invoking services - Admin API:
http://localhost:9070- Management and monitoring API - Node Communication: Port 5122 (internal)
Environment Variables
| Variable | Default | Description |
|---|---|---|
RESTATE_VERSION |
1.5.3 |
Restate server version |
INGRESS_PORT_OVERRIDE |
8080 |
Ingress API port |
ADMIN_PORT_OVERRIDE |
9070 |
Admin API port |
NODE_PORT_OVERRIDE |
5122 |
Node-to-node communication port |
RESTATE_LOG_FILTER |
restate=info |
Log level (trace/debug/info/warn/error) |
TZ |
UTC |
Timezone |
Usage Examples
Deploy a Service
# Register a service endpoint
curl -X POST http://localhost:9070/deployments \
-H 'Content-Type: application/json' \
-d '{"uri": "http://my-service:9080"}'
List Deployed Services
curl http://localhost:9070/services
Invoke a Service
curl -X POST http://localhost:8080/MyService/myMethod \
-H 'Content-Type: application/json' \
-d '{"key": "value"}'
Data Persistence
Restate data is stored in the named volume restate_data. The server uses node name restate-1 for data consistency across restarts.
To reset the server and start fresh:
docker compose down -v
Resource Limits
- CPU: 0.5-2.0 cores
- Memory: 512MB-2GB
Adjust these limits in docker-compose.yaml based on your workload.
Monitoring
Check server health:
curl http://localhost:9070/health
View server metrics (Prometheus format):
curl http://localhost:9070/metrics
Documentation
License
This configuration is provided under the project's license. Restate is licensed under the Business Source License 1.1.
Notes
- For production deployments, consider using a Restate cluster for high availability
- Ensure the data directory is on durable storage in production
- The
--node-nameflag ensures consistent data restoration across restarts - For cluster deployments, see the restate-cluster configuration