02 aws dev-dayth_developingoverview_5oct17

102
v Amazon Web Services Kitisak Sriprasert Solution Architect AWS Developing Overview

Upload: g-able

Post on 24-Jan-2018

106 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: 02 aws dev-dayth_developingoverview_5oct17

v

Amazon Web ServicesKitisak SriprasertSolution Architect

AWS Developing Overview

Page 2: 02 aws dev-dayth_developingoverview_5oct17

vv

Distributed

Small&Agile

Automation

Autonomous

Intelligent

Page 3: 02 aws dev-dayth_developingoverview_5oct17

vAgenda

Monoliths to Microservices

Core Principles of Microservices

Approaches for Building Microservices Applications on AWS

Page 4: 02 aws dev-dayth_developingoverview_5oct17

v

Monoliths to Microservices

Page 5: 02 aws dev-dayth_developingoverview_5oct17

v

~11.6sMeantimebetween

deployments(weekday)

~5,708Maxnumberofdeployments

inasinglehour

~10,000Meannumberofhosts

simultaneouslyreceivingadeployment

~30,000Maxnumberofhosts

simultaneouslyreceivingadeployment

DEPLOYMENTSAT

AMAZON.COM

Page 6: 02 aws dev-dayth_developingoverview_5oct17

v

“The Monolith”

Page 7: 02 aws dev-dayth_developingoverview_5oct17

v

Challenges with monolithic software

Long

Build/Test/Release

Cycles

(whobrokethebuild?)

Operations

isanightmare

(moduleXisfailing,

who’stheowner?)

Difficultto

scale

Newreleases

takemonths

Longtimetoadd

newfeatures

Architectureis

hardtomaintain

andevolve

Lackofinnovation

Frustratedcustomers

Lackofagility

Page 8: 02 aws dev-dayth_developingoverview_5oct17

v

Challenges with monolithic software

Long

Build/Test/Release

Cycles

(whobrokethebuild?)

Operations

isanightmare

(moduleXisfailing,

who’stheowner?)

Difficultto

scale

Newreleases

takemonths

Longtimetoadd

newfeatures

Architectureis

hardtomaintain

andevolve

Lackofinnovation

Frustratedcustomers

Lackofagility

Page 9: 02 aws dev-dayth_developingoverview_5oct17

v

Challenges with monolithic software

Long

Build/Test/Release

Cycles

(whobrokethebuild?)

Operations

isanightmare

(moduleXisfailing,

who’stheowner?)

Difficultto

scale

Newreleases

takemonths

Longtimetoadd

newfeatures

Architectureis

hardtomaintain

andevolve

Lackofinnovation

Frustratedcustomers

Lackofagility

Page 10: 02 aws dev-dayth_developingoverview_5oct17

v

“20080219BonMorningDSC_0022B”bySunphol Sorakul .Noalterationsotherthancropping.https://www.flickr.com/photos/83424882@N00/3483881705/ImageusedwithpermissionsunderCreativeCommonslicense2.0,AttributionGenericLicense(https://creativecommons.org/licenses/by/2.0/)

Page 11: 02 aws dev-dayth_developingoverview_5oct17

v

Monolith development lifecycle

releasetestbuild

deliverypipeline

app

(akathe“monolith”)developers

PhotobySageRoss.Noalterationsotherthancropping.https://www.flickr.com/photos/ragesoss/2931770125/ImageusedwithpermissionsunderCreativeCommonslicense2.0,AttributionGenericLicense(https://creativecommons.org/licenses/by/2.0/)

Page 12: 02 aws dev-dayth_developingoverview_5oct17

v

“IMG_1760”byRobertCouse-Baker.Noalterationsotherthancropping.https://www.flickr.com/photos/29233640@N07/14859431605/ImageusedwithpermissionsunderCreativeCommonslicense2.0,AttributionGenericLicense(https://creativecommons.org/licenses/by/2.0/)

