Slide 1

Slide 1 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Building and Running Microservices with AWS Eiji Shinohara @shinodogg | Nov 2nd, 2018

Slide 2

Slide 2 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Building and Running Microservices with AWS Agenda • Microservices at Amazon.com • Microservices on AWS • Microservices for Developers!!

Slide 3

Slide 3 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. • ( +& ( ) Twitter: @shinodogg • 2013 8# Solutions ArchitectAWS Japan' • 2017 12# Startup SA • #AWSLoft Tokyo %" • AWS Startup Blog(!$,) https://aws.amazon.com/jp/blogs/startup/ *)

Slide 4

Slide 4 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. !$ J § %#"& As a manager: We are Hiring!! https://www.amazon.jobs/jp/jobs/735453/solutions-architect-startups

Slide 5

Slide 5 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. J As a manager: We are Hiring!! https://www.amazon.jobs/jp/jobs/735453/solutions-architect-startups

Slide 6

Slide 6 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Solutions Architect (@uorat) AWS Dev Day Tokyo 2017 http://engineer-blog.cyber-z.co.jp/entry/2017/06/07/210650 J

Slide 7

Slide 7 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 10/31ZOZO !$&:"% • AWSSA5) 10*=8.-+ ,'97⇒ 3< F • >A/D?;4@E#B AWS Solutions Architect 3< 2C (@uorat) (6

Slide 8

Slide 8 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. ),*% • '.#+$ 0 • AWS Loft Tokyo/ ! ( AWS Solutions Architect & - (@uorat) " https://aws.amazon.com/jp/blogs/startup/aws- media-services-seminar-at-loft/

Slide 9

Slide 9 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. ),*% • '.#+$ 0 • AWS Loft Tokyo/ ! ( AWS Solutions Architect & - (@uorat) " https://aws.amazon.com/jp/blogs/startup/aws- media-services-seminar-at-loft/ https://www.amazon.jobs/jp/jobs/735453/solutions-architect-startups J

Slide 10

Slide 10 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Building and Running Microservices with AWS Agenda • Microservices at Amazon.com • Microservices on AWS • Microservices for Developers!!

Slide 11

Slide 11 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon.com - warehouse

Slide 12

Slide 12 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon.com - warehouse Inbound Outbound

Slide 13

Slide 13 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon.com - warehouse Inbound • ! % • % • %" • "%&' • … Outbound • • #$ • # • &' • …

Slide 14

Slide 14 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon.com - warehouse Inbound Software Development Team Outbound Software Development Team Monolithic Software for Inbound Monolithic Software for Outbound Shared Datastore Shared Libraries

Slide 15

Slide 15 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon.com - warehouse Inbound Software Development Team Outbound Software Development Team Monolithic Software for Inbound Monolithic Software for Outbound Shared Datastore Shared Libraries Tightly Coupled

Slide 16

Slide 16 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon.com - warehouse PgK!SO • FHp”MR3A8?” • Inbound: MR++ • Outbound: MR-- • Hp3A8?YE$jHp='8=> • oLs` • Inbound1A:[ ^imlqb3.4f#Hp='8= >ZGf#Deploy • Outbound1A:4=8?QUhVHp3A8?.*A9N]$j Inbound1A:/74()&IE • c%\r Dtn$Twitch,;@4_u • Twitter #AWSDevDay 62-<0+OK • CTdbk.='5a"!JiW BX e

Slide 17

Slide 17 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Microservices

Slide 18

Slide 18 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Microservices at Amazon Product Service Data Store - DynamoDB - RDS - ElastiCache - … Application - Java - Python - Ruby - … A P I addProductDetails(ProductId id, ProductDetails details) removeProductDetails(ProductId id) getProductDetails(ProductId id) : ProductDetails …

Slide 19

Slide 19 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Breaking down into Services “Microservice architectures will use libraries, but their primary way of componentizing their own software is by breaking down into services” https://martinfowler.com/articles/microservices.html

Slide 20

Slide 20 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Breaking down into Services: warehouse Inbound • "!& • & • &# • #&'( • … Outbound • • $ % • $ • '( • … '( "!& &# &# #&' $ % $

Slide 21

Slide 21 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Breaking down into Services: warehouse Inbound • "!& • & • &# • #&'( • … Outbound • • $ % • $ • '( • … '( "!& &# &# #&' $ % $

Slide 22

Slide 22 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Two Pizza Development Teams 2-pizza team (4~8) Web

Slide 23

