Top Banner
Neil Palmer Partner SunGard Consulting Services [email protected] Michael Heydt Senior Manager SunGard Consulting Services [email protected] http://thecloudarchitect.com
45

Using Azure for Computationally Intensive Workloads

Jan 27, 2017

Download

Technology

Michael Heydt
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Using Azure for Computationally Intensive Workloads

NeilPalmerPartner

[email protected]

MichaelHeydtSeniorManager

[email protected]://thecloudarchitect.com

Page 2: Using Azure for Computationally Intensive Workloads

Agenda Background CloudArchitectureOverview  FunctionalLanguages&F# ProblemStatement Demo  SolutionArchitectures&Outcomes  LessonsLearned Economics Conclusions

Page 3: Using Azure for Computationally Intensive Workloads

Background Thisisaperiodofintensechangewithmanydisruptivetechnologies:  Cloudcomputing  Functionallanguages  Largedatasetprocessing

 Whichhavealargeimpactonapplicationssincestorageandcomputepowerispracticallyunlimited

  Leadstoquestions: Whattypesofapplicationsaretechnicallyfeasible?  Andeconomicallyfeasible?

Page 4: Using Azure for Computationally Intensive Workloads

CloudCompu2ngStack

Applications(Salesforce)

Services(GoogleMaps)

Platforms(Azure)

Infrastructure(EC2) Storage(S3)

Page 5: Using Azure for Computationally Intensive Workloads

CloudCompu2ngOverview Commoncomponentsforcloudcomputing:

  CPUandDatamanagedbyanotherprovider  Redundantstorageforavailability DynamicallyallocatedCPUbasedupondemand  Payforuseandasyougomodel(nocapitalinvestment)  Additionalapplicationservicesprovidedtosystemsinthecloud(e.g.SQLservices,paymentprocessing…)

 Operationalsupportforfailover

Page 6: Using Azure for Computationally Intensive Workloads

CloudBenefitsInternalIT Managedservices Thecloud

Capitalinvestment Significant Moderate Negligible

On‐goingcosts Moderate Significant BasedonUsage

Provisioningtime Significant Moderate None

Scalability Limited Moderate Flexible

Staffexpertiserequirements Significant Limited Moderate

Reliability Varies High ModeratetoHigh

Page 7: Using Azure for Computationally Intensive Workloads

Applica2onssuitableforthecloud Webapplications  Loadtesting MonteCarloSimulation  FinancialPortfolioAnalysis EnergyDemandForecasting AlgorithmicTrading Parallel/concurrentprocessing Processingpipelines

Page 8: Using Azure for Computationally Intensive Workloads

Func2onalProgramming Whatisfunctionalprogramming?

  FacilitatesParallelism  Treatcomputationastheevaluationoffunctions  Avoidsstateandmutabledata,whichgreatlysimplifiesparallelexecution

  Runtimehandlesparallelisminsteadofthroughexplicitcoding

  Takebetteradvantageofgrowing#ofcoresavailabletoyou

  Functionaldecompositionmaybeabetteranswertoleveragingthearchitectureoftomorrow  Beginningtothinkthiswayneedstostartnow

Page 9: Using Azure for Computationally Intensive Workloads

ProblemStatement  Computehistoricpricevolatilitycorrelationsforstocksovermanyyears.

  Goalistotesttheusefulnessofcloudcomputingfor:  Manipulatingalargedataset  Handleasolutionthatwouldotherwisebeslow&expensivewithdedicatedservers

  Todetermine:  Whatisthescalabilityofcloudarchitectures?  Costeffectivenessofscaleout(manyrolesinthecloud)vs.scaleup(highCPU,threading)

  Howdoesthesolutiondifferfromanon‐cloudsolution?

Page 10: Using Azure for Computationally Intensive Workloads

CloudApplica2onArchitecture

Page 11: Using Azure for Computationally Intensive Workloads

CloudApplica2onArchitecture Horsepower

  InAzure,thesearethewebandworkerroles

Page 12: Using Azure for Computationally Intensive Workloads

CloudApplica2onArchitecture  Ingress–Howtotalktothecloud

  InAzure,  HTTP/stowebroles  .NETServiceBusandqueuestoworkerroles

Page 13: Using Azure for Computationally Intensive Workloads

CloudApplica2onArchitecture CloudStorageServices

  Fundamentallythreetypes  Tables  Blobs  Volumes(EC2)

Page 14: Using Azure for Computationally Intensive Workloads

CloudApplica2onArchitecture  Intra‐cloudcommunications

 Queues  .NETServiceBus

Page 15: Using Azure for Computationally Intensive Workloads

CloudApplica2onArchitecture Cloudprovidedservices

  Valueaddfromyourcloudprovider  Youcanalsousethesefromotherproviders  AzureusingEC2nodes,AWSpaymentservices

  GoogleAPIusingRESTinterfacesintoAzure

Page 16: Using Azure for Computationally Intensive Workloads

Solu2onArchitecture

Keypoints:• Scalabilityisgoal#1• Partitioneddataset• Multipleworkers• Workitembased• Competitiveprocessing• Allasynchronous

