Deploy on Friday
The old adage 'Don't deploy on Friday' is an admission of failure. It means you don't trust your verification process. A robust CI/CD (Continuous Integration / Continuous Deployment) pipeline gives you the confidence to deploy any time, even 5pm on a Friday.
The Pipeline Stages
- Lint & Static Analysis: Catch syntax errors and style violations instantly.
- Unit Tests: Run the fast usage tests.
- Build: Compile assets, build Docker containers.
- Integration Tests: Spin up ephemeral databases and test flow.
- Deploy: Push artifacts to staging/prod.
Blue-Green Deployment
In this strategy, you have two identical environments: Blue (Live) and Green (Idle). You deploy your new version to Green. You test it. When ready, you flip the Load Balancer to point to Green. Blue becomes idle. If anything goes wrong, you instantly flip back. This enables **Zero Downtime Deployments**.
Canary Releases
Instead of switching everyone at once, you route 1% of your traffic to the new version. You monitor error rates (Sentry) and performance (New Relic). If stable, you ramp to 10%, then 50%, then 100%. This limits the 'blast radius' of a bad bug to a tiny fraction of your users.
Conclusion
Automate everything. If you are SSH-ing into a server to pull git changes, you are doing it wrong.