Deployment
The process of making a software application available for use by moving it from a development or staging environment to a production environment.
Detailed Explanation
Deployment encompasses everything needed to make your application accessible to users: configuring servers, setting up databases, configuring DNS, setting up SSL certificates, configuring environment variables, and running the application. Modern deployment has evolved from manual server configuration to automated pipelines.
Deployment strategies include: manual deployment (SSH and run commands), CI/CD pipelines (automated on merge), infrastructure as code (Terraform, Pulumi), container orchestration (Kubernetes), serverless deployment (Vercel, Cloudflare Workers), and platform as a service (Heroku, Railway). The right strategy depends on your application's complexity, team size, and operational requirements.
Why It Matters
Deployment is how your code reaches users. A reliable, automated deployment process is essential for shipping updates safely and efficiently.
Real-World Example
A developer merges a pull request. GitHub Actions builds the app, runs tests, builds a Docker image, pushes it to a registry, and Kubernetes performs a rolling update—all within 5 minutes with zero manual intervention.
When to Use
Every code change that needs to reach users requires deployment. Automating this process reduces risk and accelerates delivery.
Advantages
- Automated pipelines reduce human error
- Rolling updates minimize downtime
- Rollback capabilities enable quick recovery
- Consistent environments from dev to prod
- Fast feedback on deployment issues
Disadvantages
- Infrastructure complexity requires expertise
- Deployment failures can cause downtime
- Database migrations require careful coordination
- Environment differences can cause bugs
- Monitoring and alerting are essential
Related Terms
Frequently Asked Questions
What is the difference between deployment and release?
Deployment is making code available in an environment. Release is making features available to users. You can deploy without releasing (using feature flags) and release without deploying (enabling a flag).
What is zero-downtime deployment?
Zero-downtime deployment ensures users experience no interruption during updates. Strategies include rolling updates, blue-green deployments, canary releases, and using load balancers to route traffic away from instances being updated.
How do I handle database migrations in deployment?
Run migrations as a separate step before deploying application code. Make migrations backward-compatible so the old application version can still work with the new schema. Split destructive changes into multiple deployments.
What is infrastructure as code?
Infrastructure as code (IaC) defines servers, networks, and resources in version-controlled configuration files. Tools like Terraform and Pulumi let you apply infrastructure changes with the same rigor as application code.
How do I rollback a bad deployment?
Use deployment strategies that support rollback: revert to the previous container image, switch traffic back in a blue-green deployment, or re-enable a feature flag. Always test rollback procedures before you need them.