49
PAGE 1 | GRACE HOPPER CELEBRATION 2016 | #GHC16 PRESENTED BY THE ANITA BORG INSTITUTE AND THE ASSOCIATION FOR COMPUTING MACHINERY #GHC16 2016 Feedback Driven Development of Cloud Applications Harini Gunabalan, Technical University of Darmstadt, Germany @harinigunabalan

DO-AS-CASPOTT: DevOps AutoScaler and Critical Artifact Spotter

Embed Size (px)

Citation preview

PAGE1 |GRACEHOPPERCELEBRATION2016 | #GHC16PRESENTEDBYTHEANITABORGINSTITUTEANDTHEASSOCIATIONFORCOMPUTINGMACHINERY

#GHC16

2016FeedbackDriven Developmentof CloudApplicationsHariniGunabalan,TechnicalUniversityof Darmstadt,Germany@harinigunabalan

PAGE2 |GRACEHOPPERCELEBRATION2016 | #GHC16PRESENTEDBYTHEANITABORGINSTITUTEANDTHEASSOCIATIONFORCOMPUTINGMACHINERY

PAGE3 |GRACEHOPPERCELEBRATION2016 | #GHC16PRESENTEDBYTHEANITABORGINSTITUTEANDTHEASSOCIATIONFORCOMPUTINGMACHINERY

Motivation

Cloud

PAGE4 |GRACEHOPPERCELEBRATION2016 | #GHC16PRESENTEDBYTHEANITABORGINSTITUTEANDTHEASSOCIATIONFORCOMPUTINGMACHINERY

Motivation

Cloud

Developer

Operator

EndUsers

PAGE5 |GRACEHOPPERCELEBRATION2016 | #GHC16PRESENTEDBYTHEANITABORGINSTITUTEANDTHEASSOCIATIONFORCOMPUTINGMACHINERY

Motivation

Cloud

Developer

Operator

EndUsers

App App

Deploy app

PAGE6 |GRACEHOPPERCELEBRATION2016 | #GHC16PRESENTEDBYTHEANITABORGINSTITUTEANDTHEASSOCIATIONFORCOMPUTINGMACHINERY

Motivation

Cloud

Developer

Operator

EndUsers

App App

Deploy app

VMVM VM VM

Provision resources

PAGE7 |GRACEHOPPERCELEBRATION2016 | #GHC16PRESENTEDBYTHEANITABORGINSTITUTEANDTHEASSOCIATIONFORCOMPUTINGMACHINERY

Motivation

Cloud

Developer

Operator

EndUsers

App App

Deploy app

VMVM VM VM

Provision resources

UseApp

PAGE8 |GRACEHOPPERCELEBRATION2016 | #GHC16PRESENTEDBYTHEANITABORGINSTITUTEANDTHEASSOCIATIONFORCOMPUTINGMACHINERY

Cloud

Developer

Operator

EndUsers

App App

Deploy app

VMVM VM VM

Provision resources

UseApp

Notworking!

Motivation

PAGE9 |GRACEHOPPERCELEBRATION2016 | #GHC16PRESENTEDBYTHEANITABORGINSTITUTEANDTHEASSOCIATIONFORCOMPUTINGMACHINERY

Motivation

Cloud

Developer

Operator

EndUsers

App App

Deploy app

VMVM VM VM

Provision resources

UseApp

Where is the problem?Notworking!

PAGE10 |GRACEHOPPERCELEBRATION2016 | #GHC16PRESENTEDBYTHEANITABORGINSTITUTEANDTHEASSOCIATIONFORCOMPUTINGMACHINERY

Motivation

Cloud

Developer

Operator

EndUsers

App App

Deploy app

VMVM VM VM

Provision resources

UseApp

Where is the problem?Notworking!

Maybe,Ishouldimprovecode?

PAGE11 |GRACEHOPPERCELEBRATION2016 | #GHC16PRESENTEDBYTHEANITABORGINSTITUTEANDTHEASSOCIATIONFORCOMPUTINGMACHINERY

Motivation

Cloud

Developer

Operator

EndUsers

App App

Deploy app

VMVM VM VM

