SlideShare a Scribd company logo
1 of 37
Download to read offline
Feature first look: VM AutoScaling using
CloudStack Virtual Router
CloudStack Collaboration Conference, 14 - 16 November 2022
Who am I ?
Wei Zhou
2010.07 Started on Cloud Computing
2012.12 Started on Apache CloudStack
2013.05 Became an Apache CloudStack committer
2017.03 Became an Apache CloudStack PMC member
2021.05 joined Shapeblue as Software Architect
Email: weizhou@apache.org
weizhouapache@gmail.com
01
Overview
02
Glossaries
03
Details and changes
04
Workflow - How it works
05
Demo
06
Summary and Future work
Contents
01
Overview
Contents
What is VM AutoScaling
×CloudStack documentation says:
“AutoScaling allows you to scale your back-end services or application VMs up or
down seamlessly and automatically according to the conditions you define.”
• When: the conditions you define are matched
• What: scale up or down
• How: seamlessly and automatically, no manual intervention.
דScale Up” means Create new VM (it is called “Scale Out” in some articles)
דScale Down” means Destroy underused VM (it is called “Scale In” in some
articles)
History in CloudStack
×A feature introduced in Apache CloudStack 4.1, contributed by Citrix
×Use Case 1: Citrix Netscaler as Load balancer provider
• Linux User CPU - percentage, Linux System CPU - percentage, Linux CPU Idle -
percentage (source: snmp)
• Response Time - microseconds (source: netscaler)
×User Case 2: VM AutoScaling without Netscaler on XenServer
• Linux User CPU - percentage - native (source: cpu, retrieved from XenCenter)
• Linux User RAM - percentage - native (source: memory, retrieved from XenCenter)
VM AutoScaling using CloudStack Virtual Routers
×New functionality in CloudStack 4.18.0
• Get metrics from hosts and CloudStack virtual routers as well
• Hypervisor support: KVM, VMware, XenServer/XCP-ng
• New CloudStack UI (vue3)
• Support more VM parameters
• PR to CloudStack 4.18.0:
https://github.com/apache/cloudstack/pull/6571
02
Glossaries
Contents
List of glossaries (resources)
Name Description
Counter Performance counters to be used for monitoring the health of
the guest VMs.
Condition Conditions express criteria for triggering an autoscale action.
Condition uses Counters above.
AutoScale Policy AutoScale Policy defines a policy for taking an autoscale action
by combining conditions.
AutoScale VM Profile AutoScale Vm Profile is a set of various settings to be used for
VMs while taking scale up or scale down action.
For example, service offering, template, ssh keys
AutoScale VM Group AutoScale Vm Group associates scaleup and scaledown
policies with a load balancing rule.
Autoscale Policy
I have a group of VMs. I wish CloudStack to automatically
×Create new VM (a.k.a Scale Up), if in last 300 seconds
• “VM CPU - average percentage” > 50, AND
• “VM Memory - average percentage” > 80
×The new VM has 4CPU, 8GB RAM, created from CentOS 8 template.
×The new VM is added to a load balancer (10.10.10.10/443/80) as a web server.
Conditition-1
Conditition-2
Example: AutoScale VM group
Counter-1
Counter-2
Autoscale VM profile
03
Details and changes
Contents
Counter
×Properties
• provider: VirtualRouter, VpcVirtualRouter, Netscaler (*)
• source: snmp, cpu, memory, netscaler, virtualrouter (*)
• name: description of the counter
• value: (snmp oid, etc)
Condition
×Properties
• counterid
• operator:
• GT (Greater than)
• GE (Greater than or equals to)
• LT (Less than)
• LE (Less than or equals to)
• EQ (Equals to)
• threshold
Autoscaling policy
×Properties
• Name (*)
• Conditions (1 or more)
• Duration (in seconds)
• Action: ScaleUp, ScaleDown
• Quiettime (300 seconds by default)
×A counter can be used only once in a policy. It can be used in other policies.
×A counter can be used only once in a policy. It can be used in other policies.
Autoscaling VM profile
×Properties:
• zoneid (required)
• serviceofferingid (required)
• templateid (required)
• autoscaleuserid (Netscaler
only)
• counterParam (Netscaler
only)
• snmpcommunity
• snmpport
• userdata (*)
• expungevmgraceperiod
• otherDeployParams
• rootdisksize (*)
• diskofferingid (*)
• disksize (data) (*)
• ssh keypairs (*)
• affinitygroupids (*)
• networkids (*)
×Dynamic service offering is not supported.
×userdata is a base64-encoded string.
×LB network is always the default network of VMs.
Autoscaling VM group
×Properties:
• lbRuleId
• minMembers
• maxMembers
• interval
• scaleUpPolicyIds
• scaleDownPolicyIds
• profileId
×Each vm group must have at least 1 scaleup policy and at least 1 scaledown policy.
×Autoscaling VM group can have multiple scaleup and scaledown policies.
Supported APIs
×Counter: Create, List, Delete (ROOT admin only)
×Condition: Create, List, Update (*), Delete
×Autoscaling Policy: Create, List, Update, Delete
×Autoscaling VM profile: Create, List, Update, Delete
×Autoscaling VM group: Create, List, Update, Delete. Enable,
Disable
• New parameter: cleanup of deleteAutoScaleVmGroup API
• It is not recommended to create new counter as it is not supported in backend
04
Workflow - How it works
Contents
Prerequisites
×Create a load balancer rule
×Upload the VM template
×Create other resources, if needed
• service offering, disk offering
• ssh keypairs
• affinity groups
• other networks, etc
×Acquire an IP if isolated network does not have a Public IP.
×VmAutoScaling capability is enabled by default for network offerings with load
balanacer. To disable it, please create a network offering without VmAutoScaling
support.
Prerequisites
If memory usage is used in scaleup or scaledown policies,
×KVM:
• VM template has virtio driver installed,
• add the following line to /etc/cloudstack/agent/agent.properties
• vm.memballoon.disable = false (false by default)
• vm.memballoon.stats.period = positive number (Disabled by default, 5/10/60 are
tested ok)
• Note: Windows VMs might be stuck after live migration
×XenServer:
• VM template has PV driver installed
× Bug fix (4.18.0+): Fix memory stats for KVM (#6358)
× Bug fix (4.17.2+) : XenServer/XCP-ng: fix vm memory usage is always 99.9x% (#6852)
× Bug fix (4.17.1.0+): Fix VMware memory retrieval (#6414)
(1) Create AutoScale VM group
×Steps
• create Autoscale vm profile
• create conditions
• create scaleup policies
• create scaledown policies
• create Autoscale vm group
(2) Monitor AutoScale VM group
×MonitorTask runs every `interval` (in seconds)
×MonitorTask is created when a VM group is created or enabled.
×MonitorTask is shutdown and removed when a VM group is disabled or removed.
×Stopped VMs are not considered in max/min VM check
Monitor AutoScale VM group: About Metrics
×VM memory usage percentage
• KVM/XenServer/XCP-ng : (total memory - free memory) * 100 / total memory
• VMware: Active Guest Memory (on vCenter) * 100 / total memory
×Public Network Received/Transmit
• Added iptables rules for each public interface
• Get counter of iptables rules
×Load balancer connections
• Enabled haproxy socket in haproxy.cfg
• Get Load balancer statistics via haproxy socket
×Known issue when CloudStack gets average load balancer connections from
CloudStack Virtual Routers, see
https://github.com/apache/cloudstack/issues/6849
×Other VMs or services in the isolated network might have some impact on
the counters “Public Network Received/Transmit”.
(3) Check AutoScale VM group
×AutoScaleMonitor checks all VM groups in parallel
×ScaleUp policies are checked before ScaleDown policies.
×Each network has a network rate setting.
×A policy will be skipped if there are Inactive records for the group or the policy
Check VM Group: Data types and processing
×These VMs are considered as available: Running, Starting, Stopping, Migrating
×Stopped VMs are not available, therefore it is not considered in the calculation
דAggregated data for individual VM” is not used currently.
Data type Data calculation
Instant data for individual VM
(e.g. VM CPU, Memory utilization)
sum(value) / count(value)
Aggregated data for individual VM
(e.g. VM network mbps / disk iops)
(last value - first value) / (last timestamp - first
timestamp)
Instant data for VM group
(e.g. Average LB connections per VM)
sum(value) / count(value) / count of available VMs
Aggregated data for VM group
(e.g. Public network received/transmit
mbps per VM)
(last value - first value) / (last timestamp - first
timestamp) / count of available VMs
(4) Scale Up
×VM name format: autoScaleVm-<Group name>-<seq number>-<6 random letters>
×An Inactive record is inserted when VM group is scaled up.
(5) Scale Down
×An Inactive record is inserted when VM group is scaled down.
(6) Manage AutoScale VM group
×Supported actions:
• Disable VM group
• Update VM group, VM profile, policies, conditions
• Add new policy, Remove policy
• Add condition, Remove condition
• Enable VM group
×Adding VMs to VM group is NOT allowed.
×VM can be removed from AutoScale VM group and LB rule only if VM group is
Disabled.
×An Inactive record is inserted when VM group is enabled/disabled.
05
Demo
Contents
Demo
×Infomation of testing environment
• Installed CloudStack packages built from origin/4.18-vm-autoscaling
• Management server: CentOS 7
• Hypervisor: VMware 7.0.3
×Most stressful test we did
• interval = 5 seconds, duration = 10 seconds,
• maxmembers = 1000 vms
06
Summary and Future work
Contents
Summary
×Enhancement in CloudStack 4.18.0
• CloudStack Virtual router is used by LB provider, instead of Netscaler
• Supports more performance counters from CloudStack virtual router
• Supports hypervisor: KVM, VMware, XenServer/XCP-ng
• Supported on CloudStack UI (vue3)
Future work
×Support more counters
• VM disk write/read bps/iops
• VM nic interfaces transmit/received
• Specific Public IP/port Transmit/received
×Support UserData ids
• Userdata is a first-class resource since 4.18.0.0
×Support Shared networks
• Lb is optional
• metrics from virtual routers are not available any more
Q & A
Email: weizhou@apache.org
Thank you !
Email: weizhou@apache.org
References
×Autoscaling
• https://cwiki.apache.org/confluence/display/CLOUDSTACK/Autoscaling
• https://github.com/apache/cloudstack/commit/dda4d39b558a8e11051a8d9fe61233f7f
e98c14a
×VM Autoscaling with virtual router
• http://qa.cloudstack.cloud/docs/WIP-
PROOFING/pr/286/adminguide/autoscale_with_virtual_router.html
×Configuring AutoScale without using NetScaler
• http://docs.cloudstack.apache.org/en/latest/adminguide/autoscale_without_netscaler.ht
ml
×Configuring AutoScale
• https://docs.cloudstack.apache.org/en/latest/adminguide/networking_and_traffic.html#
configuring-autoscale
Appendix: Quick Tips
×rootdisksize is exclusive with overriderootdiskoffering
×Not tested
• Deploy VM with OVF images on VMware
• AutoScaling with netscaler as LB provider
• AutoScaling without netscaler
×Not implemented:
• UI: load existng vm profile when create vm group
• UI: Manage conditions/policies and VM profiles
• Server: Check conditions by formula in scale policies: Not only AND

More Related Content

What's hot

Backup and Restore VMs Based on KVM
Backup and Restore VMs Based on KVMBackup and Restore VMs Based on KVM
Backup and Restore VMs Based on KVM
ShapeBlue
 
What CloudStackers Need To Know About LINSTOR/DRBD
What CloudStackers Need To Know About LINSTOR/DRBDWhat CloudStackers Need To Know About LINSTOR/DRBD
What CloudStackers Need To Know About LINSTOR/DRBD
ShapeBlue
 
Boosting I/O Performance with KVM io_uring
Boosting I/O Performance with KVM io_uringBoosting I/O Performance with KVM io_uring
Boosting I/O Performance with KVM io_uring
ShapeBlue
 

What's hot (20)

Backup and Restore VMs Based on KVM
Backup and Restore VMs Based on KVMBackup and Restore VMs Based on KVM
Backup and Restore VMs Based on KVM
 
What's Coming in CloudStack 4.19
What's Coming in CloudStack 4.19What's Coming in CloudStack 4.19
What's Coming in CloudStack 4.19
 
VXLAN Integration with CloudStack Advanced Zone
VXLAN Integration with CloudStack Advanced ZoneVXLAN Integration with CloudStack Advanced Zone
VXLAN Integration with CloudStack Advanced Zone
 
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlueVNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
 
Edge Zones In CloudStack
Edge Zones In CloudStackEdge Zones In CloudStack
Edge Zones In CloudStack
 
Meetup 23 - 02 - OVN - The future of networking in OpenStack
Meetup 23 - 02 - OVN - The future of networking in OpenStackMeetup 23 - 02 - OVN - The future of networking in OpenStack
Meetup 23 - 02 - OVN - The future of networking in OpenStack
 
Kubernetes - Security Journey
Kubernetes - Security JourneyKubernetes - Security Journey
Kubernetes - Security Journey
 
VMware Tanzu Introduction
VMware Tanzu IntroductionVMware Tanzu Introduction
VMware Tanzu Introduction
 
What CloudStackers Need To Know About LINSTOR/DRBD
What CloudStackers Need To Know About LINSTOR/DRBDWhat CloudStackers Need To Know About LINSTOR/DRBD
What CloudStackers Need To Know About LINSTOR/DRBD
 
KVM High Availability Regardless of Storage - Gabriel Brascher, VP of Apache ...
KVM High Availability Regardless of Storage - Gabriel Brascher, VP of Apache ...KVM High Availability Regardless of Storage - Gabriel Brascher, VP of Apache ...
KVM High Availability Regardless of Storage - Gabriel Brascher, VP of Apache ...
 
Openstack 101
Openstack 101Openstack 101
Openstack 101
 
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region
 
[오픈소스컨설팅]오픈스택에 대하여
[오픈소스컨설팅]오픈스택에 대하여[오픈소스컨설팅]오픈스택에 대하여
[오픈소스컨설팅]오픈스택에 대하여
 
Boosting I/O Performance with KVM io_uring
Boosting I/O Performance with KVM io_uringBoosting I/O Performance with KVM io_uring
Boosting I/O Performance with KVM io_uring
 
VSICM8_M02.pptx
VSICM8_M02.pptxVSICM8_M02.pptx
VSICM8_M02.pptx
 
Deploying CloudStack and Ceph with flexible VXLAN and BGP networking
Deploying CloudStack and Ceph with flexible VXLAN and BGP networking Deploying CloudStack and Ceph with flexible VXLAN and BGP networking
Deploying CloudStack and Ceph with flexible VXLAN and BGP networking
 
What's New In Apache CloudStack 4.17
What's New In Apache CloudStack 4.17What's New In Apache CloudStack 4.17
What's New In Apache CloudStack 4.17
 
The Best Storage Solution For CloudStack: LINSTOR
The Best Storage Solution For CloudStack: LINSTORThe Best Storage Solution For CloudStack: LINSTOR
The Best Storage Solution For CloudStack: LINSTOR
 
VMware Advance Troubleshooting Workshop - Day 2
VMware Advance Troubleshooting Workshop - Day 2VMware Advance Troubleshooting Workshop - Day 2
VMware Advance Troubleshooting Workshop - Day 2
 
Building a redundant CloudStack management cluster - Vladimir Melnik
Building a redundant CloudStack management cluster - Vladimir MelnikBuilding a redundant CloudStack management cluster - Vladimir Melnik
Building a redundant CloudStack management cluster - Vladimir Melnik
 

Similar to VM Autoscaling With CloudStack VR As Network Provider

Sa106 – practical solutions for connections administrators
Sa106 – practical solutions for connections administratorsSa106 – practical solutions for connections administrators
Sa106 – practical solutions for connections administrators
Sharon James
 

Similar to VM Autoscaling With CloudStack VR As Network Provider (20)

Azure virtual machines & Terraform
Azure virtual machines  & Terraform Azure virtual machines  & Terraform
Azure virtual machines & Terraform
 
Openstack Rally - Benchmark as a Service. Openstack Meetup India. Ananth/Rahul.
Openstack Rally - Benchmark as a Service. Openstack Meetup India. Ananth/Rahul.Openstack Rally - Benchmark as a Service. Openstack Meetup India. Ananth/Rahul.
Openstack Rally - Benchmark as a Service. Openstack Meetup India. Ananth/Rahul.
 
오토스케일링 제대로 활용하기 (김일호) - AWS 웨비나 시리즈 2015
오토스케일링 제대로 활용하기 (김일호) - AWS 웨비나 시리즈 2015오토스케일링 제대로 활용하기 (김일호) - AWS 웨비나 시리즈 2015
오토스케일링 제대로 활용하기 (김일호) - AWS 웨비나 시리즈 2015
 
Using AWS CloudWatch Custom Metrics and EC2 Auto Scaling -VSocial Infrastructure
Using AWS CloudWatch Custom Metrics and EC2 Auto Scaling -VSocial InfrastructureUsing AWS CloudWatch Custom Metrics and EC2 Auto Scaling -VSocial Infrastructure
Using AWS CloudWatch Custom Metrics and EC2 Auto Scaling -VSocial Infrastructure
 
CloudStack - Top 5 Technical Issues and Troubleshooting
CloudStack - Top 5 Technical Issues and TroubleshootingCloudStack - Top 5 Technical Issues and Troubleshooting
CloudStack - Top 5 Technical Issues and Troubleshooting
 
3. v sphere big data extensions
3. v sphere big data extensions3. v sphere big data extensions
3. v sphere big data extensions
 
Azure appfabric caching intro and tips
Azure appfabric caching intro and tipsAzure appfabric caching intro and tips
Azure appfabric caching intro and tips
 
Creating scalable solutions with aws
Creating scalable solutions with awsCreating scalable solutions with aws
Creating scalable solutions with aws
 
Utilizing Public AND Private Clouds with Bright Cluster Manager
Utilizing Public AND Private Clouds with Bright Cluster ManagerUtilizing Public AND Private Clouds with Bright Cluster Manager
Utilizing Public AND Private Clouds with Bright Cluster Manager
 
Hyper-V: Best Practices
Hyper-V: Best PracticesHyper-V: Best Practices
Hyper-V: Best Practices
 
Day 5 - AWS Autoscaling Master Class - The New Capacity Plan
Day 5 - AWS Autoscaling Master Class - The New Capacity PlanDay 5 - AWS Autoscaling Master Class - The New Capacity Plan
Day 5 - AWS Autoscaling Master Class - The New Capacity Plan
 
Oracle Cloud Infrastructure – Compute
Oracle Cloud Infrastructure – ComputeOracle Cloud Infrastructure – Compute
Oracle Cloud Infrastructure – Compute
 
Sa106 – practical solutions for connections administrators
Sa106 – practical solutions for connections administratorsSa106 – practical solutions for connections administrators
Sa106 – practical solutions for connections administrators
 
2017.06.19 Paul Woodward - ExploreVM VMware 101
2017.06.19   Paul Woodward - ExploreVM VMware 1012017.06.19   Paul Woodward - ExploreVM VMware 101
2017.06.19 Paul Woodward - ExploreVM VMware 101
 
Weaveworks at AWS re:Invent 2016: Operations Management with Amazon ECS
Weaveworks at AWS re:Invent 2016: Operations Management with Amazon ECSWeaveworks at AWS re:Invent 2016: Operations Management with Amazon ECS
Weaveworks at AWS re:Invent 2016: Operations Management with Amazon ECS
 
Benefity Oracle Cloudu (3/4): Compute
Benefity Oracle Cloudu (3/4): ComputeBenefity Oracle Cloudu (3/4): Compute
Benefity Oracle Cloudu (3/4): Compute
 
Harness the Power of Infrastructure as Code
Harness the Power of Infrastructure as CodeHarness the Power of Infrastructure as Code
Harness the Power of Infrastructure as Code
 
Accelerate Your OpenStack Deployment Presented by SolidFire and Red Hat
Accelerate Your OpenStack Deployment Presented by SolidFire and Red HatAccelerate Your OpenStack Deployment Presented by SolidFire and Red Hat
Accelerate Your OpenStack Deployment Presented by SolidFire and Red Hat
 
Guaranteeing Storage Performance by Mike Tutkowski
Guaranteeing Storage Performance by Mike TutkowskiGuaranteeing Storage Performance by Mike Tutkowski
Guaranteeing Storage Performance by Mike Tutkowski
 
Automatic deployment on .NET web stack (Minsk .NET meetup 12.02.14)
Automatic deployment on .NET web stack (Minsk .NET meetup 12.02.14)Automatic deployment on .NET web stack (Minsk .NET meetup 12.02.14)
Automatic deployment on .NET web stack (Minsk .NET meetup 12.02.14)
 

More from ShapeBlue

More from ShapeBlue (20)

CloudStack Authentication Methods – Harikrishna Patnala, ShapeBlue
CloudStack Authentication Methods – Harikrishna Patnala, ShapeBlueCloudStack Authentication Methods – Harikrishna Patnala, ShapeBlue
CloudStack Authentication Methods – Harikrishna Patnala, ShapeBlue
 
CloudStack Tooling Ecosystem – Kiran Chavala, ShapeBlue
CloudStack Tooling Ecosystem – Kiran Chavala, ShapeBlueCloudStack Tooling Ecosystem – Kiran Chavala, ShapeBlue
CloudStack Tooling Ecosystem – Kiran Chavala, ShapeBlue
 
Elevating Cloud Infrastructure with Object Storage, DRS, VM Scheduling, and D...
Elevating Cloud Infrastructure with Object Storage, DRS, VM Scheduling, and D...Elevating Cloud Infrastructure with Object Storage, DRS, VM Scheduling, and D...
Elevating Cloud Infrastructure with Object Storage, DRS, VM Scheduling, and D...
 
VM Migration from VMware to CloudStack and KVM – Suresh Anaparti, ShapeBlue
VM Migration from VMware to CloudStack and KVM – Suresh Anaparti, ShapeBlueVM Migration from VMware to CloudStack and KVM – Suresh Anaparti, ShapeBlue
VM Migration from VMware to CloudStack and KVM – Suresh Anaparti, ShapeBlue
 
How We Grew Up with CloudStack and its Journey – Dilip Singh, DataHub
How We Grew Up with CloudStack and its Journey – Dilip Singh, DataHubHow We Grew Up with CloudStack and its Journey – Dilip Singh, DataHub
How We Grew Up with CloudStack and its Journey – Dilip Singh, DataHub
 
What’s New in CloudStack 4.19, Abhishek Kumar, Release Manager Apache CloudSt...
What’s New in CloudStack 4.19, Abhishek Kumar, Release Manager Apache CloudSt...What’s New in CloudStack 4.19, Abhishek Kumar, Release Manager Apache CloudSt...
What’s New in CloudStack 4.19, Abhishek Kumar, Release Manager Apache CloudSt...
 
CloudStack 101: The Best Way to Build Your Private Cloud – Rohit Yadav, VP Ap...
CloudStack 101: The Best Way to Build Your Private Cloud – Rohit Yadav, VP Ap...CloudStack 101: The Best Way to Build Your Private Cloud – Rohit Yadav, VP Ap...
CloudStack 101: The Best Way to Build Your Private Cloud – Rohit Yadav, VP Ap...
 
How We Use CloudStack to Provide Managed Hosting - Swen Brüseke - proIO
How We Use CloudStack to Provide Managed Hosting - Swen Brüseke - proIOHow We Use CloudStack to Provide Managed Hosting - Swen Brüseke - proIO
How We Use CloudStack to Provide Managed Hosting - Swen Brüseke - proIO
 
Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And...
Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And...Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And...
Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And...
 
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
 
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online
KVM Security Groups Under the Hood - Wido den Hollander - Your.OnlineKVM Security Groups Under the Hood - Wido den Hollander - Your.Online
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online
 
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
 
Use Existing Assets to Build a Powerful In-house Cloud Solution - Magali Perv...
Use Existing Assets to Build a Powerful In-house Cloud Solution - Magali Perv...Use Existing Assets to Build a Powerful In-house Cloud Solution - Magali Perv...
Use Existing Assets to Build a Powerful In-house Cloud Solution - Magali Perv...
 
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...
 
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...
 
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
 
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlueElevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
 
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...
 
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...
 
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlueWhat’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

VM Autoscaling With CloudStack VR As Network Provider

  • 1. Feature first look: VM AutoScaling using CloudStack Virtual Router CloudStack Collaboration Conference, 14 - 16 November 2022
  • 2. Who am I ? Wei Zhou 2010.07 Started on Cloud Computing 2012.12 Started on Apache CloudStack 2013.05 Became an Apache CloudStack committer 2017.03 Became an Apache CloudStack PMC member 2021.05 joined Shapeblue as Software Architect Email: weizhou@apache.org weizhouapache@gmail.com
  • 3. 01 Overview 02 Glossaries 03 Details and changes 04 Workflow - How it works 05 Demo 06 Summary and Future work Contents
  • 5. What is VM AutoScaling ×CloudStack documentation says: “AutoScaling allows you to scale your back-end services or application VMs up or down seamlessly and automatically according to the conditions you define.” • When: the conditions you define are matched • What: scale up or down • How: seamlessly and automatically, no manual intervention. דScale Up” means Create new VM (it is called “Scale Out” in some articles) דScale Down” means Destroy underused VM (it is called “Scale In” in some articles)
  • 6. History in CloudStack ×A feature introduced in Apache CloudStack 4.1, contributed by Citrix ×Use Case 1: Citrix Netscaler as Load balancer provider • Linux User CPU - percentage, Linux System CPU - percentage, Linux CPU Idle - percentage (source: snmp) • Response Time - microseconds (source: netscaler) ×User Case 2: VM AutoScaling without Netscaler on XenServer • Linux User CPU - percentage - native (source: cpu, retrieved from XenCenter) • Linux User RAM - percentage - native (source: memory, retrieved from XenCenter)
  • 7. VM AutoScaling using CloudStack Virtual Routers ×New functionality in CloudStack 4.18.0 • Get metrics from hosts and CloudStack virtual routers as well • Hypervisor support: KVM, VMware, XenServer/XCP-ng • New CloudStack UI (vue3) • Support more VM parameters • PR to CloudStack 4.18.0: https://github.com/apache/cloudstack/pull/6571
  • 9. List of glossaries (resources) Name Description Counter Performance counters to be used for monitoring the health of the guest VMs. Condition Conditions express criteria for triggering an autoscale action. Condition uses Counters above. AutoScale Policy AutoScale Policy defines a policy for taking an autoscale action by combining conditions. AutoScale VM Profile AutoScale Vm Profile is a set of various settings to be used for VMs while taking scale up or scale down action. For example, service offering, template, ssh keys AutoScale VM Group AutoScale Vm Group associates scaleup and scaledown policies with a load balancing rule.
  • 10. Autoscale Policy I have a group of VMs. I wish CloudStack to automatically ×Create new VM (a.k.a Scale Up), if in last 300 seconds • “VM CPU - average percentage” > 50, AND • “VM Memory - average percentage” > 80 ×The new VM has 4CPU, 8GB RAM, created from CentOS 8 template. ×The new VM is added to a load balancer (10.10.10.10/443/80) as a web server. Conditition-1 Conditition-2 Example: AutoScale VM group Counter-1 Counter-2 Autoscale VM profile
  • 12. Counter ×Properties • provider: VirtualRouter, VpcVirtualRouter, Netscaler (*) • source: snmp, cpu, memory, netscaler, virtualrouter (*) • name: description of the counter • value: (snmp oid, etc)
  • 13. Condition ×Properties • counterid • operator: • GT (Greater than) • GE (Greater than or equals to) • LT (Less than) • LE (Less than or equals to) • EQ (Equals to) • threshold
  • 14. Autoscaling policy ×Properties • Name (*) • Conditions (1 or more) • Duration (in seconds) • Action: ScaleUp, ScaleDown • Quiettime (300 seconds by default) ×A counter can be used only once in a policy. It can be used in other policies. ×A counter can be used only once in a policy. It can be used in other policies.
  • 15. Autoscaling VM profile ×Properties: • zoneid (required) • serviceofferingid (required) • templateid (required) • autoscaleuserid (Netscaler only) • counterParam (Netscaler only) • snmpcommunity • snmpport • userdata (*) • expungevmgraceperiod • otherDeployParams • rootdisksize (*) • diskofferingid (*) • disksize (data) (*) • ssh keypairs (*) • affinitygroupids (*) • networkids (*) ×Dynamic service offering is not supported. ×userdata is a base64-encoded string. ×LB network is always the default network of VMs.
  • 16. Autoscaling VM group ×Properties: • lbRuleId • minMembers • maxMembers • interval • scaleUpPolicyIds • scaleDownPolicyIds • profileId ×Each vm group must have at least 1 scaleup policy and at least 1 scaledown policy. ×Autoscaling VM group can have multiple scaleup and scaledown policies.
  • 17. Supported APIs ×Counter: Create, List, Delete (ROOT admin only) ×Condition: Create, List, Update (*), Delete ×Autoscaling Policy: Create, List, Update, Delete ×Autoscaling VM profile: Create, List, Update, Delete ×Autoscaling VM group: Create, List, Update, Delete. Enable, Disable • New parameter: cleanup of deleteAutoScaleVmGroup API • It is not recommended to create new counter as it is not supported in backend
  • 18. 04 Workflow - How it works Contents
  • 19. Prerequisites ×Create a load balancer rule ×Upload the VM template ×Create other resources, if needed • service offering, disk offering • ssh keypairs • affinity groups • other networks, etc ×Acquire an IP if isolated network does not have a Public IP. ×VmAutoScaling capability is enabled by default for network offerings with load balanacer. To disable it, please create a network offering without VmAutoScaling support.
  • 20. Prerequisites If memory usage is used in scaleup or scaledown policies, ×KVM: • VM template has virtio driver installed, • add the following line to /etc/cloudstack/agent/agent.properties • vm.memballoon.disable = false (false by default) • vm.memballoon.stats.period = positive number (Disabled by default, 5/10/60 are tested ok) • Note: Windows VMs might be stuck after live migration ×XenServer: • VM template has PV driver installed × Bug fix (4.18.0+): Fix memory stats for KVM (#6358) × Bug fix (4.17.2+) : XenServer/XCP-ng: fix vm memory usage is always 99.9x% (#6852) × Bug fix (4.17.1.0+): Fix VMware memory retrieval (#6414)
  • 21. (1) Create AutoScale VM group ×Steps • create Autoscale vm profile • create conditions • create scaleup policies • create scaledown policies • create Autoscale vm group
  • 22. (2) Monitor AutoScale VM group ×MonitorTask runs every `interval` (in seconds) ×MonitorTask is created when a VM group is created or enabled. ×MonitorTask is shutdown and removed when a VM group is disabled or removed. ×Stopped VMs are not considered in max/min VM check
  • 23. Monitor AutoScale VM group: About Metrics ×VM memory usage percentage • KVM/XenServer/XCP-ng : (total memory - free memory) * 100 / total memory • VMware: Active Guest Memory (on vCenter) * 100 / total memory ×Public Network Received/Transmit • Added iptables rules for each public interface • Get counter of iptables rules ×Load balancer connections • Enabled haproxy socket in haproxy.cfg • Get Load balancer statistics via haproxy socket ×Known issue when CloudStack gets average load balancer connections from CloudStack Virtual Routers, see https://github.com/apache/cloudstack/issues/6849 ×Other VMs or services in the isolated network might have some impact on the counters “Public Network Received/Transmit”.
  • 24. (3) Check AutoScale VM group ×AutoScaleMonitor checks all VM groups in parallel ×ScaleUp policies are checked before ScaleDown policies. ×Each network has a network rate setting. ×A policy will be skipped if there are Inactive records for the group or the policy
  • 25. Check VM Group: Data types and processing ×These VMs are considered as available: Running, Starting, Stopping, Migrating ×Stopped VMs are not available, therefore it is not considered in the calculation דAggregated data for individual VM” is not used currently. Data type Data calculation Instant data for individual VM (e.g. VM CPU, Memory utilization) sum(value) / count(value) Aggregated data for individual VM (e.g. VM network mbps / disk iops) (last value - first value) / (last timestamp - first timestamp) Instant data for VM group (e.g. Average LB connections per VM) sum(value) / count(value) / count of available VMs Aggregated data for VM group (e.g. Public network received/transmit mbps per VM) (last value - first value) / (last timestamp - first timestamp) / count of available VMs
  • 26. (4) Scale Up ×VM name format: autoScaleVm-<Group name>-<seq number>-<6 random letters> ×An Inactive record is inserted when VM group is scaled up.
  • 27. (5) Scale Down ×An Inactive record is inserted when VM group is scaled down.
  • 28. (6) Manage AutoScale VM group ×Supported actions: • Disable VM group • Update VM group, VM profile, policies, conditions • Add new policy, Remove policy • Add condition, Remove condition • Enable VM group ×Adding VMs to VM group is NOT allowed. ×VM can be removed from AutoScale VM group and LB rule only if VM group is Disabled. ×An Inactive record is inserted when VM group is enabled/disabled.
  • 30. Demo ×Infomation of testing environment • Installed CloudStack packages built from origin/4.18-vm-autoscaling • Management server: CentOS 7 • Hypervisor: VMware 7.0.3 ×Most stressful test we did • interval = 5 seconds, duration = 10 seconds, • maxmembers = 1000 vms
  • 31. 06 Summary and Future work Contents
  • 32. Summary ×Enhancement in CloudStack 4.18.0 • CloudStack Virtual router is used by LB provider, instead of Netscaler • Supports more performance counters from CloudStack virtual router • Supports hypervisor: KVM, VMware, XenServer/XCP-ng • Supported on CloudStack UI (vue3)
  • 33. Future work ×Support more counters • VM disk write/read bps/iops • VM nic interfaces transmit/received • Specific Public IP/port Transmit/received ×Support UserData ids • Userdata is a first-class resource since 4.18.0.0 ×Support Shared networks • Lb is optional • metrics from virtual routers are not available any more
  • 34. Q & A Email: weizhou@apache.org
  • 35. Thank you ! Email: weizhou@apache.org
  • 36. References ×Autoscaling • https://cwiki.apache.org/confluence/display/CLOUDSTACK/Autoscaling • https://github.com/apache/cloudstack/commit/dda4d39b558a8e11051a8d9fe61233f7f e98c14a ×VM Autoscaling with virtual router • http://qa.cloudstack.cloud/docs/WIP- PROOFING/pr/286/adminguide/autoscale_with_virtual_router.html ×Configuring AutoScale without using NetScaler • http://docs.cloudstack.apache.org/en/latest/adminguide/autoscale_without_netscaler.ht ml ×Configuring AutoScale • https://docs.cloudstack.apache.org/en/latest/adminguide/networking_and_traffic.html# configuring-autoscale
  • 37. Appendix: Quick Tips ×rootdisksize is exclusive with overriderootdiskoffering ×Not tested • Deploy VM with OVF images on VMware • AutoScaling with netscaler as LB provider • AutoScaling without netscaler ×Not implemented: • UI: load existng vm profile when create vm group • UI: Manage conditions/policies and VM profiles • Server: Check conditions by formula in scale policies: Not only AND