SlideShare une entreprise Scribd logo
1  sur  23
Télécharger pour lire hors ligne
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

Contenu connexe

Tendances

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 AutoScalerBob Bennink
 
Openstack heat & How Autoscaling works
Openstack heat & How Autoscaling worksOpenstack heat & How Autoscaling works
Openstack heat & How Autoscaling worksCoreStack
 
Spring Cloud and Netflix Components
Spring Cloud and Netflix ComponentsSpring Cloud and Netflix Components
Spring Cloud and Netflix ComponentsDharshan Sastry B N
 
Autoscale without netscaler_ccceu13
Autoscale without netscaler_ccceu13Autoscale without netscaler_ccceu13
Autoscale without netscaler_ccceu13Nguyen Anh Tu
 
Apache Kafka® Security Overview
Apache Kafka® Security OverviewApache Kafka® Security Overview
Apache Kafka® Security Overviewconfluent
 
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 HeatEthan 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 autoscalingShapeBlue
 
Container Orchestrator Smackdown @ContinousLifecycle
Container Orchestrator Smackdown @ContinousLifecycleContainer Orchestrator Smackdown @ContinousLifecycle
Container Orchestrator Smackdown @ContinousLifecycleMichael 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 ApplicationsLightbend
 
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 mesosRahul Kumar
 
9 plugin Cloudstack Developer Day
9 plugin Cloudstack Developer Day9 plugin Cloudstack Developer Day
9 plugin Cloudstack Developer DayKimihiko 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 Cloudacogoluegnes
 