Slide 23 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Summit New York 2016 Keynote: Werner Vogels – ALB(Application Load Balancer) https://www.youtube.com/watch?v=b7yqd7z1RBQ

Slide 24

Slide 24 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Summit New York 2016 The Story Of Amazon.com • WTA9C04+(>C-G0BF • O"UnS Me$End of LifedZ • Service Oriented Architecturejm$b]' • DB i\(+21'c %%.F?G8F6API'I(+21 • Worked really well, but we made a mistake… • Data DrivendecompositionT 5G3246P#TuUnhf • Item, Customer, and Order 3T 5G3246 • J ”Customer” @13G/G;1 S !'[E,)F(7D1 =4+LV_mNvs$! • Data Driven Functional Drivendecomposition'U^$XoY • Function`1-GCF,/KxY/:<*G@F1v$oaT g$ • E,)Fwlm&%$(7D1=4+rqhf$ (+21 % • Hp"Rt'keQPopularMicroservices Architecture

Slide 25

Slide 25 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Building and Running Microservices with AWS Agenda • Microservices at Amazon.com • Microservices on AWS • Microservices for Developers!!

Slide 26

Slide 26 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Microservices on AWS Whitepaper https://docs.aws.amazon.com/aws-technical-content/latest/microservices-on-aws/microservices-on-aws.pdf

Slide 27

Slide 27 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Microservices on AWS – PDF Whitepaper https://d1.awsstatic.com/International/ja_JP/Whitepapers/MicroservicesOnAWS-V2_NT0829_SMO_MJ_EditSM_ProofSM_ProofNT.pdf

Slide 28

Slide 28 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Microservices on AWS

Slide 29

Slide 29 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Auto Scaling group Microservices on AWS

Slide 30

Slide 30 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Auto Scaling group Microservices on AWS DB instance read replica DB instance standby DB Instance

Slide 31

Slide 31 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Microservices on AWS ALB / A B C

Slide 32

Slide 32 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Microservices on AWS ALB/ #$ A B C "! & %

Slide 33

Slide 33 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Microservices on AWS Docker Container • Portability: j]T • oD1"9we_M/8'"59_MJ 3:#H >;rT 24:&.7 • Productivity: `aT • d!:-$AOkIXywenocU B • Efficiency: G^T • 6%:$p<[ifWP Lg0$*C= 9)+DZ Q\6%:$?bvNRYK • Control: EST • @ 9)+3:#Amazon ECS&$Pm 9)+,: #59lVts,:#59xuhqF,:#598:7,( Q\

Slide 34

Slide 34 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Use-case: Mapbox

Slide 35

Slide 35 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Use-case: Mapbox

Slide 36

Slide 36 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Use-case: Mapbox EC2 Fleet - Spot

Slide 37

Slide 37 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Use-case: Mapbox CPU 55% Mem 5% CPU 25% Mem 75% CPU 80% Mem 80%

Slide 38

Slide 38 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Use-case: Mapbox • EC2 25 • EC2 80-90% https://www.youtube.com/watch?v=UR8BI2Exkbc

Slide 39

Slide 39 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Spot Instances

Slide 40

Slide 40 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Use-case: Intimate Merger AWS Summit Tokyo 2017 https://www.youtube.com/watch?v=vJZJY_t8JDE https://d1.awsstatic.com/events/jp/2017/summit/slide/D3T6-4.pdf

Slide 41

Slide 41 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Use-case: Intimate Merger AWS Summit Tokyo 2017 https://d1.awsstatic.com/events/jp/2017/summit/slide/D3T6-4.pdf

Slide 42

Slide 42 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. #AWSLoft Tokyo Ask An Expert J

Slide 43

Slide 43 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon ECS Service Discovery Amazon Route 53ECSDNS https://servicediscovery.ranman.com/

Slide 44

Slide 44 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon ECS Service Discovery Amazon Route 53ECSDNS

Slide 45

Slide 45 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Serverless for Microservices “No server is easier to manage than no server”

Slide 46

Slide 46 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Serverless for Microservices “No server is easier to manage than no server”

Slide 47

Slide 47 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon DynamoDB at Nike Becoming a Nimble Giant: How DynamoDB serves Nike at Scale https://medium.com/nikeengineering/becoming-a-nimble-giant-how- dynamo-db-serves-nike-at-scale-4cc375dbb18e https://shinodogg.com/?p=7871

Slide 48

Slide 48 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Asynchronous Messaging for Microservices Amazon Simple Queue Service (SQS) : : DB … " 150! $#% &&

Slide 49

