Aug 10, 2022 by Parth Srivastav
Autoscaling, which helps to optimize utilization and minimize costs, is one of the most important aspects of cloud computing. Autoscaling dynamically allocates resources to your cloud application based on load. It handles bursts of load and traffic during peak hours, ensuring that end user experience is not degraded. Autoscaling also guarantees that you don’t have servers running idle and costing you money in the non-peak hours.
In the Kubernetes world, there are 3 different autoscalers that help manage costs and resource optimization:
HPA presents unique challenges when used in conjunction with advanced deployment strategies like Blue/Green. For instance, one of our customers wanted to use a Blue/Green strategy to move all users on the old version to the new version without interruption. However, what our customer discovered was that HPA scaled down the next version as it was not receiving any traffic. This meant that end users saw slow/degraded service for a while when traffic cut over to the next version. When Armory set out to add support for HPA within Continuous Deployments-as-a-Service, we wanted to provide reliability when using deployment strategies without having to increase costs for our customers. Here’s what we came up with.
Step 1: Before starting a deployment to an environment, CD-as-a-Service notes the scale that your application is currently running at and maintains this scale until the deployment to the environment is finished.
The Details: Because CD-as-a-Service knows the scale right before the deployment starts, it can alter deployment strategies in a way that does not cause degraded service. For example, when using a Blue/Green strategy, the next version of the application is scaled up to meet the current traffic load before traffic is moved over to the new version. Once the traffic is cut over to the new version, your users would not experience interruptions or degraded service. Additionally, this approach ensures reliability and speed when rolling back – your rollbacks don’t have to scale up to support the required traffic.
Step 2: CD-as-a-Service then disables the HPA for your application and executes your deployment strategy.
The Details: By disabling HPA during the deployment strategy, CD-as-a-Service ensures that HPA does not interfere with that strategy. For example, when using automated analysis results, if the new version has a memory leak, the HPA could scale up and thwart the threshold-based queries. Or during pod-ratio canary deployments, HPA could scale down pods and force more users into the canary version of application.
Step 3: After successfully deploying the new version of the application, CD-as-a-Service then enables HPA for the new version of the application.
The Details: CD-as-a-Service deploys every change you make, even changes to the HPA. That means as you refine your HPA configuration to the application’s needs, you can run automated performance tests in staging environments before ever deploying new HPA configurations to production.
With CD-as-a-Service, you can leverage all the benefits of HPA alongside advanced deployment strategies to deploy reliably without causing service interruptions. You can start using HPA with your applications by adding it to the list of manifests without adding any extra configuration. Test out your own HPA deployment scenarios by trying CD-as-a-Service for free by signing up today!
Introducing Quick Spin One of the most common challenges that organizations face when implementing a continuous deployment strategy is the time and focus that it takes to set up the tools and processes. But a secure, flexible, resilient and scalable solution is available right now. Want to see if it’s the right tool for your […]
Read more →
Spinnaker is the most powerful continuous delivery tool on the market. DevOps engineers and developers recognize this power and are looking to use Spinnaker as a foundational tool in their Continuous Integration and Continuous Delivery (CI/CD) process for hybrid and multi-cloud deployments. Such a powerful, expansive open source tool needs expertise within your organization to […]
Read more →
Today, Armory is excited to announce the availability of the GitHub Action for Armory Continuous Deployment-as-a-Service. GitHub is where developers shape the future of software. After a developer writes and tests their code in GitHub, it must be deployed. Armory’s GitHub Action for Continuous Deployment-as-a-Service extends the best-in-class deployment capabilities to Kubernetes. CD-as-a-Service enables declarative […]
Read more →