Page 13: 02 aws dev-dayth_developingoverview_5oct17

v

Page 14: 02 aws dev-dayth_developingoverview_5oct17

v

Page 15: 02 aws dev-dayth_developingoverview_5oct17

v

“service-orientedarchitecturecomposed ofloosely coupled elementsthat havebounded contexts”

AdrianCockcroft(VP,CloudArchitectureStrategyatAWS)

Page 16: 02 aws dev-dayth_developingoverview_5oct17

v

Servicescommunicatewitheachotheroverthenetwork

“service-orientedarchitecturecomposed ofloosely coupled elementsthat havebounded contexts”

AdrianCockcroft(VP,CloudArchitectureStrategyatAWS)

Page 17: 02 aws dev-dayth_developingoverview_5oct17

v

“service-orientedarchitecturecomposed ofloosely coupled elementsthat havebounded contexts”

AdrianCockcroft(VP,CloudArchitectureStrategyatAWS)

You canupdatetheservicesindependently;updatingoneservicedoesn’trequirechanginganyotherservices.

Page 18: 02 aws dev-dayth_developingoverview_5oct17

v

“service-orientedarchitecturecomposed ofloosely coupled elementsthat havebounded contexts”

AdrianCockcroft(VP,CloudArchitectureStrategyatAWS)

Self-contained;youcanupdatethecodewithoutknowinganythingabouttheinternalsofothermicroservices

Page 19: 02 aws dev-dayth_developingoverview_5oct17

v

“Tools”byTonyWalmsley:Noalterationsotherthancropping.https://www.flickr.com/photos/twalmsley/6825340663/ImageusedwithpermissionsunderCreativeCommonslicense2.0,AttributionGenericLicense(https://creativecommons.org/licenses/by/2.0/)

“Do one thing, and do it well”

Page 20: 02 aws dev-dayth_developingoverview_5oct17

v

Anatomy of a Micro-service

Page 21: 02 aws dev-dayth_developingoverview_5oct17

v

DataStore(eg,RDS,DynamoDB

ElastiCache,ElasticSearch)

Anatomy of a Micro-service

Page 22: 02 aws dev-dayth_developingoverview_5oct17

v

Application/Logic(code,libraries,etc)

Anatomy of a Micro-service

DataStore(eg,RDS,DynamoDB

ElastiCache,ElasticSearch)

Page 23: 02 aws dev-dayth_developingoverview_5oct17

v

Application/Logic(code,libraries,etc)

Anatomy of a Micro-service

DataStore(eg,RDS,DynamoDB

ElastiCache,ElasticSearch)

PublicAPI

POST/micro-serviceGET/micro-service

Page 24: 02 aws dev-dayth_developingoverview_5oct17

v

AvoidSoftwareCoupling

Page 25: 02 aws dev-dayth_developingoverview_5oct17

v

Drivers

micro-service

Payments

micro-service Location

micro-service

Ordering

micro-service

Restaurant

micro-service

Ecosystem of microservices

Page 26: 02 aws dev-dayth_developingoverview_5oct17

v

Page 27: 02 aws dev-dayth_developingoverview_5oct17

v

Page 28: 02 aws dev-dayth_developingoverview_5oct17

v

= 50 million deployments a year

Thousands of teams× Microservice architecture

× Continuousdelivery

× Multipleenvironments

(5708 per hour, or every 0.63 second)

Page 29: 02 aws dev-dayth_developingoverview_5oct17

v

Page 30: 02 aws dev-dayth_developingoverview_5oct17

v

Page 31: 02 aws dev-dayth_developingoverview_5oct17

v

Principles of Microservices(6 principles)

Page 32: 02 aws dev-dayth_developingoverview_5oct17

v

Principle1

Micro-servicesonlyrelyoneachother’spublicAPI

“Contracts”byNobMouse.Noalterationsotherthancropping.https://www.flickr.com/photos/nobmouse/4052848608/

