OperationsEngineering
What this does: Defines how new model versions move safely from staging to production using a 2-week promotion cycle — ensuring zero-downtime updates and easy rollback if issues arise.
Environment Architecture
Promotion Lifecycle
Week 1: Staging (Integration)
- Deploy Candidate: Tag the release
v3.0.0-rc1. - Smoke Tests: Run critical path tests (
pytest -m smoke). - Performance Verification: Ensure inference latency < 200ms.
Week 2: Production (Go Live)
- Backup: Snapshot the current PostgreSQL metadata.
- Traffic Shift: In a Blue/Green setup, route traffic to the new containers.
- Monitoring: Watch
DriftDetectorlogs for immediate anomalies.
Scripts & Automation
We use tailored scripts to automate these risky operations.Rollback Procedure
If a critical failure is detected (e.g., Error Rate > 1%), execute an immediate rollback:- Revert Image: Point
docker-compose.prod.ymlback tov2.x.x. - Restore DB: If schema migration failed, restore from the pre-deploy backup.
- Restart:
docker-compose up -d --force-recreate.
