Shift-Right
Định nghĩa
Test in production — observe real users, run experiments live.
Practices shift-right
- Feature flag rollout — gradual exposure (1% → 5% → 50% → 100%).
- Canary deployment — new version to 1 server, monitor.
- A/B testing — variant comparison.
- Chaos engineering — inject failure intentionally (Netflix Chaos Monkey).
- Synthetic monitoring — bot run critical user journey 24/7.
- Real user monitoring (RUM) — track actual user behavior.
- Error tracking — Sentry, Crashlytics capture exception.
- Distributed tracing — Jaeger, Honeycomb trace request flow.
Shift-right + shift-left = "test everywhere"
- Shift-left catch bug pre-prod.
- Shift-right catch bug prod-fast and recover.
- Loop: prod feedback → improve test → catch earlier.
SRE collaboration
QA + SRE/DevOps share on-call. Incidents → post-mortem → test added.
Production-safe testing
- Read-only: synthetic monitoring, RUM.
- Write but recoverable: test transaction marked as test (skip in reports).
- Destructive: chaos engineering chỉ trong "game day" scheduled.
VN context
Banking, payment app phải có shift-right vì regulatory không cho phép down dài. SBV expect MTTR < 1h.
Tools VN team dùng
- Sentry (error tracking).
- DataDog / NewRelic (APM).
- Grafana + Prometheus (metric).
- PagerDuty / Opsgenie (incident).