Loading AI tools
Optimization method of cloud computing From Wikipedia, the free encyclopedia
Autoscaling, also spelled auto scaling or auto-scaling, and sometimes also called automatic scaling, is a method used in cloud computing that dynamically adjusts the amount of computational resources in a server farm - typically measured by the number of active servers - automatically based on the load on the farm. For example, the number of servers running behind a web application may be increased or decreased automatically based on the number of active users on the site. Since such metrics may change dramatically throughout the course of the day, and servers are a limited resource that cost money to run even while idle, there is often an incentive to run "just enough" servers to support the current load while still being able to support sudden and large spikes in activity. Autoscaling is helpful for such needs, as it can reduce the number of active servers when activity is low, and launch new servers when activity is high. Autoscaling is closely related to, and builds upon, the idea of load balancing.[1][2]
Autoscaling offers the following advantages:
Autoscaling differs from having a fixed daily, weekly, or yearly cycle of server use in that it is responsive to actual usage patterns, and thus reduces the potential downside of having too few or too many servers for the traffic load. For instance, if traffic is usually lower at midnight, then a static scaling solution might schedule some servers to sleep at night, but this might result in downtime on a night where people happen to use the Internet more (for instance, due to a viral news event). Autoscaling, on the other hand, can handle unexpected traffic spikes better.[3][7]
In the list below, we use the terminology used by Amazon Web Services (AWS).[8] However, alternative names are noted and terminology that is specific to the names of Amazon services is not used for the names.
Name (used in AWS,[8] unless otherwise noted) | Meaning | Alternative names (used in Google Cloud Platform,[9] Microsoft Azure,[10] or other platforms) |
---|---|---|
Instance | A single server or machine that is part of the group of machines subject to autoscaling | |
Autoscaling group | The collection of instances subject to autoscaling, along with all the associated policies and state information | Managed instance group (Google Cloud Platform) |
Size | The number of instances currently part of the autoscaling group | |
Desired capacity (or desired size) | The number of instances that the autoscaling group should have at any given point in time. If the size is less than the desired size, the autoscaling group will try to launch (provision and attach) new instances. If the size is more than the desired size, the autoscaling group will try to remove (detach and terminate) instances | |
Minimum size | A number of instances below which the desired capacity is not allowed to fall | |
Maximum size | A number of instances above which the desired capacity is not allowed to rise | |
Metric | A measurement (such as CPU utilization, memory usage, network usage) associated with the autoscaling group, for which a time series of data points is generated regularly. Thresholds for metrics can be used to set autoscaling policies. Metrics can be based on aggregates of metrics for instances of the autoscaling group, or based on load balancers associated with the autoscaling group | |
Scaling policy (or autoscaling policy) | A policy that specifies a change to the autoscaling group's desired capacity (or sometimes, its minimum and maximum size) in response to metrics crossing specific thresholds. Scaling policies can have associated cooldown periods, which prevent additional scaling actions from occurring immediately after a specific scaling action. Changes to desired capacity could be incremental (increase or decrease by a specific number) or could specify a new value of the desired capacity. Policies that increase the desired capacity are called "scaling out" or "scaling up" policies, and policies that decrease the desired capacity are called "scaling in" or "scaling down" policies | |
Health check | A way for the autoscaling group to determine if the instances attached to it are functioning properly. A health check may be based on whether the instance still exists and is reachable, or it could be based on whether the instance is still registered and in service with an associated load balancer | |
Launch configuration | A description of the parameters and scripts used when launching a new instance. This includes the instance type, purchase options (such as spot versus on-demand in the case of AWS), possible availability zones for launch, machine image, and scripts to run on launch | Instance template (Google Cloud Platform) |
Manual scaling | A scaling action executed manually | |
Scheduled scaling | A scaling policy that is executed at a specific time, for instance, time of day or week or month or year. See #Scheduled scaling for more |
Amazon Web Services launched the Amazon Elastic Compute Cloud (EC2) service in August 2006, that allowed developers to programmatically create and terminate instances (machines).[11][12] At the time of initial launch, AWS did not offer autoscaling, but the ability to programmatically create and terminate instances gave developers the flexibility to write their own code for autoscaling.
Third-party autoscaling software for AWS began appearing around April 2008. These included tools by Scalr[13] and RightScale. RightScale was used by Animoto, which was able to handle Facebook traffic by adopting autoscaling.[14][15]
On May 18, 2009, Amazon launched its own autoscaling feature along with Elastic Load Balancing, as part of Amazon Elastic Compute Cloud.[16] Autoscaling is now an integral component of Amazon's EC2 offering.[2][17][18] Autoscaling on Amazon Web Services is done through a web browser or the command line tool.[19] In May 2016 Autoscaling was also offered in AWS ECS Service.[20]
On-demand video provider Netflix documented their use of autoscaling with Amazon Web Services to meet their highly variable consumer needs. They found that aggressive scaling up and delayed and cautious scaling down served their goals of uptime and responsiveness best.[7]
In an article for TechCrunch, Zev Laderman, the co-founder and CEO of Newvem, a service that helps optimize AWS cloud infrastructure, recommended that startups use autoscaling in order to keep their Amazon Web Services costs low.[4]
Various best practice guides for AWS use suggest using its autoscaling feature even in cases where the load is not variable. That is because autoscaling offers two other advantages: automatic replacement of any instances that become unhealthy for any reason (such as hardware failure, network failure, or application error), and automatic replacement of spot instances that get interrupted for price or capacity reasons, making it more feasible to use spot instances for production purposes.[6][21][22] Netflix's internal best practices require every instance to be in an autoscaling group, and its conformity monkey terminates any instance not in an autoscaling group in order to enforce this best practice.[23]
On June 27, 2013, Microsoft announced that it was adding autoscaling support to its Windows Azure cloud computing platform.[24][25][26] Documentation for the feature is available on the Microsoft Developer Network.[10][27]
Oracle Cloud Platform allows server instances to automatically scale a cluster in or out by defining an auto-scaling rule.[28] These rules are based on CPU and/or memory utilization and determine when to add or remove nodes.
On November 17, 2014, the Google Compute Engine announced a public beta of its autoscaling feature for use in Google Cloud Platform applications.[29][30][31][32] As of March 2015, the autoscaling tool is still in Beta.[9]
In a blog post in August 2014, a Facebook engineer disclosed that the company had started using autoscaling to bring down its energy costs. The blog post reported a 27% decline in energy use for low traffic hours (around midnight) and a 10-15% decline in energy use over the typical 24-hour cycle.[3][33]
Kubernetes Horizontal Pod Autoscaler automatically scales the number of pods in a replication controller, deployment or replicaset based on observed CPU utilization (or, with beta support, on some other, application-provided metrics)[34]
Autoscaling by default uses reactive decision approach for dealing with traffic scaling: scaling only happens in response to real-time changes in metrics. In some cases, particularly when the changes occur very quickly, this reactive approach to scaling is insufficient. Two other kinds of autoscaling decision approaches are described below.
This is an approach to autoscaling where changes are made to the minimum size, maximum size, or desired capacity of the autoscaling group at specific times of day. Scheduled scaling is useful, for instance, if there is a known traffic load increase or decrease at specific times of the day, but the change is too sudden for reactive approach based autoscaling to respond fast enough. AWS autoscaling groups support scheduled scaling.[35]
This approach to autoscaling uses predictive analytics. The idea is to combine recent usage trends with historical usage data as well as other kinds of data to predict usage in the future, and autoscale based on these predictions.
For parts of their infrastructure and specific workloads, Netflix found that Scryer, their predictive analytics engine, gave better results than Amazon's reactive autoscaling approach. In particular, it was better for:[36][33]
On November 20, 2018, AWS announced that predictive scaling would be available as part of its autoscaling offering.[37]
Seamless Wikipedia browsing. On steroids.
Every time you click a link to Wikipedia, Wiktionary or Wikiquote in your browser's search results, it will show the modern Wikiwand interface.
Wikiwand extension is a five stars, simple, with minimum permission required to keep your browsing private, safe and transparent.