Provision resources

UseApp

Where is the problem?Notworking!

Maybe,Ishouldimprovecode?

Is the resourceprovisioningnotsufficient?

PAGE12 |GRACEHOPPERCELEBRATION2016 | #GHC16PRESENTEDBYTHEANITABORGINSTITUTEANDTHEASSOCIATIONFORCOMPUTINGMACHINERY

ProblemStatement

PAGE13 |GRACEHOPPERCELEBRATION2016 | #GHC16PRESENTEDBYTHEANITABORGINSTITUTEANDTHEASSOCIATIONFORCOMPUTINGMACHINERY

ProblemStatement– APMInformation

What is Feedback Driven Development?

PAGE14 |GRACEHOPPERCELEBRATION2016 | #GHC16PRESENTEDBYTHEANITABORGINSTITUTEANDTHEASSOCIATIONFORCOMPUTINGMACHINERY

ProblemStatement- FDD

Problem: How to automate Resource provisioning using the Run-time information

Problem: How to identify Source Code Issues (root cause analysis) using Run-time information

Problem: How to automate Resource provisioning using the Run-time information

Problem: How to identify Source Code Issues (root cause analysis) using Run-time information

Problem: How to automate Resource provisioning using the Run-time information

Problem: How to identify Source Code Issues (root cause analysis) using Run-time information

Problem: How to automate Resource provisioning using the Run-time information

Problem: How to identify Source Code Issues (root cause analysis) using Run-time information

PAGE15 |GRACEHOPPERCELEBRATION2016 | #GHC16PRESENTEDBYTHEANITABORGINSTITUTEANDTHEASSOCIATIONFORCOMPUTINGMACHINERY

ProblemStatement- FDD

Problem: How to automate Resource provisioning using the Run-time information

Problem: How to identify Source Code Issues (root cause analysis) using Run-time information

Problem: How to automate Resource provisioning using the Run-time information

Problem: How to identify Source Code Issues (root cause analysis) using Run-time information

Problem: How to automate Resource provisioning using the Run-time information

Problem: How to identify Source Code Issues (root cause analysis) using Run-time information

Problem: How to automate Resource provisioning using the Run-time information

Problem: How to identify Source Code Issues (root cause analysis) using Run-time information

WhatisCASPOTT?CriticalArtifactSpotter.Identifiessourcecodeissuesandperformancehotspots.

Solution: Combination of plug-ins that support the Developer (CASPOTT) and Operator (Auto-scaler)

WhatisAuto-scaling?On-demandscaleoutandscaleindepending onLoad.

PAGE16 |GRACEHOPPERCELEBRATION2016 | #GHC16PRESENTEDBYTHEANITABORGINSTITUTEANDTHEASSOCIATIONFORCOMPUTINGMACHINERY

SystemDesign

ArchitectureofDO-AS-CASPOTT

17

CASPOTTComponents

18

FeedbackHandler- Preparestherawlogs

forfurtherprocessingbymappingthemtotheAPIformatoftheStatisticalAnalysisEngine

StatisticalAnalysisEngine- Analyzesandaggregates

thecollectedinformationcomingfromFeedbackHandlerbasedonpredefinedmetrics

StaticCodeAnalysis- Analyzesthecode

andrealizestheconnectionbetweenthefeedbackandthecode

Auto-scalerComponents

19

Auto-scalerComponents

20

Auto-scalerComponents

21

Auto-scalerComponents

22

PAGE23 |GRACEHOPPERCELEBRATION2016 | #GHC16PRESENTEDBYTHEANITABORGINSTITUTEANDTHEASSOCIATIONFORCOMPUTINGMACHINERY

Implementation

PAGE24 |GRACEHOPPERCELEBRATION2016 | #GHC16PRESENTEDBYTHEANITABORGINSTITUTEANDTHEASSOCIATIONFORCOMPUTINGMACHINERY

CASPOTT

• ImplementedasanEclipsePlug-in

• Storerun-timeinformation inElasticSearch

• Displayhotspots toDeveloper

• DirectMapping tosourcecode