Tendances (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
 
Openstack heat & How Autoscaling works
Openstack heat & How Autoscaling worksOpenstack heat & How Autoscaling works
Openstack heat & How Autoscaling works
 
Spring Cloud and Netflix Components
Spring Cloud and Netflix ComponentsSpring Cloud and Netflix Components
Spring Cloud and Netflix Components
 
Autoscale without netscaler_ccceu13
Autoscale without netscaler_ccceu13Autoscale without netscaler_ccceu13
Autoscale without netscaler_ccceu13
 
Apache Kafka® Security Overview
Apache Kafka® Security OverviewApache Kafka® Security Overview
Apache Kafka® Security Overview
 
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
 
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
 
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...
 
Cloudstack autoscaling
Cloudstack autoscalingCloudstack autoscaling
Cloudstack autoscaling
 
Container Orchestrator Smackdown @ContinousLifecycle
Container Orchestrator Smackdown @ContinousLifecycleContainer Orchestrator Smackdown @ContinousLifecycle
Container Orchestrator Smackdown @ContinousLifecycle
 
Kafka aws
Kafka awsKafka aws
Kafka aws
 
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
 
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...
 
KSQL Intro
KSQL IntroKSQL Intro
KSQL Intro
 
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...
 
Openstack Heat
Openstack HeatOpenstack Heat
Openstack Heat
 
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
 
9 plugin Cloudstack Developer Day
9 plugin Cloudstack Developer Day9 plugin Cloudstack Developer Day
9 plugin Cloudstack Developer Day
 
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...
 
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
 

Similaire à Autoscaler architecture of apache stratos 4.0.0

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 ApplicationsSrikumar Venugopal
 
Autoscaling Solr - Shalin Shekhar Mangar, Lucidworks
Autoscaling Solr - Shalin Shekhar Mangar, LucidworksAutoscaling Solr - Shalin Shekhar Mangar, Lucidworks
Autoscaling Solr - Shalin Shekhar Mangar, LucidworksLucidworks
 
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 StratosVishanth 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 ukoug19Anil 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 2014Lari 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 applicationsGR8Conf
 
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 applicationsLari Hotari
 
Auto-Scaling Web Application Security in Amazon Web Services (SEC308) | AWS r...
Auto-Scaling Web Application Security in Amazon Web Services (SEC308) | AWS r...Auto-Scaling Web Application Security in Amazon Web Services (SEC308) | AWS r...
Auto-Scaling Web Application Security in Amazon Web Services (SEC308) | AWS r...Amazon Web Services
 
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 - AOUG2022Sandesh Rao
 
OTM Performance Review and Benchmarking
OTM Performance Review and BenchmarkingOTM Performance Review and Benchmarking
OTM Performance Review and BenchmarkingMavenWire
 
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 + ADBDatabricks
 
참여기관_발표자료-국민대학교 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 ColasUK DevOps Collective
 
Cdcr apachecon-talk
Cdcr apachecon-talkCdcr apachecon-talk
Cdcr apachecon-talkAmrit Sarkar
 
Day 5 - AWS Autoscaling Master Class - The New Capacity Plan
Day 5 - AWS Autoscaling Master Class - The New Capacity PlanDay 5 - AWS Autoscaling Master Class - The New Capacity Plan
Day 5 - AWS Autoscaling Master Class - The New Capacity PlanAmazon Web Services
 
Using AWS to Build a Scalable Big Data Management & Processing Service (BDT40...
Using AWS to Build a Scalable Big Data Management & Processing Service (BDT40...Using AWS to Build a Scalable Big Data Management & Processing Service (BDT40...
Using AWS to Build a Scalable Big Data Management & Processing Service (BDT40...Amazon Web Services
 
Mongo DB on Apache Stratos
Mongo DB on Apache StratosMongo DB on Apache Stratos
Mongo DB on Apache StratosWSO2
 

Similaire à Autoscaler architecture of apache stratos 4.0.0 (20)

Venugopal adec
Venugopal adecVenugopal adec
Venugopal adec
 
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
 
Autoscaling Solr - Shalin Shekhar Mangar, Lucidworks
Autoscaling Solr - Shalin Shekhar Mangar, LucidworksAutoscaling Solr - Shalin Shekhar Mangar, Lucidworks
Autoscaling Solr - Shalin Shekhar Mangar, 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
 
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
 
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
 
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...
 
Performance tuning Grails applications
 Performance tuning Grails applications Performance tuning Grails applications
Performance tuning Grails applications
 
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...
 
Performance tuning Grails applications
Performance tuning Grails applicationsPerformance tuning Grails applications
Performance tuning Grails applications
 
Auto-Scaling Web Application Security in Amazon Web Services (SEC308) | AWS r...
Auto-Scaling Web Application Security in Amazon Web Services (SEC308) | AWS r...Auto-Scaling Web Application Security in Amazon Web Services (SEC308) | AWS r...
Auto-Scaling Web Application Security in Amazon Web Services (SEC308) | AWS r...
 
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
 
OTM Performance Review and Benchmarking
OTM Performance Review and BenchmarkingOTM Performance Review and Benchmarking
OTM Performance Review and Benchmarking
 
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
 
참여기관_발표자료-국민대학교 201301 정기회의
참여기관_발표자료-국민대학교 201301 정기회의참여기관_발표자료-국민대학교 201301 정기회의
참여기관_발표자료-국민대학교 201301 정기회의
 
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
 
Cdcr apachecon-talk
Cdcr apachecon-talkCdcr apachecon-talk
Cdcr apachecon-talk
 
Day 5 - AWS Autoscaling Master Class - The New Capacity Plan
Day 5 - AWS Autoscaling Master Class - The New Capacity PlanDay 5 - AWS Autoscaling Master Class - The New Capacity Plan
Day 5 - AWS Autoscaling Master Class - The New Capacity Plan
 
Using AWS to Build a Scalable Big Data Management & Processing Service (BDT40...
Using AWS to Build a Scalable Big Data Management & Processing Service (BDT40...Using AWS to Build a Scalable Big Data Management & Processing Service (BDT40...
Using AWS to Build a Scalable Big Data Management & Processing Service (BDT40...
 
Mongo DB on Apache Stratos
Mongo DB on Apache StratosMongo DB on Apache Stratos
Mongo DB on Apache Stratos
 

Dernier

What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 

Dernier (20)

What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 

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: 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