《Serverless设计原则有效架构选择实践_LucaMezzalira.pdf》由会员分享,可在线阅读,更多相关《Serverless设计原则有效架构选择实践_LucaMezzalira.pdf(46页珍藏版)》请在三个皮匠报告上搜索。
1、UPDATE THIS PRESENTATION HEADER IN SLIDE MASTER yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.Serverless Design PrinciplesServerless Design Principlesa guide to effective architectural choicesLuca MezzaliraPrinci
2、pal Serverless Specialist Solutions Architect亚马逊云科技UPDATE THIS PRESENTATION HEADER IN SLIDE MASTER yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.2Luca Luca MezzaliraMezzaliraPrincipal Serverless Specialist at AWS
3、International SpeakerAuthorUPDATE THIS PRESENTATION HEADER IN SLIDE MASTER yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.3Distributed SystemsDistributed Systemsare LIVING systemsare LIVING systems yyyy,Amazon Web
4、 Services,Inc.or its affiliates.All rights reserved.Distributed systems goalsDistributed systems goalsBusinessAgilityFaster feedback loopOrganization scalabilityReduceblast radiusReduce external dependenciesUPDATE THIS PRESENTATION HEADER IN SLIDE MASTER yyyy,Amazon Web Services,Inc.or its affiliate
5、s.All rights reserved.yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.How does serverless fitHow does serverless fitin distributed systems?in distributed systems?5 yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.6from undi fferenti ated heavy l i fti ngtowards a
6、 focus on acti vi ti es that maxi mi ze busi ness val uefor YOUn customers.Serverless isServerless is a STRATEGYUPDATE THIS PRESENTATION HEADER IN SLIDE MASTER yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.7Serve
7、rless PortfolioServerless Portfolio*AWS LambdaAWS FargateAmazon API GatewayAmazon SNSAmazon SQSAWS Step FunctionsAmazon Aurora ServerlessAmazon S3Amazon DynamoDBAWS IAMAmazon CognitoAmazon InspectorAmazon VPCAmazon GuardDutyAWSCloudFormationAWSCloud9AWS CloudTrailAmazonCloudWatchAWS X-RayAWSCodePipe
8、lineAWS ConfigAWS SSOAWSShieldAWSWAFAmazon KinesisAWS ServerlessApplicationRepositoryAPPLICATION PRIMITIVES COMPUTE AND DATASTORESAPPLICATION INTEGRATIONDeveloper ToolsSECURITY AND ADMINISTRATIONA W SA p p Sy n cAmazon EventBridge*n o t e x h a u s t i v e yyyy,Amazon Web Services,Inc.or its affilia
9、tes.All rights reserved.Where can serverless help?Where can serverless help?Automatic scalingManaged infrastructureLower TotalCost of Ownership(TCO)Security and isolationby designFocus on business valueBusiness agilityUPDATE THIS PRESENTATION HEADER IN SLIDE MASTER yyyy,Amazon Web Services,Inc.or it
10、s affiliates.All rights reserved.yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.How to designHow to designServerless applicationsServerless applications9 yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.CONNECTED DIMENSIONS in distributed systemsCONNECTED DIMENS
11、IONS in distributed systemsOrganizationCultureSystem ArchitectureUPDATE THIS PRESENTATION HEADER IN SLIDE MASTER yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.OrganizationOrganization11 yyyy,Amazon Web Services,I
12、nc.or its affiliates.All rights reserved.Any organization Any organization that designs a system that designs a system will will produce a design produce a design whose structurewhose structureis is a copy of the organizations a copy of the organizations communication structurecommunication structur
13、e.Melvin E.ConwayMelvin E.Conway1967 yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.13Team ATeam CTeam BPlatform TeamTech LeadershipCentralized mindsetCentralized mindsetSecurity TeamArchitecture TeamEngineering Teams yyyy,Amazon Web Services,Inc.or its affiliates.All rights rese
14、rved.14Catalog TeamPersonalization TeamOn-boarding TeamPlatform TeamInner Platform(AWS)Security Platform+Tools)(Stream-aligned team A team with a business-aligned objectiveEnabling Team-An Enabling team helps a stream-aligned team to overcome obstacles.Complicated Subsystem Team A team with speciali
15、st skills that facilitate acute functionalityFacilitating)(Federated Service(i.e.X-as-a-Service)Data Science TeamPlatform-as-a-ServiceKey:)()(Decentralize mindsetDecentralize mindset yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.Serverless is an extensionServerless is an extensi
16、onof your enablement teams yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.Enablement teamsEnablement teamsfocus with Serverlessfocus with Serverless1 12 23 3En h a n cin g th e D e ve lo p e r Exp e rie n cefo r th e va lu e stre a m te a m sD e fin in g g u a rd ra ilsu sin g a
17、u to m a tio n a n d sh ift le ft m in d se tO p e ra tio n a lize cro ss cu ttin g co n ce rn sa cro ss a d istrib u te d syste mUPDATE THIS PRESENTATION HEADER IN SLIDE MASTER yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.yyyy,Amazon Web Services,Inc.or its affiliates.All righ
18、ts reserved.CultureCulture17UPDATE THIS PRESENTATION HEADER IN SLIDE MASTER yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.18DecentralizeDecentralize&Empower&Empower yyyy,Amazon Web Services,Inc.or its affiliates.
19、All rights reserved.19Developing a culture of serverless-firstDeveloping a culture of serverless-firstForm Cloud Center of Excellence.Form CCOEDeliver strategic“light house”modernized workloadsQuick WinsEstablish clear vision and support from leadershipLeadership SupportBuild reusable patterns,refer
20、ence architecture,and shared servicesBest PracticesCommunity Building and EnablementEvangelizeDecentralize CCOE function and federate across the organizationReorganize123456UPDATE THIS PRESENTATION HEADER IN SLIDE MASTER yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.yyyy,Amazon
21、Web Services,Inc.or its affiliates.All rights reserved.System ArchitectureSystem Architecture20UPDATE THIS PRESENTATION HEADER IN SLIDE MASTER yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.21EvolutionaryEvolution
22、aryArchitectureArchitecture yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.Architecture begins withArchitecture begins with1 12 23 3G a th e rin g b u sin e ss re q u ire m e n tsto e xp re ss in yo u r syste mD e fin in g a rch ite ctu re ch a ra cte risticsto id e n tify th e r
23、ig h t p a tte rn s to a p p lyM a p yo u r d e sig n in to A W x se rvice s yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.Most opinionatedLeast to manageLeast opinionatedMost to manageAWx LambdaAWx App nunnerAWx FargateA spectrum of compute for different needsA spectrum of comp
24、ute for different needsA m a z o n EC2 yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.Selecting services that fit your strategySelecting services that fit your strategyStep OneStep OneStart with the highestabstractionStep TwoStep TwoMove to a lowerabstraction when neededStep Thre
25、eStep ThreeIterate and evolve1 12 23 3UPDATE THIS PRESENTATION HEADER IN SLIDE MASTER yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.Design PrinciplesDesign Principles25UPDATE THIS PRESENTATION HEADER IN SLIDE MAS
26、TER yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.26ModularityModularity yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.Modularity:thequalityof consisting Modularity:thequalityof consisting of
27、ofseparatepartsseparatepartsthat,whenthat,whencombinedcombined,formformacompletewhole.acompletewhole.Cambridge DictionaryCambridge Dictionary yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.Asystemlacksmodularity when Asystemlacksmodularity when atweakto one ofitscomponentsatweakt
28、o one ofitscomponentsaffectsthefunctioningofothers.affectsthefunctioningofothers.Cambridge DictionaryCambridge Dictionary yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.Modularity using codeModularity using codeStrong encapsulationLarge usage of design patternsDecouple business l
29、ogic from environmentDevelopers discipline yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.Modularity using infrastructureModularity using infrastructureMore options to express your intentsConfiguration over codeMany common built-in behaviorsMore control on what to develop yyyy,Am
30、azon Web Services,Inc.or its affiliates.All rights reserved.Architecture and patterns enabled by ServerlessArchitecture and patterns enabled by Serverless31MicroservicesEvent-Driven ArchitecturesData ArchitecturesIntegration PatternsUPDATE THIS PRESENTATION HEADER IN SLIDE MASTER yyyy,Amazon Web Ser
31、vices,Inc.or its affiliates.All rights reserved.yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.How to design a workloadHow to design a workloadusing Serverlessusing Serverless32 yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.Business requirementsBusiness requi
32、rements33Gift code service for an e-commerceGift codes can be generated by the system or 3rd party companiesFor every gift code consumption we need toNotify the customer support teamUpdate the users account historyIf the gift code was issued by 3rd party company notify them yyyy,Amazon Web Services,
33、Inc.or its affiliates.All rights reserved.Workload Characteristics Workload Characteristics 3499.99%availability on critical path99.9%availability on the rest of the systemEvents to communicate across bounded contextUnder 1 second response time for the user facing APIsScale to up 3000 TPS with 50%he
34、adroom yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.High-level architectureHigh-level architecture35CRMUser AccountGiftCodeService3rd PartyGift CodeSystems yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.Architectural characteristicsArchitectural characterist
35、ics36 yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.Team topologyTeam topology37 Security Team Platform Team Architecture Team yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.Serverless implementationServerless implementation38Synchronous APIQuick acknowledgme
36、nt for the usersOnly part that needs to scale based on users trafficDynamoDB Streams becomes the glue with the asynchronous part of the system yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.Serverless implementationServerless implementation39Synchronous APIStep Functions orchestr
37、ates different services to generate or update gift codesAPI Gateway helps to mitigate eventual traffic spikes from 3rd party services yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.Serverless implementationServerless implementation40Events allow the decoupling of producers and co
38、nsumersDynamoDB Streams notifiesevery change in the DynamoDB tableEventBridge Pipes enrich the information received for downstream servicesEventBridge is the message broker yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.Serverless implementationServerless implementation41Some 3rd
39、 party systems accepts an API calls in the format defined by your systemSome others require to translate from JSON to XML or any other formatMore architectural patterns are also applicable yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.Serverless implementationServerless implemen
40、tation42CRM has API limits so a queue helps us to ease the trafficUser account uses a Lambda function to manipulate the event and then integrate inside their bounded context yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.Ready for the futureReady for the future43New partnersData
41、Lake yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.Express your architecture characteristics Express your architecture characteristics and business requirements into and business requirements into infrastructureinfrastructure focusing on focusing onYOUR BUSINESS goalsYOUR BUSINE
42、SS goals yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.not buildnot buildSOFTWARESOFTWAREG n OWFrederick BrooksFrederick Brooks(Computer Architect)UPDATE THIS PRESENTATION HEADER IN SLIDE MASTER yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.谢谢谢谢 yyyy,Amazon Web Services,Inc.or its affiliates.All rights reserved.Luca M