PAGE25 |GRACEHOPPERCELEBRATION2016 | #GHC16PRESENTEDBYTHEANITABORGINSTITUTEANDTHEASSOCIATIONFORCOMPUTINGMACHINERY

Component1:CloudMonitoring

Keymetricsmonitored• Averageresponse time(CF Logs)• Numberofincomingrequests(CF

Logs)• Numberofrunningappinstances

(CFAPI)• CPUutilization(CFAPI)• Memoryutilization(CFAPI)• Diskutilization(CFAPI)

Component2:Auto-scaling

26

PAGE27 |GRACEHOPPERCELEBRATION2016 | #GHC16PRESENTEDBYTHEANITABORGINSTITUTEANDTHEASSOCIATIONFORCOMPUTINGMACHINERY

• Modeldatatoidentifycorrelationbetweenmetrics• MostrealworlddataareMulti-dimensional.• Multiple-inputandMultiple-output(MIMO)models.Ø State-spaceModelØ PolynomialModelsØ ARXØ ARMAX

Component3:DataModeling

27

PAGE28 |GRACEHOPPERCELEBRATION2016 | #GHC16PRESENTEDBYTHEANITABORGINSTITUTEANDTHEASSOCIATIONFORCOMPUTINGMACHINERY

1. SetOutput=[ResponseTime]

2. SetInput=[Numberofincoming requests,Noofinstances,CPU%,memory,anddiskutilization]

DataModeling inMATLABSystemIdentificationToolbox:ImportData

28

PAGE29 |GRACEHOPPERCELEBRATION2016 | #GHC16PRESENTEDBYTHEANITABORGINSTITUTEANDTHEASSOCIATIONFORCOMPUTINGMACHINERY

MATLABSystemIdentificationToolbox– Datasetsplitting

29

PAGE30 |GRACEHOPPERCELEBRATION2016 | #GHC16PRESENTEDBYTHEANITABORGINSTITUTEANDTHEASSOCIATIONFORCOMPUTINGMACHINERY

• Modelestimation

• State-spaceModel• Polynomial

Models• ARX• ARMAX

• Validatethemodel

ModelEstimationandValidation

30

PAGE31 |GRACEHOPPERCELEBRATION2016 | #GHC16PRESENTEDBYTHEANITABORGINSTITUTEANDTHEASSOCIATIONFORCOMPUTINGMACHINERY

EstimatingStateSpacemodel

31

PAGE32 |GRACEHOPPERCELEBRATION2016 | #GHC16PRESENTEDBYTHEANITABORGINSTITUTEANDTHEASSOCIATIONFORCOMPUTINGMACHINERY

EstimatingARXandARMAXmodels

32

PAGE33 |GRACEHOPPERCELEBRATION2016 | #GHC16PRESENTEDBYTHEANITABORGINSTITUTEANDTHEASSOCIATIONFORCOMPUTINGMACHINERY

Evaluation

33

Image Source: https://www.usu.edu/ccampis/evaluation/

PAGE34 |GRACEHOPPERCELEBRATION2016 | #GHC16PRESENTEDBYTHEANITABORGINSTITUTEANDTHEASSOCIATIONFORCOMPUTINGMACHINERY

DeployGuestbookApplicationtoCloud

34

PAGE35 |GRACEHOPPERCELEBRATION2016 | #GHC16PRESENTEDBYTHEANITABORGINSTITUTEANDTHEASSOCIATIONFORCOMPUTINGMACHINERY

GenerateLoadonGuestbookapp

35

PAGE36 |GRACEHOPPERCELEBRATION2016 | #GHC16PRESENTEDBYTHEANITABORGINSTITUTEANDTHEASSOCIATIONFORCOMPUTINGMACHINERY

Scalingoccurs

36

Requestsperse

cond

No.ofinstances

PAGE37 |GRACEHOPPERCELEBRATION2016 | #GHC16PRESENTEDBYTHEANITABORGINSTITUTEANDTHEASSOCIATIONFORCOMPUTINGMACHINERY

ComparisonwithandwithouttheAuto-scaler

37

Requests

persecond

Average

response

time

Requests

persecond

Average

response

time