Page 17: Using Azure for Computationally Intensive Workloads

Demo  Showtheportaldeployments Explainwebandworkerroles  Showclientdoingvolatilities

  ExplainpartsoftheapplicationandinteropwithAzure  Show/deleteexistingblobs  Calculatesomevolatilities  Showmessagesreceived,blobsbeingcreated  Showdatainoneoftheblobs

Page 18: Using Azure for Computationally Intensive Workloads

Solu2onArchitecture Architecturewasevolutionary

  StartedwithEC2,evolvedintoahybridAzure/EC2,andthenfullAzure

  Thiswasvaluabletoseethedifferencesincloudplatforms

Page 19: Using Azure for Computationally Intensive Workloads

Solu2onArchitectureVersion1.0100%EC2

Page 20: Using Azure for Computationally Intensive Workloads

Version1.0Outcome  Linearscalability.Doublethenodes,halfthetimetocomplete

  TooktimetoimageandmanageAMI’s  Feelslikeyoumanagetheserversintheirentirety  NoautomaticfailoverorrestartsprovidedbyEC2  Bandwidthcosts–mustwatchthem  Securityisonyourown  Tablestoragewasconsideredtoolimitedinmaxsizetouse

  Costeffectivefortheproblem,butminimumbillingisperhour,sothatcanburnyou

Page 21: Using Azure for Computationally Intensive Workloads

Solu2onArchitectureVersion2.0100%AzurewithTableData

Page 22: Using Azure for Computationally Intensive Workloads

Version2.0Outcome Tabledatadidnotperformwell Gaveupbeforeevengettinghistoricaldataintothecloud

 RESTperformancefortabledatawas~1000putsper50seconds

  4.7millionhistoricalpricepointstoload Multi‐threadingdidnothelp  Scrappedandwentforablobmodelwithtickerdatablobs(version3.0)

Page 23: Using Azure for Computationally Intensive Workloads

Solu2onArchitectureVersion2.5AzureandEC2Hybrid

Page 24: Using Azure for Computationally Intensive Workloads

Version2.5Outcome Easyportof.NetcodetoAzurefromEC2  JustpointeddatalayertoexistingEC2databaseimage ExecutiontimeaboutthesameaswithEC2,evenwiththedatabaseacrosstheInternet

 Notasmuchheadachesinceyouarenotmanagingasmanyvirtualservers

 ButishavinganRDBMSinthecloud“cloudy”?

Page 25: Using Azure for Computationally Intensive Workloads

Solu2onArchitectureVersion3.0100%Azure

Page 26: Using Azure for Computationally Intensive Workloads

Version3.0Outcome  Samebenefitsof2.5 NoneedforSQLServer BlobssolvedRESTproblems MigrationofdatatoAzureblobsdidtaketooksomeworkandredesign  Physicalpartitioningofdataintoblobs  Indexestodataalsostoredinblobs  Binaryserializationofobjectsintoblobs

Page 27: Using Azure for Computationally Intensive Workloads

CodeReview  Letslookatsomecode

 WCFserviceAPI  Silverlightservicebridge Webrole–looksjustlikeASP.NETandSilverlight  Silverlight–showwhathappenswhenyoupress“start” WCFservice–showhookstoazure(storageaccounts) Workerrole,showhowprocessingisdone

Page 28: Using Azure for Computationally Intensive Workloads

Poten2alEnhancements Tabledatastorageforstatuses  .NetServicebusintegrationformonitoringandcommunicationstonon‐cloudsystems

 Multicast.NetServiceBusforbroadcastingtoallworkerroles

 EventualuseofSQLdataservicesincloud BuildF#librariesforquantitativeanalysis

  Buildlocally,testagainstlocaldata Deploytocloud  Connectasrequired

Page 29: Using Azure for Computationally Intensive Workloads

LessonsLearned QueuesandAsynchronicity

 QueuesworkonadifferentmodelthanMSMQ  Retrievewithadeletewindowandthenexplicitlydelete  Pollingmodel(noblocking)

  Getusedtoasynchronousprocessing  Scalabilityisobtainedthroughasynchronousmodel  Queuebasedcommunicationbetweenwebandworkerroles  AsynchronouscommunicationsfromSilverlighttoAzure

Page 30: Using Azure for Computationally Intensive Workloads

LessonsLearned  EC2vsAzure

  DynamicallocationinAzureisnotasgoodaswithEC2  Ec2billingisbythehour,sonottoogoodforquickneeds  .NETcodewasveryportablebetweenEC2andAzure  Watchthebandwidthbetweenstoragezones

 Managementisdifficultinboth  ButAzuremanagementiseasierthanEC2  Azuremonitorsyourrolesandrestartsthem(EC2doesn’t)

  EC2feelsalotheavierthanAzure  Seemsgreatforappliances  Butifyouaredoing.NET,besttogoAzure

Page 31: Using Azure for Computationally Intensive Workloads

LessonsLearned Data

  Gettingdataintothecloudcanbealotofwork  RESTdoesisnotperformantforlarge#’sofsmallrecords

 Designingdatafornon‐relationalstorageiscumbersomeandrequiresachangeofmindset

