Cloudstack autoscaling
-
Upload
shape-blue -
Category
Technology
-
view
1.352 -
download
4
description
Transcript of Cloudstack autoscaling
Auto Scaling with Apache CloudStack
Paul GosdenTechnical lead of networking services division
[email protected]: @ShapeBlue
@ShapeBlue #CloudStack #CCCEU13
What is AutoScale?AutoScale allows systems to dynamically react to a set of defined metrics and to scale resources accordingly.Providing : -
High AvailabilityCost SavingEnergy Saving
Overview
@ShapeBlue #CloudStack #CCCEU13
Applications or services that see elasticity in their demand.Launching a new website with unknown visitor numbersViral marketing campaigns, these can present unpredictable traffic loads as some work and some don’tAn analytical application might scale out the servers performing in a calculation process – using 20 machines for 1 hour, rather than 1 machine for 20 hours
Use Cases
@ShapeBlue #CloudStack #CCCEU13
A new web company designs and builds an application based on a web service that supplies concert ticketsLow capital reserves – Limited resources for Compute platformDesigned their application to be statelessLimited budget for advertising so are using social media in the hope that it goes viral
Example Life Cycle
@ShapeBlue #CloudStack #CCCEU13
Initial Configuration
CloudStack
Application Template
Account Infrastructure
End user configures the CloudStack AutoScale policy on the network
End User
Netscaler
@ShapeBlue #CloudStack #CCCEU13
Initial Configuration
CloudStack
Application Template
Account Infrastructure
CloudStack configures the Netscaler via the NITRO API
Netscaler
@ShapeBlue #CloudStack #CCCEU13
Initial Configuration
CloudStack
Application Template
Account Infrastructure
Netscaler makes the API call back to CloudStack to launch the Minimum amount of instances in the policy
Netscaler
@ShapeBlue #CloudStack #CCCEU13
Initial Configuration
CloudStack
Application Template
Account Infrastructure
CloudStack launches the Instances from the Application Template
Netscaler
@ShapeBlue #CloudStack #CCCEU13
Process
CloudStack
Application Template
Account Infrastructure
The Netscaler will wait for the quiet period to finish to allow the servers to boot and bring the applications on-line
Netscaler
@ShapeBlue #CloudStack #CCCEU13
Process
CloudStack
Application Template
Account Infrastructure
The Netscaler binds the IP’s of the Instances to the service group hosted on the Netscaler
Netscaler
@ShapeBlue #CloudStack #CCCEU13
Lifecycle
CloudStack
Application Template
Account Infrastructure
Users start to visit the site and the Netscaler monitors the SNMP metrics from the instances
NetscalerUsers
@ShapeBlue #CloudStack #CCCEU13
Lifecycle
CloudStack
Application Template
Account Infrastructure
User count continues to rise and the server group starts to hit the metrics set in the auto scale policy
NetscalerUsers
@ShapeBlue #CloudStack #CCCEU13
Lifecycle
CloudStack
Application Template
Account Infrastructure
The Netscaler then uses its API command to contact CloudStack to launch more instances
NetscalerUsers
@ShapeBlue #CloudStack #CCCEU13
Lifecycle
CloudStack
Application Template
Account Infrastructure
The Instance is again given its quite time to boot and start the application
NetscalerUsers
@ShapeBlue #CloudStack #CCCEU13
Lifecycle
CloudStack
Application Template
Account Infrastructure
The instance is now running and registered to the NetScaler service group online and all servers are back under the counters for the Auto Scale
NetscalerUsers
@ShapeBlue #CloudStack #CCCEU13
Lifecycle
CloudStack
Application Template
Account Infrastructure
This process will be repeated as needed until the policy hits the max instances count
NetscalerUsers
@ShapeBlue #CloudStack #CCCEU13
Lifecycle
CloudStack
Application Template
Account Infrastructure
If user numbers reduce the server again hits the AutoScale scale down policy counters
NetscalerUsers
@ShapeBlue #CloudStack #CCCEU13
Lifecycle
CloudStack
Application Template
Account Infrastructure
The Netscaler sends the API command to the CloudStack Server to destroy under utilised instances
NetscalerUsers
@ShapeBlue #CloudStack #CCCEU13
Lifecycle
CloudStack
Application Template
Account Infrastructure
The System is now back to running the appropriate amount of instances as needed
NetscalerUsers
@ShapeBlue #CloudStack #CCCEU13
Should be driven by the end userVM Template with appropriate setupCustomer account with API enabledCustomer CloudStack Isolated Network stood up with a min of one VM running to provision the virtual router
User System Requirements
@ShapeBlue #CloudStack #CCCEU13
SNMP needs to be enabled on boot and configured with community name and portIf needed allow port 161 for UDP access via the firewallApplication to be launched on first boot
For example on a web application the web server would need to be running and the application to be configured
with database settings to automatically join the pool.Alternative is to have a configuration management system configure the VM as a post-provisioning action E.G. Puppet or Chef
Creation of Templates
@ShapeBlue #CloudStack #CCCEU13
Adding the AutoScale Policy
@ShapeBlue #CloudStack #CCCEU13
AutoScale Configuration Screen
@ShapeBlue #CloudStack #CCCEU13
AutoScale Configuration Wizard
Selected template Compute offering for the selected instance. i.e. CPU, no of CPU’s, RAM etc. Min Instance – VMs count, if a VM is in a down state it is not counted in the min
count and the AutoScale feature will spin up another instance Max Instance – VMs count Remember that the domain limits on adding instances
needs to be large enough for this to scale as needed
@ShapeBlue #CloudStack #CCCEU13
Duration that the policy counters need to be at the specific range across the group
AutoScale Configuration Wizard
@ShapeBlue #CloudStack #CCCEU13
AutoScale Configuration Wizard
@ShapeBlue #CloudStack #CCCEU13
AutoScale Configuration Wizard
Polling Interval in seconds for the SNMP monitoring Quiet time to allow for boot and application registration
@ShapeBlue #CloudStack #CCCEU13
API to list existing countershttp://192.168.21.76:8096/client/api/?command=listCounters
API to add a new counter (OID)http://192.168.21.76:8096/client/api?command=createCounter&name=WindowsCPUPercentage&source=snmp&value=1.3.6.1.2.1.25.3.3.1.2.2
Adding OIDS
@ShapeBlue #CloudStack #CCCEU13
Netscaler GUI checks
@ShapeBlue #CloudStack #CCCEU13
Apache CloudStack 4.1 +Citrix Netscaler 10.0 Build 71.6016.e +
Version Requirements
@ShapeBlue #CloudStack #CCCEU13
Basic Zone needs NetScaler EIP and ELB as network offeringAdvanced Zone needs a Network offering utilising a NetScaler for load balancingSet Global Config Parameter "endpointe.url" with the management server IP or floating IP if load balanced
Administrator Considerations
@ShapeBlue #CloudStack #CCCEU13
No special configuration is required on the NetScalerSetup the Citrix Netscaler with appropriate NSIPNetScaler should be added into CloudStack in the standard way, as an external device in either dedicated or shared modeA network offering will need to be created, utilising NetScaler as the Load Balancer
Configuration of the Citrix Netscaler