WithoutAuto-scaler,Maximumresponsetimeis750ms

WithAuto-scaler,Maximumresponsetimeis100ms

PAGE38 |GRACEHOPPERCELEBRATION2016 | #GHC16PRESENTEDBYTHEANITABORGINSTITUTEANDTHEASSOCIATIONFORCOMPUTINGMACHINERY

VideoDemoofAuto-scaler

PAGE39 |GRACEHOPPERCELEBRATION2016 | #GHC16PRESENTEDBYTHEANITABORGINSTITUTEANDTHEASSOCIATIONFORCOMPUTINGMACHINERY

Conculsion

39

Auto-scaler

Solved!ü CASPOTTü Auto-scalerü CorrelationModel to

maketheauto-scalersmart!

CASPOTT

PAGE40 |GRACEHOPPERCELEBRATION2016 | #GHC16PRESENTEDBYTHEANITABORGINSTITUTEANDTHEASSOCIATIONFORCOMPUTINGMACHINERY

• Metricparametertuning• Metriccombination&CustomMetrics• Determiningmetricthresholds• Testingwith differentapplications types - memory or database

intensive.• Improvedmodeling,collectionoflargersampledatasets

OpenChallengesandFuturework

PAGE41 |GRACEHOPPERCELEBRATION2016 | #GHC16PRESENTEDBYTHEANITABORGINSTITUTEANDTHEASSOCIATIONFORCOMPUTINGMACHINERY

References

Ø M.Httermann,DevOpsfordevelopers.Apress,2012.Ø J.Cito,P. Leitner,H.C.Gall,A.Dadashi,A.Keller,andA.Roth,“Runtimemetricmeetsdeveloper:buildingbettercloudapplications

usingfeedback,” in2015ACMInternationalSymposiumonNewIdeas,NewParadigms,andReflectionsonProgrammingandSoftware,pp.14–27,ACM,2015.

Ø “Amazonwebservices.”https://aws.amazon.com/,Accessed:08-Aug-2016.Ø “Newrelic.”https://newrelic.com/,Accessed:08-Aug-2016.Ø J.Cito,P. Leitner,T.Fritz,andH.C.Gall,“Themakingofcloudapplications:Anempiricalstudyonsoftwaredevelopmentforthe

cloud,” inProceedingsofthe201510th JointMeetingonFoundationsofSoftwareEngineering,pp.393–403,ACM,2015.Ø L.Ljung,Systemidentification.Springer,1998.Ø “Saphana cloudplatform.”https://hcp.sap.com/index.html,Accessed:08-Aug-2016.Ø S.R.Seelam,P.Dettori,P.Westerink,andB.B.Yang,“Polyglotapplicationautoscalingserviceforplatformasaservicecloud,” in

CloudEngineering(IC2E),2015 IEEEInternationalConferenceon,pp.84–91,IEEE,2015.Ø J.HumbleandD.Farley,Continuousdelivery:reliablesoftwarereleasesthroughbuild,test,anddeploymentautomation.Pearson

Education,2010.Ø http://docs.pivotal.io/pivotalcf/1-7/customizing/autoscale-configuration.htmlØ Cloudwaveproject- http://cloudwave-fp7.eu/

41

PAGE42 |GRACEHOPPERCELEBRATION2016 | #GHC16PRESENTEDBYTHEANITABORGINSTITUTEANDTHEASSOCIATIONFORCOMPUTINGMACHINERY

Thankyou

Supervisors:

Prof.Dr.–Ing.MiraMezini

Dr.–Ing.GuidoSalvaneschi

PAGE43 |GRACEHOPPERCELEBRATION2016 | #GHC16PRESENTEDBYTHEANITABORGINSTITUTEANDTHEASSOCIATIONFORCOMPUTINGMACHINERY

Appendix- StateSpaceModels

• Representedbydifferentialequationsandstatevariables.• Outputcanbepredictedforanyfuturetimeprovidedtheinput,output,anda

minimumsetofstatevariablesxi(t),areknown.dx/dt =Ax+Buy =Cx+Du

43

