SlideShare a Scribd company logo
Autoscaler Architecture

Lahiru Sandaruwan
Apache Committer - Stratos(Incubating) , Software Engineer - WSO2 Inc
Agenda
•
•

Introduction to Autoscaling
Apache Stratos Autoscaler Architecture
•

•
•
•

Component Architecture

•
Event Flow
Autoscale Policy
•
Introduction to Autoscaler Policy
•
Autoscaling Strategies
Deployment Policy •
Introduction to Deployment Policy
•
Capacity Planning with Deployment Policy
•
Partition Selection Algorithms
Rules Engine
•
Reasons for a Rule Engine
•
Rules for Apache Stratos Autoscaler

1
Introduction to Autoscaling
•

•
•

•

What is scalability
• Horizontal and vertical scaling
What is high availability
Proceedure
• Clustering
• Load balancing
Autoscaling
• Automating the capacity planning

2
Introduction to Autoscaling Contd.
•
•
•
•
•

Flexible cloud solution
•
•

User-defined policies, health status checks, and schedules.
Use case, cost, performance, and infrastructure.

SLA(Service Level Agreement) aware elastic cloud
•
•
•

QoS , SLA aware services
Daecision factors to consumers
Solves performance, availability, and economic costs issues

Capacity planning
•

Automated control of cloud: cost vs. Qos, find appropriate cloud model.

Cost Factor
•

Reduce economic cost and energy footprint

Proceedure
•
•
•
•

Online observation and monitoring the cloud
Trigger an event if a SLA violation happened
Use control theory and mathematical operations
Handling seasonal patterns. E.g. Year ends/ Weekends patterns

3
Autoscaler
Component
Architecture

4
Event
Flow

5
Health Statistics as Events
•

CEP receives events
•
Requests in flight from Load balancer
•
Cartridge instance health statistics from Cartridge agent
•
CPU consumption
•
Memory consumption
•
CEP summarize the Average, Gradient, and Second derivative events of,
•
Requests in Flight
•
CPU consumption
•
Memory consumption

6
Autoscale Policy
•

Deployable Xml model

•

Keeps Load thresholds for threshold based rules evaluation.

•

Deployed by Dev-ops or similar role at start or later

•

Hot Deployable.

•

Users Selects an Autoscale Policy on His Preference at Subscription Time.

7
Autoscale Policy contd.
<autoscalePolicy id="economy-autoscale">
<loadThresholds>
<requestsInFlight>
<average value="40" />
<gradient value="1" />
<secondDerivative value="0" />
<scaleDownMarginOfGradient value="1.0" />
<scaleDownMarginOfSecondDerivative value="0.2" />
</requestsInFlight>
<memoryConsumption>
...
</memoryConsumption>
<loadAverage>
...
</loadAverage>
</loadThresholds>
</autoscalePolicy>

8
Deployment Policy
•

Deployable xml model

•

Keeps the Capacity Planning.

•

Deployed by Dev-ops or similar role at start or later

•

Hot Deployable.

•

Users Selects an Deployment Policy on His Preference at Subscription Time.

9
Deployment Policy contd.
<deploymentPolicy id =”economy-deployment”>
<partitionGroups>
<partitionGroup id=”group1” >
<partitionAlgo>OneAfterAnother</partitionAlgo>
<partition id="partition1" >
<max>3</max>
<min>1</min>
</partition>
<partition id="partition2" >
<max>5</max>
<min>1</min>
</partition>
<partition id="partition3">
<max>20</max>
<min>1</min>
</partition>
</partitionGroup>
...
</deploymentPolicy>

10
Rules Engine
•
•
•

Why a Rules Engine

•
•
•

Ease of use: No byte code and easy to modify
Readable
Performances and sclability

Uses Drools engine as the default rules engine
Rules
• Minimum Rule
• Scale Up Rule
• Scale Down Rule
• Terminate All Rule
11
Autoscaling Rules: Sample in
Drools

