What is a deployment strategy?
A deployment strategy defines how a new application version is released to production while controlling downtime, risk, rollback, and user impact.
Questions 176-200: Deployment, Cloud Operations, SRE & Senior System Design Scenarios.
Open a question for the full answer, code and interview guidance.
A deployment strategy defines how a new application version is released to production while controlling downtime, risk, rollback, and user impact.
A rolling deployment replaces application instances gradually rather than stopping the entire fleet at once. During the rollout, old and new versions run simultaneously.
Blue-green deployment maintains two production-capable environments. One environment serves current traffic while the other receives the new version and is validated before traffic is switched.
Canary deployment releases a new version to a small percentage of production traffic or users before expanding exposure.
A feature flag separates feature activation from code deployment. The application can contain new code while configuration determines which users, tenants, or environments can use it.
A backward-compatible migration changes the database in a way that both the currently deployed application and the new application can operate during a staged rollout.
Application binaries can often be replaced quickly, but database changes may alter or destroy data and can be used concurrently by multiple application versions.
Containerization packages an application and its runtime dependencies into a portable image that runs in an isolated process environment.
Container orchestration automates deployment, scheduling, scaling, networking, health management, and replacement of containerized workloads across a cluster.
Infrastructure as Code defines infrastructure resources through version-controlled declarative or programmatic files rather than relying on manual configuration.
Immutable infrastructure replaces deployed instances with newly built instances instead of modifying them manually in place.
Horizontal autoscaling automatically changes the number of application instances according to workload or another signal.
Autoscaling one application tier does not create capacity in its dependencies. Adding web instances can increase pressure on a database, external API, connection pool, or shared cache and make the actual bottleneck worse.
An SLI is a quantitative measurement of service behavior that matters to users or system reliability. Examples include request success rate, availability, or the percentage of requests below a latency threshold.
An SLO is a target value or range for an SLI over a defined period. For example, an API might target 99.9% successful eligible requests during a rolling 30-day window.
A Service Level Agreement is a formal agreement describing expected service levels and may include contractual consequences when commitments are not met.
An error budget represents the amount of unreliability permitted by an SLO. If the SLO is 99.9% availability, the remaining 0.1% is the theoretical availability error budget for that measurement period.
Capacity planning estimates the resources required to meet expected traffic, data growth, performance targets, and failure scenarios.
Load testing measures system behavior under expected or elevated workload. It helps identify throughput limits, latency changes, resource saturation, and bottlenecks before production traffic exposes them.
Stress testing deliberately pushes a system beyond expected capacity to determine where it fails and how it behaves under extreme load.
Chaos engineering uses controlled experiments that introduce failures to validate assumptions about system resilience. Examples include terminating instances, injecting latency, or making a dependency temporarily unavailable.
A highly available design removes avoidable single points of failure and runs multiple application instances behind health-aware traffic distribution. Application instances should usually be stateless or keep shared state in resilient external stores.
Protect the system at several layers: use caching where responses permit it, rate or concurrency limits at the edge, horizontal scaling for stateless compute, and queues for work that does not require immediate completion.
Start with requirements and workload: catalog size, search traffic, order rate, payment flow, inventory consistency, geography, availability, and latency targets. Then identify bounded capabilities such as catalog, cart, ordering, payment, inventory, shipping, and notification.
Begin by clarifying functional requirements, non-functional requirements, scale, constraints, and the most important quality attributes. Estimate workload where useful, define the major data and API flows, and propose the simplest architecture that can satisfy those requirements.