Operations
Monitoring
Key metrics to track:
| Metric | Description |
|---|---|
stratos_enrolled_users | Total enrolled users |
stratos_records_total | Total records stored |
stratos_subscription_connections | Active WebSocket subscriptions |
stratos_request_duration_seconds | XRPC request latency |
For create → index latency investigations also track:
record createdlogdurationMsandphases.prepareCommitBuildrecord createdlogbuildShare(commit-build contribution to total)high create-to-index lag observedwarnings instratos-indexer- Actor sync reconnect pressure (
max reconnect attempts, WebSocket close/error events)
Backup
bash
# Backup service database
sqlite3 /var/lib/stratos/data/service.sqlite \
".backup /backup/service-$(date +%Y%m%d).sqlite"
# Backup all actor databases
tar -czf /backup/actors-$(date +%Y%m%d).tar.gz \
/var/lib/stratos/data/actors/Scaling
For high-traffic deployments:
- Horizontal scaling — Run multiple Stratos instances behind a load balancer.
- Shared storage — Use network-attached storage for actor databases, or switch to the
postgresbackend. - Connection pooling — WebSocket subscriptions should be load-balanced by user DID so one instance handles all subscriptions for a given user.
- S3 blobs — Use the
s3blob storage backend to decouple blob storage from the instance.
Health Check
bash
curl localhost:3100/health
# {"status":"ok","version":"0.1.0"}Debug Logging
bash
STRATOS_LOG_LEVEL=debug pnpm startManual Enrollment Check
bash
curl "localhost:3100/xrpc/zone.stratos.enrollment.status?did=did:plc:abc"Test WebSocket Connectivity
bash
wscat -c "ws://localhost:3100/xrpc/zone.stratos.sync.subscribeRecords?did=did:plc:abc"