http://vietopenstack.org
Horizontal/Vertical Auto Scalingconcept in
Hieu LE <[email protected]>Vietnam OpenStack Community
Outline
• Intro• AutoScaling: horizontal/vertical
• Concept• Monitoring (input)
• Decision support machine
• Scaling (action)
• Demo
9/22/2015 2
Intro
• Solutions (depend on the resources that system load take rezpons)
• Increase these resources (CPU, RAM, Storage..)
• Buy new server (system?) and share loads between them.
9/22/2015 4
Intro
• Solutions (depend on the resources that system load take rezpons)
• Increase these resources (CPU, RAM) Vertical Scaling
• Buy new server (system?) and share loads between them. Horizontal Scaling
9/22/2015 5
AutoScaling
• Concept: 3 components• Monitoring System: metrics (counters). <2 approaches: agentless, agent>
• Decision Support machine: rules (conditions), rule-conflict resolver.
• Scaling engine: action trigger (scale up/down, out/in).
9/22/2015 9
Monitor DS Scaling engine
Monitoring
• Metrics (Counter): amount of which resource you want to check in realtime. Used for measuring and calculating based on the scaling policies (rules)
• Agentless: hypervisor based.• E.g: libvirt API (KVM), XAPI RRD (Xen)
• Pros: Fast, security.
• Cons: The metrics are too simple (CPU, MEM, Storage – FullVirt; Network RX/TX –ParaVirt)
• Agent:• E.g: SNMP ..
• Pros: Flexible and easily to manage
• Cons: Slow, sometimes can break user’s policies.
9/22/2015 10
DS
• Decision Support Machine: grab the output from monitoring, based on user’s policies (rules) and calculate the most satisfied actions.
• E.g:• Rules:
• if CPU > 80% then scale-up CPU to 4 cores 3.7GHz
• If Memory < 30% then scale-in to <n-1> VMs
• Careful about DS Scope: based on VM or a group of VMs ?
9/22/2015 14
DS
• Why we need the DS ?
• Mesh case:• Input metrics: CPU, MEM, Concurrent Connections. (CCC)
• Rules (scope is VM):
• If CPU > 80% then Scale-out plus 01 VMs and LB between them.
• If Mem > 85% then Scale-out plus 01 VMs and LB between them.
• If CCC > 1000 then Scale-up CPU to 4 core 3.5GHz.
• If CPU < 20% then Scale-in 01 VMs.
• If Mem < 25% then Scale-in 01 VMs.
• So:
• What if 01 VM have 80% CPU load and 10% Mem ?
9/22/2015 15
DS
• DS need a conflict resolver.
• Approaches:• Rule-conflict check before apply auto-scaling.
• Using some algorithm for decision support:
• Neural Network
• Fuzzy Logic
• Neuro-Fuzzy (ANFIS)
9/22/2015 16
Scaling engine
• Based on cloud computing platform you manage.
• OpenStack: Heat, Ceilometer, Mistral.
• Docker: Marathon, Swarm, Mesos.
• CloudStack: VR.
9/22/2015 17