ImageusedwithpermissionsunderCreativeCommonslicense2.0,AttributionGenericLicense(https://creativecommons.org/licenses/by/2.0/)

Page 33: 02 aws dev-dayth_developingoverview_5oct17

v

Micro-serviceA Micro-serviceB

publicAPI publicAPI

Principle1: Microservicesonlyrelyoneachother’spublicAPI

DynamoDB

Page 34: 02 aws dev-dayth_developingoverview_5oct17

v

Micro-serviceA Micro-serviceB

publicAPI publicAPI

Principle1: Microservicesonlyrelyoneachother’spublicAPI

(HideYourData)

DynamoDB

Page 35: 02 aws dev-dayth_developingoverview_5oct17

v

Micro-serviceA Micro-serviceB

publicAPI publicAPI

Principle1: Microservicesonlyrelyoneachother’spublicAPI

(HideYourData)

Nope!

DynamoDB

Page 36: 02 aws dev-dayth_developingoverview_5oct17

v

Micro-serviceA Micro-serviceB

publicAPI publicAPI

Principle1: Microservicesonlyrelyoneachother’spublicAPI

(HideYourData)

DynamoDB

Page 37: 02 aws dev-dayth_developingoverview_5oct17

v

Micro-serviceA

publicAPI

Principle1: Microservicesonlyrelyoneachother’spublicAPI

(EvolveAPIinbackward-compatibleway…anddocument!)

storeRestaurant (id,name,cuisine)Version1.0.0

Page 38: 02 aws dev-dayth_developingoverview_5oct17

v

Micro-serviceA

publicAPI

Principle1: Microservices onlyrelyoneachother’spublicAPI

(EvolveAPIinbackward-compatibleway…anddocument!)

storeRestaurant (id,name,cuisine)Version1.0.0

storeRestaurant (id,name,cuisine)storeRestaurant (id,name,arbitrary_metadata)addReview (restaurantId,rating,comments)

Version1.1.0

Page 39: 02 aws dev-dayth_developingoverview_5oct17

v

Micro-serviceA

publicAPI

Principle1: Microservices onlyrelyoneachother’spublicAPI

(EvolveAPIinbackward-compatibleway…anddocument!)

storeRestaurant (id,name,cuisine)Version1.0.0

storeRestaurant (id,name,cuisine)storeRestaurant (id,name,arbitrary_metadata)addReview (restaurantId,rating,comments)

Version1.1.0

storeRestaurant (id,name,arbitrary_metadata)addReview (restaurantId,rating,comments)

Version2.0.0

Page 40: 02 aws dev-dayth_developingoverview_5oct17

v

Principle2

Usetherighttoolforthejob

“Tools#2”byJuanPabloOlmo.Noalterationsotherthancropping.https://www.flickr.com/photos/juanpol/1562101472/

ImageusedwithpermissionsunderCreativeCommonslicense2.0,AttributionGenericLicense(https://creativecommons.org/licenses/by/2.0/)

Page 41: 02 aws dev-dayth_developingoverview_5oct17

v

Principle2:Usetherighttoolforthejob

(Embracepolyglotpersistence)

Micro-serviceA Micro-serviceB

publicAPI publicAPI

DynamoDB

Page 42: 02 aws dev-dayth_developingoverview_5oct17

v

Principle2:Usetherighttoolforthejob

(Embracepolyglotpersistence)

Micro-serviceA Micro-serviceB

publicAPI publicAPI

DynamoDB

AmazonElasticsearchService

Page 43: 02 aws dev-dayth_developingoverview_5oct17

v

Principle2:Usetherighttoolforthejob

(Embracepolyglotpersistence)

Micro-serviceA Micro-serviceB

publicAPI publicAPI

AmazonElasticsearchService

RDSAurora

Page 44: 02 aws dev-dayth_developingoverview_5oct17

v

Principle2:Usetherighttoolforthejob

(Embracepolyglotprogrammingframework)

Micro-serviceA Micro-serviceB

publicAPI publicAPI

AmazonElasticsearchService

RDSAurora

Page 45: 02 aws dev-dayth_developingoverview_5oct17

v

Principle2:Usetherighttoolforthejob

(Embracepolyglotprogrammingframework)

Micro-serviceA Micro-serviceB

publicAPI publicAPIAmazonElasticsearchService

RDSAurora

Page 46: 02 aws dev-dayth_developingoverview_5oct17

v

Principle3

SecureYourServices

“security”byDaveBleasdale.Noalterationsotherthancropping.https://www.flickr.com/photos/sidelong/3878741556/

ImageusedwithpermissionsunderCreativeCommonslicense2.0,AttributionGenericLicense(https://creativecommons.org/licenses/by/2.0/)

Page 47: 02 aws dev-dayth_developingoverview_5oct17

v

2007 2008 2009 2010 2011 2012 2013 2014 2015

48 6182

159

280

516

722

AWSinnovatesconstantly

>90% drivenbycustomersneeds

SecurityisourNo.1priority

Page 48: 02 aws dev-dayth_developingoverview_5oct17

v

Page 49: 02 aws dev-dayth_developingoverview_5oct17

v

All customers benefit from the same securityCertified by independent experts• SOC 1 (SSAE 16 & ISAE 3402) Type II• SOC 2 Type II and public SOC 3 report• ISO 27001• ISO 9001• PCIDSSLevel1- ServiceProvider• ISO 27017 (security of the cloud)• ISO 27018 (personal data)

Compute Storage Database Network

AWS Global Infrastructure Regions

Availability Zones CloudFront edge

locations

AWS Foundation Services

Page 50: 02 aws dev-dayth_developingoverview_5oct17

v

AWSFoundationServices

Compute Storage Database Networking

AWSGlobal

Infrastructure Regions

AvailabilityZones

EdgeLocations

Optional– Opaquedata:1’sand0’s(intransit/atrest)

Platform&ApplicationsManagement

Customercontent

Custom

ers

Shared Security Model: Infrastructure ServicesSuch as Amazon EC2, Amazon EBS, and Amazon VPC

Managedby

Managedby

Client-SideDataencryption&DataIntegrityAuthentication

NetworkTrafficProtectionEncryption/Integrity/Identity

AWSIA

MCustomerIA

M

OperatingSystem,Network&FirewallConfiguration

Server-SideEncryptionFireSystemand/orData

Page 51: 02 aws dev-dayth_developingoverview_5oct17

v

AWSFoundationServices

Compute Storage Database Networking

AWSGlobal

Infrastructure Regions

AvailabilityZones

EdgeLocations

Optional– Opaquedata:1’sand0’s(intransit/atrest)

Fire

wall

Config

uratio

n

Platform&ApplicationsManagement

OperatingSystem,NetworkConfiguration

Customercontent

Custom

ers

Shared Security Model: Container ServicesSuch as Amazon RDS, Amazon EMR and AWS Elastic Beanstalk

Managedby

Managedby

Client-SideDataencryption&DataIntegrityAuthentication

NetworkTrafficProtectionEncryption/Integrity/Identity

AWSIA

MCustomerIA

M

Page 52: 02 aws dev-dayth_developingoverview_5oct17

v

AWSFoundationServices

Compute Storage Database Networking

AWSGlobal

Infrastructure Regions

AvailabilityZones

EdgeLocations

Platform&ApplicationsManagement

OperatingSystem,Network&FirewallConfiguration

Customercontent

Custom

ers

Shared Security Model: Abstracted ServicesSuch as Amazon S3 and Amazon DynamoDB Managedby

Managedby

Optional– OpaqueData:1’sand0’s

(inflight/atrest)DataProtectionbythePlatform

ProtectionofDataatRest

NetworkTrafficProtectionbythePlatformProtectionofDataatinTransit

Client-SideDataEncryption&DataIntegrityAuthentication

AWSIA

MCustomer

IAM

Page 53: 02 aws dev-dayth_developingoverview_5oct17

v

Principle3:SecureYourServices

• Defense-in-depth

• Networklevel(e.g.VPC,SecurityGroups,TLS)• Server/container-level• App-level• IAMpolicies• IAMrolesonECStasks• CloudTrail logs

• Authentication&Authorization

• Client-to-service,aswellasservice-to-service• IAM-basedAuthentication

• Secretsmanagement

• ParameterStore• S3bucketpolicies+KMS+IAM• Open-sourcetools(e.g.Vault,Keywhiz)

Amazon

EC2Container

Service(ECS)

Page 54: 02 aws dev-dayth_developingoverview_5oct17

v

Principle3:SecureYourServices

• Defense-in-depth

• Networklevel(e.g.VPC,SecurityGroups,TLS)• Server/container-level• App-level• IAMpolicies

• Gateway (“Frontdoor”)

• APIThrottling

• Stage-levelandMethod-levelthrottling

• Authentication&Authorization

• Client-to-service,aswellasservice-to-service• AWSCognito:userpools,federatedidentities• APIGateway:customLambdaauthorizers• IAM-basedAuthentication• Token-basedauth (JWTtokens,OAuth 2.0)

• Secretsmanagement

• S3bucketpolicies+KMS+IAM• Open-sourcetools(e.g.Vault,Keywhiz)

APIGateway

Page 55: 02 aws dev-dayth_developingoverview_5oct17

v

Principle4

Beagoodcitizenwithintheecosystem

“LamingtonNationalPark,rainforest”byJussarian.Noalterationsotherthancropping.https://www.flickr.com/photos/kerr_at_large/87771074/

ImageusedwithpermissionsunderCreativeCommonslicense2.0,AttributionGenericLicense(https://creativecommons.org/licenses/by/2.0/)

Page 56: 02 aws dev-dayth_developingoverview_5oct17

v

HeySally,weneedtocallyourmicro-servicetofetch

restaurantsdetails.

SurePaul.WhichAPIsyouneedtocall?OnceIknow

betteryourusecasesI’llgiveyoupermissiontoregister

yourserviceasaclientonourservice’sdirectoryentry.

Micro-serviceA Micro-serviceB

publicAPI publicAPI

Principle4:Beagoodcitizenwithintheecosystem

Page 57: 02 aws dev-dayth_developingoverview_5oct17

v

Principle4:Beagoodcitizenwithintheecosystem

(HaveclearSLAs)

RestaurantMicro-service

15TPS100TPS5TPS20TPS

Beforeweletyoucallourmicro-servicewe

needtounderstandyourusecase,expectedload(TPS)andaccepted

latency

Page 58: 02 aws dev-dayth_developingoverview_5oct17

v

…andmany,manyothers!

Distributedmonitoringandtracing

• “IstheservicemeetingitsSLA?”• “Whichserviceswereinvolvedinarequest?”• “Howdiddownstreamdependenciesperform?”

Sharedmetrics

• e.g.servicedependency,request/responsetime

Distributedtracing

• AWSX-Ray• 3rd party:Zipkin,OpenTracing

User-experiencemetrics

• Statuscodes,latency,errorcounts,timetofirstbyte

Principle4:Beagoodcitizenwithintheecosystem(Distributedmonitoring,loggingandtracing)

Page 59: 02 aws dev-dayth_developingoverview_5oct17

v

AWSX-Ray

Distributedtracingservicethatenablesdeveloperstoanalyzethebehavioroftheirapplications

Page 60: 02 aws dev-dayth_developingoverview_5oct17

v

AWSX-Raytracesrequestsmadetoyourapplication

X-Rayservice

X-Raycombinesthedata

gatheredfromeachserviceintosingularunitscalledtraces

Viewtheservicemaptoseetracedatasuchas

latencies,HTTPstatuses,andmetadataforeachservice

Drillintotheserviceshowing

unusualbehaviorto

identifytherootissue

X-Raycollectsdataabouttherequestfromeachofthe

underlyingapplicationsservicesitpassesthrough

Page 61: 02 aws dev-dayth_developingoverview_5oct17

v

Principle5

Morethanjust

technologytransformation

“rowingontheriverinBedford”byMatthewHunt.Noalterationsotherthancropping.https://www.flickr.com/photos/mattphotos/19189529/

ImageusedwithpermissionsunderCreativeCommonslicense2.0,AttributionGenericLicense(https://creativecommons.org/licenses/by/2.0/)

Page 62: 02 aws dev-dayth_developingoverview_5oct17

vv

“Anyorganizationthatdesignsasystemwillinevitablyproduceadesignwhosestructureisacopyoftheorganization’scommunicationstructure.”

MelvinE.Conway,1967

Conway’sLaw

Page 63: 02 aws dev-dayth_developingoverview_5oct17

v

Silo’d functional teams à silo’d application architectures

ImagefromMartinFowler’sarticleonmicroservices,athttp://martinfowler.com/articles/microservices.html

Noalterationsotherthancropping.Permissiontoreproduce:http://martinfowler.com/faq.html

Page 64: 02 aws dev-dayth_developingoverview_5oct17

v

Cross functional teams à self-contained services

ImagefromMartinFowler’sarticleonmicroservices,athttp://martinfowler.com/articles/microservices.html

Noalterationsotherthancropping.Permissiontoreproduce:http://martinfowler.com/faq.html

Page 65: 02 aws dev-dayth_developingoverview_5oct17

vFullownership

Fullaccountability

Alignedincentives

“DevOps”

Non-pizzaimagefromMartinFowler’sarticleonmicroservices,athttp://martinfowler.com/articles/microservices.html

Noalterationsotherthancropping.Permissiontoreproduce:http://martinfowler.com/faq.html

Cross functional teams à self-contained services(“Two-pizza teams” at Amazon)

Page 66: 02 aws dev-dayth_developingoverview_5oct17

v

Principle6

AutomateEverything

“Robot”byRobinZebrowski.Noalterationsotherthancropping.https://www.flickr.com/photos/firepile/438134733/

ImageusedwithpermissionsunderCreativeCommonslicense2.0,AttributionGenericLicense(https://creativecommons.org/licenses/by/2.0/)

Page 67: 02 aws dev-dayth_developingoverview_5oct17

v

releasetestbuild

Focused agile teams

2-pizzateam deliverypipeline service

Page 68: 02 aws dev-dayth_developingoverview_5oct17

v

releasetestbuild

releasetestbuild

Focused agile teams

2-pizzateam deliverypipeline service

Page 69: 02 aws dev-dayth_developingoverview_5oct17

v

releasetestbuild

releasetestbuild

Focused agile teams

2-pizzateam deliverypipeline service

releasetestbuild

Page 70: 02 aws dev-dayth_developingoverview_5oct17

v

releasetestbuild

releasetestbuild

Focused agile teams

2-pizzateam deliverypipeline service

releasetestbuild

releasetestbuild

Page 71: 02 aws dev-dayth_developingoverview_5oct17

v

releasetestbuild

releasetestbuild

Focused agile teams

2-pizzateam deliverypipeline service

releasetestbuild

releasetestbuild

releasetestbuild

Page 72: 02 aws dev-dayth_developingoverview_5oct17

v

releasetestbuild

releasetestbuild

Focused agile teams

2-pizzateam deliverypipeline service

releasetestbuild

releasetestbuild

releasetestbuild

releasetestbuild

Page 73: 02 aws dev-dayth_developingoverview_5oct17

v

Principle 6: Automate everything

AWSCodeCommit AWSCodePipeline AWSCodeDeploy

ELBAuto

ScalingEC2 LambdaECS

DynamoDBRDS ElastiCache

SQS SWF SESSNS

APIGatewayCloudWatch CloudTrail

Kinesis

Elastic

Beanstalk

Page 74: 02 aws dev-dayth_developingoverview_5oct17

v

Principles of Microservices

1.RelyonlyonthepublicAPI� Hideyourdata� DocumentyourAPIs� Defineaversioningstrategy

2.Usetherighttoolforthejob� Containerjourney?(useECS)� Polyglotpersistence(datalayer)� Polyglotframeworks(applayer)

3.Secureyourservices� Defense-in-depth� Authentication/authorization

6.Automateeverything� AdoptDevOps

4.Beagoodcitizenwithintheecosystem� HaveSLAs� Distributedmonitoring,logging,tracing

5.Morethanjusttechnologytransformation� Embraceorganizationalchange� Favorsmallfocuseddev teams

Page 75: 02 aws dev-dayth_developingoverview_5oct17

v

Benefits of microservices

Rapid

Build/Test/Release

Cycles

Clearownershipand

accountability

Easiertoscale

eachindividual

micro-service

Page 76: 02 aws dev-dayth_developingoverview_5oct17

v

Benefits of microservices

Rapid

Build/Test/Release

Cycles

Clearownershipand

accountability

Easiertoscale

eachindividual

micro-service

Newreleases

takeminutes

Shorttimetoadd

newfeatures

Easierto

maintainand

evolvesystem

Page 77: 02 aws dev-dayth_developingoverview_5oct17

v

Benefits of microservices

Rapid

Build/Test/Release

Cycles

Clearownershipand

accountability

Easiertoscale

eachindividual

micro-service

Newreleases

takeminutes

Shorttimetoadd

newfeatures

Easierto

maintainand

evolvesystem

Fasterinnovation

Delightedcustomers

Increasedagility

Page 78: 02 aws dev-dayth_developingoverview_5oct17

v

Appoaches for Building Microservices Applications on AWS

Page 79: 02 aws dev-dayth_developingoverview_5oct17

v

Drivers

micro-service

Payments

micro-service Location

micro-service

Ordering

micro-service

Restaurant

micro-service

Typical microservices application

Page 80: 02 aws dev-dayth_developingoverview_5oct17

vMicro-serviceDesign

Approach#1EC2

Page 81: 02 aws dev-dayth_developingoverview_5oct17

vMicro-serviceDesign

EC2

Page 82: 02 aws dev-dayth_developingoverview_5oct17

vMicro-serviceDesign

EC2

Page 83: 02 aws dev-dayth_developingoverview_5oct17

vMicro-serviceDesign

EC2EC2 EC2 EC2

Page 84: 02 aws dev-dayth_developingoverview_5oct17

vMicro-serviceDesign

EC2EC2 EC2 EC2

ElasticLoadBalancer

Page 85: 02 aws dev-dayth_developingoverview_5oct17

vMicro-serviceDesign

EC2EC2 EC2 EC2

ElasticLoadBalancer

AWSElastic

Beanstalk

Page 86: 02 aws dev-dayth_developingoverview_5oct17

vv

Elastic Beanstalk vs. DIY

Yourcode

HTTPserver

Applicationserver

Languageinterpreter

Operatingsystem

Host

ElasticBeanstalkconfigureseachEC2instanceinyourenvironmentwiththecomponentsnecessarytorunapplicationsfortheselectedplatform.Nomoreworryingaboutloggingintoinstancestoinstallandconfigureyourapplicationstack.

Focusonbuildingyourapplication

Providedby you

ProvidedandmanagedbyElasticBeanstalk

On-instanceconfiguration

Page 87: 02 aws dev-dayth_developingoverview_5oct17

vMicro-serviceDesign

Approach#2Containers

UsingECS

Page 88: 02 aws dev-dayth_developingoverview_5oct17

vv

Amazon

EC2ContainerService(ECS)

istheclustermanagementsystemtorunyourDockercontainers

Page 89: 02 aws dev-dayth_developingoverview_5oct17

vvCluster Management Made Easy

• Nothing to run

• Complete state

• Control and monitoring

• Scale

UseAmazonEC2ContainerServiceforcontainerworkloads

Amazon

EC2Container

Service(ECS)

Page 90: 02 aws dev-dayth_developingoverview_5oct17

vvFlexible Scheduling

• Applications

• Batch jobs

• Multiple schedulers

UseAmazonEC2ContainerServiceforcontainerworkloads

Amazon

EC2Container

Service(ECS)

Page 91: 02 aws dev-dayth_developingoverview_5oct17

vvDesigned for Use with Other AWS Services• Elastic Load Balancing

• Amazon Elastic Block Store

• Amazon Virtual Private Cloud

• AWS Identity and Access Management

• AWS CloudTrail

UseAmazonEC2ContainerServiceforcontainerworkloads

Amazon

EC2Container

Service(ECS)

Page 92: 02 aws dev-dayth_developingoverview_5oct17

vMicro-serviceDesign

EC2EC2 EC2 EC2

ElasticLoadBalancer

Page 93: 02 aws dev-dayth_developingoverview_5oct17

vMicro-serviceDesign

EC2EC2 EC2 EC2

ElasticLoadBalancer

Page 94: 02 aws dev-dayth_developingoverview_5oct17

vMicro-serviceDesign

EC2EC2 EC2 EC2

ElasticLoadBalancer

Amazon

EC2Container

Service(ECS)

tomanagecontainers

Page 95: 02 aws dev-dayth_developingoverview_5oct17

vMicro-serviceDesign

Approach#3APIGateway

+Lambda

Page 96: 02 aws dev-dayth_developingoverview_5oct17

v

AWSLambda

letsyouruncodewithoutmanagingservers

Page 97: 02 aws dev-dayth_developingoverview_5oct17

v

Lambdaautomatically

scales

Uploadyourcode(Java,JavaScript,

Python)

Payforonlythecomputetime

youuse(sub-secondmetering)

SetupyourcodetotriggerfromotherAWSservices,

webservice calls,orappactivity

Page 98: 02 aws dev-dayth_developingoverview_5oct17

v

AWSAPIGatewayistheeasiestwaytodeploymicro-services

Page 99: 02 aws dev-dayth_developingoverview_5oct17

v

CreateaunifiedAPIfrontendfor

multiplemicro-services

…aswellasmonitoring,

logging,rollbacks,clientSDK

generation…

Authenticateandauthorizerequests

HandlesDDoSprotectionandAPIthrottling

Page 100: 02 aws dev-dayth_developingoverview_5oct17

v

It’s a journey…

Expectchallengesalongtheway…

• Understandingofbusinessdomains• EventualConsistency• Servicediscovery• Lotsofmovingpartsrequiresincreased

coordination• Complexityoftesting/deploying/

operatingadistributedsystem• Culturaltransformation

Page 101: 02 aws dev-dayth_developingoverview_5oct17

vAdditionalAWSresources:

• MicroservicesonAWSwhitepaper:

https://d0.awsstatic.com/whitepapers/microservices-on-

aws.pdf

• ServerlessWebapp - ReferenceArchitecture:

https://github.com/awslabs/lambda-refarch-webapp• MicroserviceswithECS:

https://aws.amazon.com/blogs/compute/using-amazon-api-gateway-with-microservices-deployed-on-amazon-ecs/

• MicroserviceswithouttheServers

https://aws.amazon.com/blogs/compute/microservices-without-the-servers

Popularopen-sourcetools:

• Serverless – http://serverless.com• Apex – http://apex.run/

https://aws.amazon.com/devops/

Additional resources

Page 102: 02 aws dev-dayth_developingoverview_5oct17

v

Thank you