Page 32: Using Azure for Computationally Intensive Workloads

LessonsLearned  Programming

  URLsforWCFservicesmustberewritteninthevariousenvironments

  .NETcodeforwebandworkersisverysimilartonormal.NETcode

  Lackoffulltrustcanbeapain;manylibrariescausedfailures  F#needstobelinkedintothesolutionduetonotbeingavailableintheAzureGAC/fulltrust

  Can’ttalkdirectlytoAzureeasilyfromSilverlight  Debuggingisdifficult:logs,writingtoqueues,ortoSQL

Page 33: Using Azure for Computationally Intensive Workloads

Thingstolookforinthefuture ConcernaboutAzurepricingforunutilizedworkers Dynamic/APIbasedallocationofroles ManagementAPI’sanduserinterfaces Capson#ofinstances/rolesavailable

Page 34: Using Azure for Computationally Intensive Workloads

Economics EC2

  Ranasubsetoftheoveralltask Usedfiveinstancesasbaseline  100unitsofwork

  50volatilityblocksofwork  50correlationblocksofwork  Eachinstancehandled10blocksofworkforbothvolatilityandcorrelation

  Volatilitiestook6.9minutesperblock  Correlationstook4.6minutesperblock

Page 35: Using Azure for Computationally Intensive Workloads

Economics–SubsetofSolu2onCalculation Time #Blocks TotalTime

Volatility 6.9 10 69

Correlation 4.6 10 46

TotalTime 115

Cost/BillableHour $0.125

Cost/Node $0.25

TotalCost(5Nodes) $1.25

Page 36: Using Azure for Computationally Intensive Workloads

Economics–FullSolu2onCalculation Time #Blocks TotalTime

Volatility 6.9 10 69

Correlation 4.6 500 2300

TotalTime 2369

Cost/BillableHour $0.125

Cost/Node $5.00

TotalCost(5Nodes) $25.00

Page 37: Using Azure for Computationally Intensive Workloads

Economics–SingleSystemCalculation Time #Blocks TotalTime

Volatility 6.9 50 345

Correlation 4.6 2500 11,500

TotalTime(mins) 11,845

TotalTime(days) 8.25

Page 38: Using Azure for Computationally Intensive Workloads

Economics–2500NodesCalculation Time #Blocks TotalTime

Volatility 6.9 1 6.9

Correlation 4.6 1 4.6

TotalTime 11.5

Cost/BillableHour $0.125

Cost/Node $0.125

TotalCost(2500Nodes) $312.50

Page 39: Using Azure for Computationally Intensive Workloads

Economics Thereisacrossoverofspeedvs.cost:

  $312.50(quickest)versus$25.00(mostcosteffective) MinimumbillinghourgranularityofEC2introducesafixedcostcomponent

  Isn’tnecessarilycheapercomparedtothecostof‘fixed’hardwareoveralongperiodoftime

 Computetimenottheonlycosttotakeintoaccount Datatransferin&outofcloudisequallyascostly

Page 40: Using Azure for Computationally Intensive Workloads

Conclusions Whatisthescalabilityofcloudarchitecture?

  Thisproblemwaslinearlyscalable;doublethenodes,roughlyhalfthetime

  Coststructure–isiteconomical?  Thenumberslookgoodcomparedtoinvestingincapitalandhumans

  Makesureyoudon’tgetbilledfornon‐utilizedtime  Bandwidthstillcostsyou,andcouldbesignificant  Watchforminimumbillingtimes

  Howdoesthesolutiondifferfromanon‐cloudsolution?  WithAzure,it’sverysimilarcoding(moreinlessonslearned)

  Butyoumustlearntopartitiontheproblemsetforscaleout

Page 41: Using Azure for Computationally Intensive Workloads

Q&A

Page 42: Using Azure for Computationally Intensive Workloads

Theconversa2ondoesn’tstophere!  Signinonwww.entdevcon.comnotonlytowatchthesessions,buttoalsodiscussthecontent!

 Createyourownblogs,wikis,conversationsandspecialinterestgroups–watchcontent–allforFREE!

 MakeaindustryconnectionswithyourpeersandMicrosoftexpertsonline!

[email protected]

Page 43: Using Azure for Computationally Intensive Workloads

EDConline!  Jointhecommunityofenterprisedevelopers!atwww.entdevcon.com  Shareyourstoriestodayandbeyondtheevent!  Tweetdirectlyto#EntDevConTwitter  ShareyourpicturesonourFacebookgroup! Discussionofthecommunity

Page 44: Using Azure for Computationally Intensive Workloads

Filloutyourevalua2ons!  Day1–Tonight’sreceptionrequirestickets.Inordertoreceiveyourticket,youmustcompleteanevaluationformforDay1,andreturntoregistrationdesk.

  Day2–Wewillholdaprizeraffleduringtheclosingkeynote.PleasehandinyourDay2evaluationspriortothekeynote.Prizesinclude:  Xbox360  Zunemusicplayers  WindowsMobiledevice,completewithmouseenabledpointerandkeyboard.

  MicrosoftWirelessLaserDesktop  LegoMindstormkits

Page 45: Using Azure for Computationally Intensive Workloads