1. Auto Scaling with Apache
CloudStack
Paul Gosden
Technical lead of networking services division
paul.gosden@shapeblue.com
Twitter: @ShapeBlue
2. Overview
What is AutoScale?
AutoScale allows systems to dynamically react to a set of
defined metrics and to scale resources accordingly.
Providing : High Availability
Cost Saving
Energy Saving
@ShapeBlue #CloudStack #CCCEU13
3. Use Cases
Applications or services that see elasticity in their demand.
Launching a new website with unknown visitor numbers
Viral marketing campaigns, these can present unpredictable traffic loads
as some work and some don’t
An 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
@ShapeBlue #CloudStack #CCCEU13
4. Example Life Cycle
A new web company designs and builds an application based
on a web service that supplies concert tickets
Low capital reserves – Limited resources for Compute
platform
Designed their application to be stateless
Limited budget for advertising so are using social media in
the hope that it goes viral
@ShapeBlue #CloudStack #CCCEU13
20. User System Requirements
Should be driven by the end user
VM Template with appropriate setup
Customer account with API enabled
Customer CloudStack Isolated Network stood up with a min
of one VM running to provision the virtual router
@ShapeBlue #CloudStack #CCCEU13
21. Creation of Templates
SNMP needs to be enabled on boot and configured with
community name and port
If needed allow port 161 for UDP access via the firewall
Application 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
@ShapeBlue #CloudStack #CCCEU13
24. 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
27. AutoScale Configuration Wizard
Polling Interval in seconds for the SNMP monitoring
Quiet time to allow for boot and application registration
@ShapeBlue #CloudStack #CCCEU13
28. Adding OIDS
API to list existing counters
http://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
@ShapeBlue #CloudStack #CCCEU13
31. Administrator Considerations
Basic Zone needs NetScaler EIP and ELB as network offering
Advanced Zone needs a Network offering utilising a
NetScaler for load balancing
Set Global Config Parameter "endpointe.url" with the
management server IP or floating IP if load balanced
@ShapeBlue #CloudStack #CCCEU13
32. Configuration of the Citrix Netscaler
No special configuration is required on the NetScaler
Setup the Citrix Netscaler with appropriate NSIP
NetScaler should be added into CloudStack in the standard
way, as an external device in either dedicated or shared
mode
A network offering will need to be created, utilising
NetScaler as the Load Balancer
@ShapeBlue #CloudStack #CCCEU13
Notas do Editor
Auto scaling is the process of automatically provisioning instances and destroying instances as specified metrics dictates.Examples of these could be CPU Load on instances or networking response times.Auto scaling is particularly well suited for applications that experience hourly, daily or weekly elasticity in usage.Today, cloud computing is totally revolutionizing the way computer resources are allocated, making it possible to build a fully scalable server setup on Apache CloudStack.
This can be done via the GUI or API.Remember to have the application template ready to go when adding this which we will cover later.An admin of CloudStack does not have to do this, the end user can provision this!
CloudStack pushes the AutoScale configuration to the NetScaler appliance, by using the NetScaler NITRO API. This creates AutoScale-related entities on the NetScaler appliance, including a load balancing virtual server, a service group, and monitors
The AutoScale engine on the NetScaler appliance makes API requests to CloudStack to initially deploy the minimum number of virtual machines required.
CloudStack in turn provisions the minimum number of instances (VMs) on the hypervisors (virtualization hosts) it manages.
The NetScaler appliance discovers the IP addresses assigned by CloudStack to the newly created VMs and binds them, as services, to the service group representing them. This enables the NetScaler appliance to load balance traffic and the VMs to receive traffic, respectively.
NetScaler monitors that are bound to the service group start monitoring the load by collecting SNMP metrics from the instances.
A social media campaign goes viralCloudStack will average out the measured item across the pool of servers rather than picking individual ones.
A social media campaign goes viral
A social media campaign goes viral
A social media campaign goes viral
A social media campaign goes viral
Sign up slows down and everyone moves onto the next “big” thing
The endpointe.url can be either a fixed IP on a single management server or a load balanced VIP on a multi-server setup.Also only support with NetScaler at the moment,
This Shows a basic Zone shared network from a user point to view. Once we access the networks and select the shared network the load balancer tab will appear and enable us to set up the name, ports and load balancing algorithm For Load Balancing and stickiness
So In This exampleTemplateCompute offeringMin and Max instancesScale UP PolicyScale Down Policy
Remember to take into account the max instances and the accounts limits
Duration – How long does the policy need to be “true” for before the AutoScale invokes the policy.Counter – What is the metric for being monitored i.e. CPU idle, CPU system as a percentage but also could be a response time i.e. in microsecondsOperator – Greater Than ,less than etc. normal logic.Threshold – This could be a percentage i.e. 80% or a actual figure as in response times.
The endpointe.url can be either a fixed IP on a single management server or a load balanced VIP on a multi-server setup.Also will only support with NetScaler at the moment