4. What is Autoscaling
Autoscaling sometimes also called automatic scaling, is a method used
in cloud computing - that allows users to automatically scale cloud
services, like virtual machines (VM) and server capacities, up or down,
depending on defined situations.
Wikipedia
10/10/2019 4
5. Why do you need AutoScaling?
... without AutoScaling... with AutoScaling
10/10/2019 5
6. Why do you need AutoScaling?
Advantages
• 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
• Can also take care of replacing unhealthy instances and therefore
protecting somewhat against hardware, network, and application
failures
• Setup scaling quickly
• Automatically Maintain Performance
• Pay Only for What You Need
• Make Smart Scaling Decisions
10/10/2019 6
7. Why do you need AutoScaling?
Advantages
Autoscale methods:
• Time based
• Reactive
• Predictive
10/10/2019 7
9. What is Senlin?
• Senlin is a clustering service for OpenStack clouds
• Senlin interacts with other OpenStack services via profile plugins
• Have policy for each cluster
Available on: https://opendev.org/openstack/senlin
10/10/2019 9
10. Senlin Basics
1. Creating Your First Profile
• Profile captures is necessary to create a node in clusteropenstack cluster profile create
--spec-file centos_basic.yaml centos_basic
10/10/2019 10
11. Senlin Basics
1. Creating Your First Cluster
• Cluster using profile as a template to create
nodes - members of cluster
openstack cluster create
--profile centos_basic centos_cluster
10/10/2019 11
12. Senlin Basics
2. Manual Cluster Scaling
• Senlin allow user do manual scale up/down with
command:
openstack cluster expand
--count 1 centos_cluster
to scale cluster increase one node...
openstack cluster shrink
--count 1 centos_cluster
to scale cluster decrease one node...
10/10/2019 12
13. Senlin Basics
2. Manual Cluster Scaling
• Yet another way to change the size of a cluster is to
use the command:
openstack cluster resize
--capacity 2 centos_cluster
to scale cluster increase one node...
10/10/2019 13
15. What else can Senlin do?
• Make cluster work with policy
• Monitor and Healing for members of cluster
• Building Autoscaling clusters
10/10/2019 15
16. What else can Senlin do?
1. Make cluster work with policy
• A policy contains the set of rules that are checked/enforced before or after
certain cluster operations are performed
• Expected Scaling with what expected do
2. Make cluster being maintained with desired capacity whole life
cycle
10/10/2019 16
18. Autoscale with Senlin, why not?
• The senlin service provides:
• Operations can support for controlling cluster scaling behavior such as:
• CLUSTER_RESIZE
• CLUSTER_SCALE_OUT
• CLUSTER_SCALE_IN
• Receivers provides a channel to which you can send signals or
alarms from an external monitoring software
• Auto healing for members of cluster
10/10/2019 18
19. Autoscale with Senlin, why not?
• Backend
other
services
• Monitoring
• Reporter
• Scaler
10/10/2019 19
- Auto scaling also ensures that new instances are seamlessly increased during demand spikes and decreased during demand drops, enabling consistent performance for lower costs.
- Example with traffic of a something services.
Each profile type implementation enable Senlin to create, update, delete a specific type of resources.
- 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
- 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
- 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
- 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
??? 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
- or service so that scaling operations can be automated.