Choosing The Right Deployment Strategy

Learn about deployment strategies, serverless options like Knative, and best practices for monitoring, metrics, and rollbacks for successful application updates.

Key takeaways
  • Rolling updates are the first logical step when creating better applications, especially when using Kubernetes.
  • Rolling updates involve shutting down one replica of an application and replacing it with a new one, maintaining multiple replicas at all times.
  • Canary deployments are the next step once you master Prometheus metrics, alerts, and are confident in your monitoring.
  • Canary deployments involve progressively rolling out a new release by gradually increasing the percentage of traffic directed to it while monitoring metrics and thresholds.
  • Blue/green deployments assume you have too much money to spend and involve keeping the old release running while deploying a new one, redirecting traffic to the new release, and keeping the old release running as a fallback.
  • Serverless deployments are becoming popular but are not truly serverless as they still rely on managed servers.
  • Serverless deployments scale automatically based on demand, providing replicas as needed and eliminating the need to manage infrastructure.
  • Databases and hash implementations like Redis can use Flagger to implement Traffic Neroid for canary deployments.
  • Rolling back deployments can be challenging, especially with multiple replicas, and requires a firm grasp of monitoring, alerting, and metrics.
  • Health checks alone are not sufficient for making deployment decisions; they should include all Prometheus queries to ensure comprehensive monitoring.
  • Progressive rollouts without real mechanisms to decide when to continue or roll back can lead to problems.
  • Serverless deployments are cost-effective as they only use the resources they need, eliminating the need for excess capacity.
  • Knative is a popular framework for serverless deployments in Kubernetes, allowing for automatic scaling based on traffic and workload.
  • Recruit is a deployment strategy for stateful applications that cannot be updated without downtime.
  • Blue/green deployments are silly and expensive, requiring significant resources to maintain both the old and new releases.
  • Canary deployments are great when you’re confident that you’re not needed anymore, as they automate the deployment process based on metrics and thresholds.
  • Highly available deployments ensure that the application is always up and running, with no downtime during updates.
  • Responsive deployments ensure that the application responds quickly to user requests, without noticeable delays or performance issues.
  • Progressive rollouts gradually introduce new releases, allowing for controlled testing and monitoring before fully deploying the new version.
  • Rollback mechanisms are essential for reverting to a previous version of the application in case of issues or unexpected behavior.
  • Cost-effectiveness considers the resources and infrastructure required for each deployment strategy, ensuring that the chosen approach is financially viable.