Slide 49 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Asynchronous Messaging for Microservices Amazon Simple Queue Service (SQS) ' ! $%" 12Java#%& SQS 'D@3*E AWS SDK(/<9. $'+0:68) ,7A2 FargateE '"'?;= %'!BC >4-5

Slide 50

Slide 50 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Distributed Monitoring Access Logs Access Logs Audit Trail Flow Logs Function Logs Bin logs Init logs

Slide 51

Slide 51 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Building and Running Microservices with AWS Agenda • Microservices at Amazon.com • Microservices on AWS • Microservices for Developers!!

Slide 52

Slide 52 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Monolith to Microservices " '() # & ⇒ ,$%*!*+ https://aws.amazon.com/jp/microservices/

Slide 53

Slide 53 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. RestfulWeb GraphQL https://code.fb.com/core-data/graphql-a-data-query-language/ https://shinodogg.com/?p=7823

Slide 54

Slide 54 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. RestfulWeb1*!92;@ https://code.fb.com/core-data/graphql-a-data-query-language/ We evaluated our options for delivering News Feed data to our mobile apps, including RESTful server resources and FQL tables (Facebook’s SQL-like API). We were frustrated with the differences between the data we wanted to use in our apps and the server queries they required. We don’t think of data in terms of resource URLs, secondary keys, or join tables; we think about it in terms of a graph of objects and the models we ultimately use in our apps like NSObjects or JSON. FacebookMobile,.(&+5< :> - ,.3 7='1$1)13.64?8 - .#1!URL, "0%.1Key, &1+/ -0 ,. 5<7=NSObjectJSON

Slide 55

Slide 55 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. WEB+DB PRESS vol.106 Wf3 EPDOMhL - ]i HMa * 0C80,6 URL _\'Zg)VO 'Sb[`^-?,+B5 'X Q URL)IJD""5?B 1-2>B%_Y("-?,+B5X Q(&742=9?.;B5$History API %URLU R(' +:@/C2> BGTcFN" !

Slide 56

Slide 56 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. ClientRestful AWS Summit Tokyo 2018 – Startup Architecture of the year 2018 - by AWS Startup SA

Slide 57

Slide 57 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. ClientRestful Finalist.1 Button Finalist.2 Button Finalist.n Button ... AWS Amplify Invoke subscribe Query Static contents PutItem mutation push

Slide 58

Slide 58 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS AppSync AWS Amplify [ ] #AWS - https://aws.amazon.com/jp/campaigns/manga/

Slide 59

Slide 59 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. !! "

Slide 60

Slide 60 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Microservices DevOps The human scalability of “DevOps” – Matt Klein@Lyft: Envoy https://medium.com/@mattklein123/the-human-scalability-of-devops-e36c37d3db6a Startup monolithic

Slide 61

Slide 61 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Microservices DevOps ChatWork +5C* := The breakdown • Move to microservices (%75) ) • (27%!& . • Pure DevOps • $& DevOps, • Reliability consultants • @49E38> . • Lack of education • B6@4'1 8> % 04F • Support breakdown • (2% A?; • Burnout (%100300) ) • DevOps # )7&"%-D https://qiita.com/seikoudoku2000/items/ab8da70b7237d5930f34

Slide 62

Slide 62 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Microservices DevOps The human scalability of “DevOps” – Matt Klein@Lyft: Envoy5 “newer companies might be under the illusion that advancements in cloud native automation are making the traditional operations engineer obsolete, this could not be further from the truth” cloud native automation)-&9.$"%6> ⇒(+0'2: Lyft81Unicorn Startup$" Envoy5 *,; 34 !#9.= 7

Slide 63

Slide 63 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Envoy: DevOps Lyft's Envoy: From Monolith to Service Mesh - Matt Klein, Lyft https://www.youtube.com/watch?v=RVZX4CwKhGE "$ # Envoy!

Slide 64

Slide 64 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Microservices DevOps Lyft's Envoy: From Monolith to Service Mesh - Matt Klein, Lyft - Circuit Breaking

Slide 65

Slide 65 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Envoy – CNCF project https://eng.lyft.com/envoy-joins-the-cncf-dc18baefbc22 https://www.slideshare.net/AmazonWebServices/amazon- container-services-99761515 https://www.cncf.io/

Slide 66

Slide 66 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Meetups at AWS Loft Tokyo AWS Startup Tech Meetup - ChatWork • ChatWorkEnvoy

Slide 67

Slide 67 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Meetups at AWS Loft Tokyo AWS Loft Tokyo

Slide 68

Slide 68 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Thank you!! Microservices 83