autoscale without netscaler_ccceu13

13
AutoScale without NetScaler Tuna - @ngtuna11

Upload: nguyen-anh-tu

Post on 15-Jan-2015

783 views

Category:

Technology


0 download

DESCRIPTION

AutoScale without NetScaler - CCCEU13 - Amsterdam, 2013

TRANSCRIPT

Page 1: Autoscale without netscaler_ccceu13

AutoScale without NetScaler

Tuna - @ngtuna11

Page 2: Autoscale without netscaler_ccceu13

Agenda

AutoScale with NetScaler• Glossary• Top-level operation

AutoScale without NetScaler• Xapi RRDs• Demo

Page 3: Autoscale without netscaler_ccceu13

AutoScale with NetScaler

Page 4: Autoscale without netscaler_ccceu13

Glossary

Source: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Autoscaling

Counter

Condition

AutoScale Policy

AutoScale VM Profile

AutoScale VM Group

Timing parameters:

Duration Quiet time

Interval Destroy vm grace period

Page 5: Autoscale without netscaler_ccceu13

NetScaler entity contains 3 components:

Source: http://support.citrix.com/proddocs/topic/ns-system-10-1-map/ns-autoscale-how-autoscale-works-con.html

Steps:

1. CS uses NetScaler API to push AutoScale configuration

2. NetScaler calls CS API requests to deploy min number of VMs

3. CS provisions min number of VMs on hypervisor

4. NetScaler discovers the newly created VM's IP addresses, binds them into service group and loadbalances traffic to VMs

5. NetScaler monitors service group by collecting SNMP metrics from the VMs

6. NetScaler triggers scale-up or scale-down events based-on pre-defined policies at step 1.

• A Load Balancing virtual server

• A Service Group• Monitors

Page 6: Autoscale without netscaler_ccceu13

AutoScale without NetScaler

Page 7: Autoscale without netscaler_ccceu13

a native solution

reproduce NetScaler AutoScale engine operation

What is it ?

Page 8: Autoscale without netscaler_ccceu13

Reproduce

Load Balancing Virtual Server Virtual Router’s HAProxy

NetScaler / SNMP Monitor XenServer API RRDs

Service Group Apache CloudStack code

Configuration Parameters

Page 9: Autoscale without netscaler_ccceu13

Xapi RRDsRound Robin Databases

• Consist of Round Robin Archieves (RRAs) in a fixed size database

Store performance metrics on a per host and a per VM basis

Can be queried over HTTP or the RRD2CSV tool

XenCenter uses this data to produce system performance graphs

Data granularity• Every 5s for the duration of 10min• Every min for the pass 2h• Every hour for the pass week• Every day for the pass year

Consolidation Functions• AVERAGE• MIN• MAX

Source: http://wiki.xen.org/wiki/XAPI_RRDshttp://support.citrix.com/servlet/KbServlet/download/34969-102-704897/reference.pdfhttp://www.xenserver.org/partners/developing-products-for-xenserver/18-sdk-development/96-xs-dev-rrds.html

Page 10: Autoscale without netscaler_ccceu13

Steps:

1. Users submit AutoScale configuration using CloudStack API

2. CS provisions min number of VMs on hypervisor

3. CS provisions min number of VMs on hypervisor

4. CloudStack binds the new VM into service group and loadbalances traffic to VMs using HAProxy on VirtualRouter

5. CloudStack monitors service group by collecting metrics from the VMs via Xapi RRDs

6. CloudStack triggers scale-up or scale-down events based-on pre-defined policies at step 1.

Page 11: Autoscale without netscaler_ccceu13

Getting RRDs over HTTP

Downloading the whole RRD• Downloading a Host RRD

• Downloading a VM RRD

wget http://<server>/host_rrd?session_id=OpaqueRef:<SESSION HANDLE>

wget http://<server>/vm_rrd?session_id=OpaqueRef:<SESSION HANDLE>&uuid=<VM UUID>

Page 12: Autoscale without netscaler_ccceu13

Getting RRDs over HTTP

Getting update from the RRD• Downloading RRD update for a Host

• Downloading RRD update for all VMs

• Downloading RRD update specifying CF

wget http://<server>/rrd_updates?session_id=OpaqueRef:<SESSION HANDLE>&start=10258122541&host=true

wget http://<server>/rrd_updates?session_id=OpaqueRef:<SESSION HANDLE>&start=10258122541

wget http://<server>/rrd_updates?session_id=OpaqueRef:<SESSION HANDLE>&start=10258122541&cf=AVERAGE

Page 13: Autoscale without netscaler_ccceu13

Demo

Insert Presentation Title Here