#
Docker Deployment Guide
#
Architecture Overview
The persistence system consists of two separate Docker containers:
- Engine container (writes command logs)
- Snapshotter container (generates snapshots and manages archival)
These containers must share access to the persistence volume, but can handle archived data separately.
#
Volume Configuration
#
Required Directory Structure
/app/persistence/ # Main persistence directory
└── archived/ # Archive subdirectory
#
Volume Considerations
- Engine requires read/write access to
/app/persistence
- Snapshotter requires read/write access to both
/app/persistence
and/app/persistence/archived
- Archived directory can optionally be mounted as a separate volume
#
Cloud Deployment Considerations
#
Storage Classes
Main persistence volume:
- Requires high IOPS
- Should use SSD-backed storage
- Example: AWS EBS gp3 or io2
- Size based on expected daily command log generation
Archive volume:
- Can use slower, cheaper storage
- Consider automated lifecycle policies
- Example: AWS EBS st1 or sc1
- Size based on retention requirements
#
Volume Management
volumes:
persistence:
driver: ebs # Example for AWS
driver_opts:
type: gp3
size: 100
iops: 3000
archive:
driver: ebs
driver_opts:
type: st1
size: 500
#
Operational Considerations
#
Process Flow
- Engine writes command logs to
/app/persistence
- Engine rotates to new command log periodically
- Snapshotter detects completed command logs
- Snapshotter generates new snapshot
- Snapshotter moves older files to
/app/persistence/archived
#
Latency and Throughput
- Engine implements write-ahead, persisting all commands before processing
- Persistence volume iops setting will impact latency.
- Higher iops will enable lower latency through the engine.
#
Monitoring
Monitor:
- Available space in both volumes
- Rate of command log generation
- Snapshot generation frequency
- Archive directory growth
#
Backup Strategies
- Archive volume can be backed up independently
- Consider point-in-time snapshots of the persistence volume
- Implement retention policies for archived data