PAGE44 |GRACEHOPPERCELEBRATION2016 | #GHC16PRESENTEDBYTHEANITABORGINSTITUTEANDTHEASSOCIATIONFORCOMPUTINGMACHINERY

Appendix- Polynomialmodels- ARX&ARMAX

ARX:

• Autoregression - currentoutputdependsonthepastinputandoutputvalues.

• Considering auto regression andthe current inputs, ARXmodelcan be mathematicallydescribed as:A(z)y(t)=B(z)u(t- n)+e(t)

44

ARMAX:

• UnlikeARX,ARMAXconsiders stochasticdynamics.

• Betterforsystemswithextradisturbances

• IncludesbothAR(p)andMA(q)models.

• ARMAXisrepresentedmathematicallyasA(z)y(t)=B(z)u(t- n)+c(z)e(t)

PAGE45 |GRACEHOPPERCELEBRATION2016 | #GHC16PRESENTEDBYTHEANITABORGINSTITUTEANDTHEASSOCIATIONFORCOMPUTINGMACHINERY

Appendix:Polynomialmodels- ARX

• TheARXmodel toevaluatetheoutput isbasedonauto-regression.• Autoregressivemodel isamodelwhosecurrentoutputdependson thepastinput

andoutputvalues.Thegenericnotion todenoteauto-regressivemodeloforderp,AR(p) foravariableXis:

where cand iare constants and e(t)is the noise.Considering auto regression and theinputs,ARXmodel canbe mathematically described as:

A(z)y(t)=B(z)u(t - n)+e(t)wherey(t)istheoutput, u(t)istheinput,ande(t)isthenoise/errormeasuredintheoutput.A(z)andB(z)arepolynomialsof thespecifiedorderwithrespecttothebackwardshiftoperatorz-1.

45

PAGE46 |GRACEHOPPERCELEBRATION2016 | #GHC16PRESENTEDBYTHEANITABORGINSTITUTEANDTHEASSOCIATIONFORCOMPUTINGMACHINERY

Appendix:Polynomialmodels- ARMAX

UnliketheARXmodel,inARMAX,thestochasticdynamicsareconsidered.ARMAXmodelsarebetterforsystemswithmoredisturbances.Ingeneral,themovingaveragemodeloforderq,MA(q)isrepresentedinthebelownotation:

wheree(t-i)isthenoise/error.Thenotationfortheautoregressivemovingaverage(ARMA)modelisasbelow:

ThismodelincludesbothAR(p)andMA(q)models.BasedonthesethefollowingmathematicalequationfortheARMAXmodelcanbewrittenas:

A(z)y(t)=B(z)u(t- n)+c(z)e(t)where,y(t)istheoutput, u(t)istheinput,ande(t)isthenoise.A(z),B(z)andC(z)arepolynomials

ofspecifiedorderswithrespecttothebackwardshiftoperatorz-1

46

PAGE47 |GRACEHOPPERCELEBRATION2016 | #GHC16PRESENTEDBYTHEANITABORGINSTITUTEANDTHEASSOCIATIONFORCOMPUTINGMACHINERY

Appendix- Modeloutput

TheModelestimationoutput forStatespace,ARXandARMAXmodels.

47

PAGE48 |GRACEHOPPERCELEBRATION2016 | #GHC16PRESENTEDBYTHEANITABORGINSTITUTEANDTHEASSOCIATIONFORCOMPUTINGMACHINERY

Appendix:CASpott

FeedbackHandler- Queriestherawlogs- Preparestherawlogsfor

furtherprocessingbymappingthemtotheAPIformatoftheStatisticalAnalysisEngine

StatisticalAnalysisEngine- Analyzesandaggregatesthe

collectedinformationcomingfromFeedbackHandlerbasedonpredefinedmetrics

StaticCodeAnalysisEngine- Analyzesthecodeandrealizes

theconnectionbetween thefeedbackandthecode

PAGE49 |GRACEHOPPERCELEBRATION2016 | #GHC16PRESENTEDBYTHEANITABORGINSTITUTEANDTHEASSOCIATIONFORCOMPUTINGMACHINERY

Appendix- SystemFootprintforAuto-ScalerImplementation

49