rule "Minimum Rule"
dialect "mvel"
when
$service : Service ()
$cluster : Cluster () from $service.getClusters()
$policy : AutoscalePolicy(id == $cluster.autoscalePolicyName ) from $manager.getPolicyList()
$partition : Partition () from $policy.getHAPolicy().getPartitions()
$clusterContext : ClusterContext() from $context.getClusterContext($cluster.getClusterId())
eval($clusterContext.getPartitionCount($partition.getId()) < $partition.getPartitionMembersMin() )
then
int memberCountToBeIncreased = 1;
if($evaluator.delegateSpawn($partition,$cluster.getClusterId(), memberCountToBeIncreased)){
$clusterContext.increaseMemberCountInPartition($partition.getId(), memberCountToBeIncreased);
}
end

12
Minimum Rule
•

This runs when a “cluster created” event is received

•

Scan through all the partitions of the cluster and find minimums

•

Call CC for spawning required minimum instances

•

This will be also run periodically(with a higher time interval than scale up/down
rules) to assure that the minimum count is preserved

13
Scale Up/Down Rule
•

These rules run periodically

•

Evaluate load details(Received from CEP) against their thresholds(defined in
Autoscale Policy).

•

Decide whether to scale up, scale down, or do nothing

•

Call CC for spawning instances in selected partitions

14
Autoscaling Strategies
•

•

Threshold based autoscaling

Predictive or proactive auto-scaling techniques
• Kalman Filter
• Control Theory
• Time series analysis

15
Average of Requests In Flight at LB for a Specific Cluster

16
Average of CPU/ Memory Consumption for a Specific Cluster

17
Terminate All Rule
•

•
•

This runs when a “cluster removed” event is received

Scan through all the partitions of the cluster and find member IDs to be
terminated
Call CC for terminating those instances

18
Fault Handling Scenarios
Process

VM

Down

Up

Down

Down(It can be that
agent is crashed)

Up

Up(but network
issue)

Decision flow

•
•
•
•
•
•
•
•
•

Cartridge agent publish event to CC
CC updates instance status in topology
Autoscaler decides to kill it
CEP identify that & publish event to Autoscaler
Autoscaler calls CC to terminate(if available) and remove the instance from
topology
Autoscaler will spawn another to cover that
CEP sends statistics on fault requests to Autoscaler
Autoscaler keep monitoring it and takes a decision to terminate the instance
Autoscaler will spawn another in the same partition to cover that

19
References
1.
2.
3.

http://eurosys2010-dev.sigops-france.fr/workshops/FeBID2010/bouchenak.pdf
http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/WhatIsAutoScaling.html
http://www.sc.ehu.es/ccwbayes/isg/administrator/components/com_jresearch/files/publications/autoscaling.pdf

20
Join Us
Website
http://stratos.incubator.apache.org

Mailing List
Subscribe: dev-subscribe@stratos.incubator.apache.org
Post (After subscription): dev@stratos.incubator.apache.org

Social Media
Google+: https://plus.google.com/103515557134069849802
Twitter: https://twitter.com/ApacheStratos
Facebook: https://www.facebook.com/apache.stratos
LinkedIn: http://www.linkedin.com/groups?home=&gid=5131436
21
Thank you

22
Ad

More Related Content

What's hot (20)

How to Autoscale in Apache Cloudstack using LiquiD AutoScaler
How to Autoscale in Apache Cloudstack using LiquiD AutoScalerHow to Autoscale in Apache Cloudstack using LiquiD AutoScaler
How to Autoscale in Apache Cloudstack using LiquiD AutoScaler
Bob Bennink
 
Openstack heat & How Autoscaling works
Openstack heat & How Autoscaling worksOpenstack heat & How Autoscaling works
Openstack heat & How Autoscaling works
CoreStack
 
Spring Cloud and Netflix Components
Spring Cloud and Netflix ComponentsSpring Cloud and Netflix Components
Spring Cloud and Netflix Components
Dharshan Sastry B N
 
Autoscale without netscaler_ccceu13
Autoscale without netscaler_ccceu13Autoscale without netscaler_ccceu13
Autoscale without netscaler_ccceu13
Nguyen Anh Tu
 
