Your SlideShare is downloading. ×
Cloudstack autoscaling
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

Cloudstack autoscaling

1,431
views

Published on

Auto scaling with cloudstack and Citrix netscaler.

Auto scaling with cloudstack and Citrix netscaler.

Published in: Technology

0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,431
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
76
Comments
0
Likes
3
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • 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
  • Transcript

    • 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
    • 5. Initial Configuration Netscaler Account Infrastructure End User CloudStack End user configures the CloudStack AutoScale policy on the network @ShapeBlue #CloudStack #CCCEU13 Application Template
    • 6. Initial Configuration Netscaler Account Infrastructure CloudStack CloudStack configures the Netscaler via the NITRO API @ShapeBlue #CloudStack #CCCEU13 Application Template
    • 7. Initial Configuration Netscaler Account Infrastructure CloudStack Netscaler makes the API call back to CloudStack to launch the Minimum amount of instances in the policy @ShapeBlue #CloudStack #CCCEU13 Application Template
    • 8. Initial Configuration Netscaler Account Infrastructure CloudStack CloudStack launches the Instances from the Application Template Application Template @ShapeBlue #CloudStack #CCCEU13
    • 9. Process Netscaler Account Infrastructure CloudStack The Netscaler will wait for the quiet period to finish to allow the servers to boot and bring the applications on-line @ShapeBlue #CloudStack #CCCEU13 Application Template
    • 10. Process Netscaler Account Infrastructure CloudStack The Netscaler binds the IP’s of the Instances to the service group hosted on the Netscaler @ShapeBlue #CloudStack #CCCEU13 Application Template
    • 11. Lifecycle Users Netscaler Account Infrastructure CloudStack Users start to visit the site and the Netscaler monitors the SNMP metrics from the instances @ShapeBlue #CloudStack #CCCEU13 Application Template
    • 12. Lifecycle Users Netscaler Account Infrastructure CloudStack User count continues to rise and the server group starts to hit the metrics set in the auto scale policy @ShapeBlue #CloudStack #CCCEU13 Application Template
    • 13. Lifecycle Users Netscaler Account Infrastructure CloudStack The Netscaler then uses its API command to contact CloudStack to launch more instances @ShapeBlue #CloudStack #CCCEU13 Application Template
    • 14. Lifecycle Users Netscaler Account Infrastructure CloudStack The Instance is again given its quite time to boot and start the application @ShapeBlue #CloudStack #CCCEU13 Application Template
    • 15. Lifecycle Users Netscaler Account Infrastructure CloudStack 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 @ShapeBlue #CloudStack #CCCEU13 Application Template
    • 16. Lifecycle Users Netscaler Account Infrastructure CloudStack This process will be repeated as needed until the policy hits the max instances count @ShapeBlue #CloudStack #CCCEU13 Application Template
    • 17. Lifecycle Users Netscaler Account Infrastructure CloudStack If user numbers reduce the server again hits the AutoScale scale down policy counters @ShapeBlue #CloudStack #CCCEU13 Application Template
    • 18. Lifecycle Users Netscaler Account Infrastructure CloudStack The Netscaler sends the API command to the CloudStack Server to destroy under utilised instances @ShapeBlue #CloudStack #CCCEU13 Application Template
    • 19. Lifecycle Users Netscaler Account Infrastructure CloudStack The System is now back to running the appropriate amount of instances as needed @ShapeBlue #CloudStack #CCCEU13 Application Template
    • 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
    • 22. Adding the AutoScale Policy @ShapeBlue #CloudStack #CCCEU13
    • 23. AutoScale Configuration Screen @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
    • 25. AutoScale Configuration Wizard Duration that the policy counters need to be at the specific range across the group @ShapeBlue #CloudStack #CCCEU13
    • 26. AutoScale Configuration Wizard @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
    • 29. Netscaler GUI checks @ShapeBlue #CloudStack #CCCEU13
    • 30. Version Requirements Apache CloudStack 4.1 + Citrix Netscaler 10.0 Build 71.6016.e + @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