Apache Kafka® Security Overview
Apache Kafka® Security OverviewApache Kafka® Security Overview
Apache Kafka® Security Overview
confluent
 
Fully fault tolerant real time data pipeline with docker and mesos
Fully fault tolerant real time data pipeline with docker and mesos Fully fault tolerant real time data pipeline with docker and mesos
Fully fault tolerant real time data pipeline with docker and mesos
Rahul Kumar
 
Best Practice for Deploying Application with Heat
Best Practice for Deploying Application with HeatBest Practice for Deploying Application with Heat
Best Practice for Deploying Application with Heat
Ethan Lynn
 
AWS Study Group - Chapter 10 - Matching Supply and Demand [Solution Architect...
AWS Study Group - Chapter 10 - Matching Supply and Demand [Solution Architect...AWS Study Group - Chapter 10 - Matching Supply and Demand [Solution Architect...
AWS Study Group - Chapter 10 - Matching Supply and Demand [Solution Architect...
QCloudMentor
 
Cloudstack autoscaling
Cloudstack autoscalingCloudstack autoscaling
Cloudstack autoscaling
ShapeBlue
 
Container Orchestrator Smackdown @ContinousLifecycle
Container Orchestrator Smackdown @ContinousLifecycleContainer Orchestrator Smackdown @ContinousLifecycle
Container Orchestrator Smackdown @ContinousLifecycle
Michael Mueller
 
Kafka aws
Kafka awsKafka aws
Kafka aws
Ariel Moskovich
 
Akka at Enterprise Scale: Performance Tuning Distributed Applications
Akka at Enterprise Scale: Performance Tuning Distributed ApplicationsAkka at Enterprise Scale: Performance Tuning Distributed Applications
Akka at Enterprise Scale: Performance Tuning Distributed Applications
Lightbend
 
Tales from the four-comma club: Managing Kafka as a service at Salesforce | L...
Tales from the four-comma club: Managing Kafka as a service at Salesforce | L...Tales from the four-comma club: Managing Kafka as a service at Salesforce | L...
Tales from the four-comma club: Managing Kafka as a service at Salesforce | L...
HostedbyConfluent
 
KSQL Intro
KSQL IntroKSQL Intro
KSQL Intro
confluent
 
Using Kafka as a Database For Real-Time Transaction Processing | Chad Preisle...
Using Kafka as a Database For Real-Time Transaction Processing | Chad Preisle...Using Kafka as a Database For Real-Time Transaction Processing | Chad Preisle...
Using Kafka as a Database For Real-Time Transaction Processing | Chad Preisle...
HostedbyConfluent
 
Openstack Heat
Openstack HeatOpenstack Heat
Openstack Heat
Arun prasath
 
Real time data pipeline with spark streaming and cassandra with mesos
Real time data pipeline with spark streaming and cassandra with mesosReal time data pipeline with spark streaming and cassandra with mesos
Real time data pipeline with spark streaming and cassandra with mesos
Rahul Kumar
 
9 plugin Cloudstack Developer Day
9 plugin Cloudstack Developer Day9 plugin Cloudstack Developer Day
9 plugin Cloudstack Developer Day
Kimihiko Kitase
 
Lessons Learned From PayPal: Implementing Back-Pressure With Akka Streams And...
Lessons Learned From PayPal: Implementing Back-Pressure With Akka Streams And...Lessons Learned From PayPal: Implementing Back-Pressure With Akka Streams And...
Lessons Learned From PayPal: Implementing Back-Pressure With Akka Streams And...
Lightbend
 
Microservices with Netflix OSS and Spring Cloud
Microservices with Netflix OSS and Spring CloudMicroservices with Netflix OSS and Spring Cloud
Microservices with Netflix OSS and Spring Cloud
acogoluegnes
 
How to Autoscale in Apache Cloudstack using LiquiD AutoScaler
How to Autoscale in Apache Cloudstack using LiquiD AutoScalerHow to Autoscale in Apache Cloudstack using LiquiD AutoScaler
How to Autoscale in Apache Cloudstack using LiquiD AutoScaler
Bob Bennink
 
Openstack heat & How Autoscaling works
Openstack heat & How Autoscaling worksOpenstack heat & How Autoscaling works
Openstack heat & How Autoscaling works
CoreStack
 
Spring Cloud and Netflix Components
Spring Cloud and Netflix ComponentsSpring Cloud and Netflix Components
Spring Cloud and Netflix Components
Dharshan Sastry B N
 
Autoscale without netscaler_ccceu13
Autoscale without netscaler_ccceu13Autoscale without netscaler_ccceu13
Autoscale without netscaler_ccceu13
Nguyen Anh Tu
 
Apache Kafka® Security Overview
Apache Kafka® Security OverviewApache Kafka® Security Overview
Apache Kafka® Security Overview
confluent
 
Fully fault tolerant real time data pipeline with docker and mesos
Fully fault tolerant real time data pipeline with docker and mesos Fully fault tolerant real time data pipeline with docker and mesos
Fully fault tolerant real time data pipeline with docker and mesos
Rahul Kumar
 
Best Practice for Deploying Application with Heat
Best Practice for Deploying Application with HeatBest Practice for Deploying Application with Heat
Best Practice for Deploying Application with Heat
Ethan Lynn
 
AWS Study Group - Chapter 10 - Matching Supply and Demand [Solution Architect...
AWS Study Group - Chapter 10 - Matching Supply and Demand [Solution Architect...AWS Study Group - Chapter 10 - Matching Supply and Demand [Solution Architect...
AWS Study Group - Chapter 10 - Matching Supply and Demand [Solution Architect...
QCloudMentor
 
Cloudstack autoscaling
Cloudstack autoscalingCloudstack autoscaling
Cloudstack autoscaling
ShapeBlue
 
Container Orchestrator Smackdown @ContinousLifecycle
Container Orchestrator Smackdown @ContinousLifecycleContainer Orchestrator Smackdown @ContinousLifecycle
Container Orchestrator Smackdown @ContinousLifecycle
Michael Mueller
 
Akka at Enterprise Scale: Performance Tuning Distributed Applications
Akka at Enterprise Scale: Performance Tuning Distributed ApplicationsAkka at Enterprise Scale: Performance Tuning Distributed Applications
Akka at Enterprise Scale: Performance Tuning Distributed Applications
Lightbend
 
Tales from the four-comma club: Managing Kafka as a service at Salesforce | L...
Tales from the four-comma club: Managing Kafka as a service at Salesforce | L...Tales from the four-comma club: Managing Kafka as a service at Salesforce | L...
Tales from the four-comma club: Managing Kafka as a service at Salesforce | L...
HostedbyConfluent
 
Using Kafka as a Database For Real-Time Transaction Processing | Chad Preisle...
Using Kafka as a Database For Real-Time Transaction Processing | Chad Preisle...Using Kafka as a Database For Real-Time Transaction Processing | Chad Preisle...
Using Kafka as a Database For Real-Time Transaction Processing | Chad Preisle...
HostedbyConfluent
 
Real time data pipeline with spark streaming and cassandra with mesos
Real time data pipeline with spark streaming and cassandra with mesosReal time data pipeline with spark streaming and cassandra with mesos
Real time data pipeline with spark streaming and cassandra with mesos
Rahul Kumar
 
9 plugin Cloudstack Developer Day
9 plugin Cloudstack Developer Day9 plugin Cloudstack Developer Day
9 plugin Cloudstack Developer Day
Kimihiko Kitase
 
Lessons Learned From PayPal: Implementing Back-Pressure With Akka Streams And...
Lessons Learned From PayPal: Implementing Back-Pressure With Akka Streams And...Lessons Learned From PayPal: Implementing Back-Pressure With Akka Streams And...
Lessons Learned From PayPal: Implementing Back-Pressure With Akka Streams And...
Lightbend
 
Microservices with Netflix OSS and Spring Cloud
Microservices with Netflix OSS and Spring CloudMicroservices with Netflix OSS and Spring Cloud
Microservices with Netflix OSS and Spring Cloud
acogoluegnes
 

Similar to Autoscaler architecture of apache stratos 4.0.0 (20)

Venugopal adec
Venugopal adecVenugopal adec
Venugopal adec
Srikumar Venugopal
 
Autonomic Decentralised Elasticity Management of Cloud Applications
Autonomic Decentralised Elasticity Management of Cloud ApplicationsAutonomic Decentralised Elasticity Management of Cloud Applications
Autonomic Decentralised Elasticity Management of Cloud Applications
Srikumar Venugopal
 
Autoscaling Solr - Shalin Shekhar Mangar, Lucidworks
Autoscaling Solr - Shalin Shekhar Mangar, LucidworksAutoscaling Solr - Shalin Shekhar Mangar, Lucidworks
Autoscaling Solr - Shalin Shekhar Mangar, Lucidworks
Lucidworks
 
Tech Talk on Autoscaling in Apache Stratos
Tech Talk on Autoscaling in Apache StratosTech Talk on Autoscaling in Apache Stratos
Tech Talk on Autoscaling in Apache Stratos
Vishanth Bala
 
Smart monitoring how does oracle rac manage resource, state ukoug19
Smart monitoring how does oracle rac manage resource, state ukoug19Smart monitoring how does oracle rac manage resource, state ukoug19
Smart monitoring how does oracle rac manage resource, state ukoug19
Anil Nair
 
Performance tuning Grails Applications GR8Conf US 2014
Performance tuning Grails Applications GR8Conf US 2014Performance tuning Grails Applications GR8Conf US 2014
Performance tuning Grails Applications GR8Conf US 2014
Lari Hotari
 
Deployment Checkup: How to Regularly Tune Your Cloud Environment - RightScale...
Deployment Checkup: How to Regularly Tune Your Cloud Environment - RightScale...Deployment Checkup: How to Regularly Tune Your Cloud Environment - RightScale...
Deployment Checkup: How to Regularly Tune Your Cloud Environment - RightScale...
RightScale
 
Performance tuning Grails applications
 Performance tuning Grails applications Performance tuning Grails applications
Performance tuning Grails applications
GR8Conf
 
Cpu provisioning algorithms for service differentiation in cloud based enviro...
Cpu provisioning algorithms for service differentiation in cloud based enviro...Cpu provisioning algorithms for service differentiation in cloud based enviro...
Cpu provisioning algorithms for service differentiation in cloud based enviro...
ieeepondy
 
Performance tuning Grails applications
Performance tuning Grails applicationsPerformance tuning Grails applications
Performance tuning Grails applications
Lari Hotari
 
CLOUD RESOURCE MANAGEMENT AND SCHEDULING
CLOUD RESOURCE MANAGEMENT AND SCHEDULINGCLOUD RESOURCE MANAGEMENT AND SCHEDULING
CLOUD RESOURCE MANAGEMENT AND SCHEDULING
2021ismadhuprasadrna
 
Analysis of Database Issues using AHF and Machine Learning v2 - AOUG2022
Analysis of Database Issues using AHF and Machine Learning v2 -  AOUG2022Analysis of Database Issues using AHF and Machine Learning v2 -  AOUG2022
Analysis of Database Issues using AHF and Machine Learning v2 - AOUG2022
Sandesh Rao
 
OTM Performance Review and Benchmarking
OTM Performance Review and BenchmarkingOTM Performance Review and Benchmarking
OTM Performance Review and Benchmarking
MavenWire
 
Auto-Train a Time-Series Forecast Model With AML + ADB
Auto-Train a Time-Series Forecast Model With AML + ADBAuto-Train a Time-Series Forecast Model With AML + ADB
Auto-Train a Time-Series Forecast Model With AML + ADB
Databricks
 
참여기관_발표자료-국민대학교 201301 정기회의
참여기관_발표자료-국민대학교 201301 정기회의참여기관_발표자료-국민대학교 201301 정기회의
참여기관_발표자료-국민대학교 201301 정기회의
DzH QWuynh
 
PowerShell DSC - State of the Art & Community by Gael Colas
PowerShell DSC - State of the Art & Community by Gael ColasPowerShell DSC - State of the Art & Community by Gael Colas
PowerShell DSC - State of the Art & Community by Gael Colas
UK DevOps Collective
 
Cdcr apachecon-talk
Cdcr apachecon-talkCdcr apachecon-talk
Cdcr apachecon-talk
Amrit Sarkar
 
Mongo DB on Apache Stratos
Mongo DB on Apache StratosMongo DB on Apache Stratos
Mongo DB on Apache Stratos
WSO2
 
Autoscaling Suggestions: Simplifying Operations - Varun Thacker, Lucidworks
Autoscaling Suggestions: Simplifying Operations - Varun Thacker, LucidworksAutoscaling Suggestions: Simplifying Operations - Varun Thacker, Lucidworks
Autoscaling Suggestions: Simplifying Operations - Varun Thacker, Lucidworks
Lucidworks
 
Concurrency
ConcurrencyConcurrency
Concurrency
Biju Nair
 
Autonomic Decentralised Elasticity Management of Cloud Applications
Autonomic Decentralised Elasticity Management of Cloud ApplicationsAutonomic Decentralised Elasticity Management of Cloud Applications
Autonomic Decentralised Elasticity Management of Cloud Applications
Srikumar Venugopal
 
Autoscaling Solr - Shalin Shekhar Mangar, Lucidworks
Autoscaling Solr - Shalin Shekhar Mangar, LucidworksAutoscaling Solr - Shalin Shekhar Mangar, Lucidworks
Autoscaling Solr - Shalin Shekhar Mangar, Lucidworks
Lucidworks
 
Tech Talk on Autoscaling in Apache Stratos
Tech Talk on Autoscaling in Apache StratosTech Talk on Autoscaling in Apache Stratos
Tech Talk on Autoscaling in Apache Stratos
Vishanth Bala
 
Smart monitoring how does oracle rac manage resource, state ukoug19
Smart monitoring how does oracle rac manage resource, state ukoug19Smart monitoring how does oracle rac manage resource, state ukoug19
Smart monitoring how does oracle rac manage resource, state ukoug19
Anil Nair
 
Performance tuning Grails Applications GR8Conf US 2014
Performance tuning Grails Applications GR8Conf US 2014Performance tuning Grails Applications GR8Conf US 2014
Performance tuning Grails Applications GR8Conf US 2014
Lari Hotari
 
Deployment Checkup: How to Regularly Tune Your Cloud Environment - RightScale...
Deployment Checkup: How to Regularly Tune Your Cloud Environment - RightScale...Deployment Checkup: How to Regularly Tune Your Cloud Environment - RightScale...
Deployment Checkup: How to Regularly Tune Your Cloud Environment - RightScale...
RightScale
 
Performance tuning Grails applications
 Performance tuning Grails applications Performance tuning Grails applications
Performance tuning Grails applications
GR8Conf
 
Cpu provisioning algorithms for service differentiation in cloud based enviro...
Cpu provisioning algorithms for service differentiation in cloud based enviro...Cpu provisioning algorithms for service differentiation in cloud based enviro...
Cpu provisioning algorithms for service differentiation in cloud based enviro...
ieeepondy
 
Performance tuning Grails applications
Performance tuning Grails applicationsPerformance tuning Grails applications
Performance tuning Grails applications
Lari Hotari
 
CLOUD RESOURCE MANAGEMENT AND SCHEDULING
CLOUD RESOURCE MANAGEMENT AND SCHEDULINGCLOUD RESOURCE MANAGEMENT AND SCHEDULING
CLOUD RESOURCE MANAGEMENT AND SCHEDULING
2021ismadhuprasadrna
 
Analysis of Database Issues using AHF and Machine Learning v2 - AOUG2022
Analysis of Database Issues using AHF and Machine Learning v2 -  AOUG2022Analysis of Database Issues using AHF and Machine Learning v2 -  AOUG2022
Analysis of Database Issues using AHF and Machine Learning v2 - AOUG2022
Sandesh Rao
 
OTM Performance Review and Benchmarking
OTM Performance Review and BenchmarkingOTM Performance Review and Benchmarking
OTM Performance Review and Benchmarking
MavenWire
 
Auto-Train a Time-Series Forecast Model With AML + ADB
Auto-Train a Time-Series Forecast Model With AML + ADBAuto-Train a Time-Series Forecast Model With AML + ADB
Auto-Train a Time-Series Forecast Model With AML + ADB
Databricks
 
참여기관_발표자료-국민대학교 201301 정기회의
참여기관_발표자료-국민대학교 201301 정기회의참여기관_발표자료-국민대학교 201301 정기회의
참여기관_발표자료-국민대학교 201301 정기회의
DzH QWuynh
 
PowerShell DSC - State of the Art & Community by Gael Colas
PowerShell DSC - State of the Art & Community by Gael ColasPowerShell DSC - State of the Art & Community by Gael Colas
PowerShell DSC - State of the Art & Community by Gael Colas
UK DevOps Collective
 
Cdcr apachecon-talk
Cdcr apachecon-talkCdcr apachecon-talk
Cdcr apachecon-talk
Amrit Sarkar
 
Mongo DB on Apache Stratos
Mongo DB on Apache StratosMongo DB on Apache Stratos
Mongo DB on Apache Stratos
WSO2
 
Autoscaling Suggestions: Simplifying Operations - Varun Thacker, Lucidworks
Autoscaling Suggestions: Simplifying Operations - Varun Thacker, LucidworksAutoscaling Suggestions: Simplifying Operations - Varun Thacker, Lucidworks
Autoscaling Suggestions: Simplifying Operations - Varun Thacker, Lucidworks
Lucidworks
 
Ad

Recently uploaded (20)

Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Ad

Autoscaler architecture of apache stratos 4.0.0

  • 1. Autoscaler Architecture Lahiru Sandaruwan Apache Committer - Stratos(Incubating) , Software Engineer - WSO2 Inc
  • 2. Agenda • • Introduction to Autoscaling Apache Stratos Autoscaler Architecture • • • • Component Architecture • Event Flow Autoscale Policy • Introduction to Autoscaler Policy • Autoscaling Strategies Deployment Policy • Introduction to Deployment Policy • Capacity Planning with Deployment Policy • Partition Selection Algorithms Rules Engine • Reasons for a Rule Engine • Rules for Apache Stratos Autoscaler 1
  • 3. Introduction to Autoscaling • • • • What is scalability • Horizontal and vertical scaling What is high availability Proceedure • Clustering • Load balancing Autoscaling • Automating the capacity planning 2
  • 4. Introduction to Autoscaling Contd. • • • • • Flexible cloud solution • • User-defined policies, health status checks, and schedules. Use case, cost, performance, and infrastructure. SLA(Service Level Agreement) aware elastic cloud • • • QoS , SLA aware services Daecision factors to consumers Solves performance, availability, and economic costs issues Capacity planning • Automated control of cloud: cost vs. Qos, find appropriate cloud model. Cost Factor • Reduce economic cost and energy footprint Proceedure • • • • Online observation and monitoring the cloud Trigger an event if a SLA violation happened Use control theory and mathematical operations Handling seasonal patterns. E.g. Year ends/ Weekends patterns 3
  • 7. Health Statistics as Events • CEP receives events • Requests in flight from Load balancer • Cartridge instance health statistics from Cartridge agent • CPU consumption • Memory consumption • CEP summarize the Average, Gradient, and Second derivative events of, • Requests in Flight • CPU consumption • Memory consumption 6
  • 8. Autoscale Policy • Deployable Xml model • Keeps Load thresholds for threshold based rules evaluation. • Deployed by Dev-ops or similar role at start or later • Hot Deployable. • Users Selects an Autoscale Policy on His Preference at Subscription Time. 7
  • 9. Autoscale Policy contd. <autoscalePolicy id="economy-autoscale"> <loadThresholds> <requestsInFlight> <average value="40" /> <gradient value="1" /> <secondDerivative value="0" /> <scaleDownMarginOfGradient value="1.0" /> <scaleDownMarginOfSecondDerivative value="0.2" /> </requestsInFlight> <memoryConsumption> ... </memoryConsumption> <loadAverage> ... </loadAverage> </loadThresholds> </autoscalePolicy> 8
  • 10. Deployment Policy • Deployable xml model • Keeps the Capacity Planning. • Deployed by Dev-ops or similar role at start or later • Hot Deployable. • Users Selects an Deployment Policy on His Preference at Subscription Time. 9
  • 11. Deployment Policy contd. <deploymentPolicy id =”economy-deployment”> <partitionGroups> <partitionGroup id=”group1” > <partitionAlgo>OneAfterAnother</partitionAlgo> <partition id="partition1" > <max>3</max> <min>1</min> </partition> <partition id="partition2" > <max>5</max> <min>1</min> </partition> <partition id="partition3"> <max>20</max> <min>1</min> </partition> </partitionGroup> ... </deploymentPolicy> 10
  • 12. Rules Engine • • • Why a Rules Engine • • • Ease of use: No byte code and easy to modify Readable Performances and sclability Uses Drools engine as the default rules engine Rules • Minimum Rule • Scale Up Rule • Scale Down Rule • Terminate All Rule 11
  • 13. Autoscaling Rules: Sample in Drools rule "Minimum Rule" dialect "mvel" when $service : Service () $cluster : Cluster () from $service.getClusters() $policy : AutoscalePolicy(id == $cluster.autoscalePolicyName ) from $manager.getPolicyList() $partition : Partition () from $policy.getHAPolicy().getPartitions() $clusterContext : ClusterContext() from $context.getClusterContext($cluster.getClusterId()) eval($clusterContext.getPartitionCount($partition.getId()) < $partition.getPartitionMembersMin() ) then int memberCountToBeIncreased = 1; if($evaluator.delegateSpawn($partition,$cluster.getClusterId(), memberCountToBeIncreased)){ $clusterContext.increaseMemberCountInPartition($partition.getId(), memberCountToBeIncreased); } end 12
  • 14. Minimum Rule • This runs when a “cluster created” event is received • Scan through all the partitions of the cluster and find minimums • Call CC for spawning required minimum instances • This will be also run periodically(with a higher time interval than scale up/down rules) to assure that the minimum count is preserved 13
  • 15. Scale Up/Down Rule • These rules run periodically • Evaluate load details(Received from CEP) against their thresholds(defined in Autoscale Policy). • Decide whether to scale up, scale down, or do nothing • Call CC for spawning instances in selected partitions 14
  • 16. Autoscaling Strategies • • Threshold based autoscaling Predictive or proactive auto-scaling techniques • Kalman Filter • Control Theory • Time series analysis 15
  • 17. Average of Requests In Flight at LB for a Specific Cluster 16
  • 18. Average of CPU/ Memory Consumption for a Specific Cluster 17
  • 19. Terminate All Rule • • • This runs when a “cluster removed” event is received Scan through all the partitions of the cluster and find member IDs to be terminated Call CC for terminating those instances 18
  • 20. Fault Handling Scenarios Process VM Down Up Down Down(It can be that agent is crashed) Up Up(but network issue) Decision flow • • • • • • • • • Cartridge agent publish event to CC CC updates instance status in topology Autoscaler decides to kill it CEP identify that & publish event to Autoscaler Autoscaler calls CC to terminate(if available) and remove the instance from topology Autoscaler will spawn another to cover that CEP sends statistics on fault requests to Autoscaler Autoscaler keep monitoring it and takes a decision to terminate the instance Autoscaler will spawn another in the same partition to cover that 19
  • 22. Join Us Website http://stratos.incubator.apache.org Mailing List Subscribe: [email protected] Post (After subscription): [email protected] Social Media Google+: https://plus.google.com/103515557134069849802 Twitter: https://twitter.com/ApacheStratos Facebook: https://www.facebook.com/apache.stratos LinkedIn: http://www.linkedin.com/groups?home=&gid=5131436 21