Building and Running Microservices with AWS

Building and Running Microservices with AWS

Public speaking slides (in Japanese) for #AWSDevDay Tokyo 2018 - "Building and Running Microservices with AWS".

The agenda is the following:
1. Microservices at Amazon.com
2. Microservices on AWS
3. Microservices for Developers!!

Cc8a208e174943d1da814783841abd50?s=128

Eiji Shinohara

November 02, 2018
Tweet

Transcript

  1. © 2018, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. Building and Running Microservices with AWS Eiji Shinohara @shinodogg | Nov 2nd, 2018
  2. © 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!!
  3. © 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/ *)
  4. © 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
  5. © 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
  6. © 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
  7. © 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
  8. © 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/
  9. © 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
  10. © 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!!
  11. © 2018, Amazon Web Services, Inc. or its Affiliates. All

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

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

    rights reserved. Amazon.com - warehouse   Inbound • ! %  • % • %" • "%&' • … Outbound •    • #$ • #  • &' • …        
  14. © 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
  15. © 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
  16. © 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
  17. © 2018, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved.  Microservices 
  18. © 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 …
  19. © 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
  20. © 2018, Amazon Web Services, Inc. or its Affiliates. All

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

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

    rights reserved. Two Pizza Development Teams   2-pizza team (4~8)  Web      
  23. © 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
  24. © 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 Drivendecomposition T 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
  25. © 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!!
  26. © 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
  27. © 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
  28. © 2018, Amazon Web Services, Inc. or its Affiliates. All

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

    rights reserved. Auto Scaling group Microservices on AWS  
  30. © 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
  31. © 2018, Amazon Web Services, Inc. or its Affiliates. All

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

    rights reserved. Microservices on AWS ALB/  #$ A B C   "! & %   
  33. © 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!:-$AOkIXy wenocU 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\
  34. © 2018, Amazon Web Services, Inc. or its Affiliates. All

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

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

    rights reserved. Use-case: Mapbox            EC2 Fleet - Spot   
  37. © 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%
  38. © 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
  39. © 2018, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. Spot Instances     
  40. © 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
  41. © 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
  42. © 2018, Amazon Web Services, Inc. or its Affiliates. All

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

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

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

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

    rights reserved. Serverless for Microservices “No server is easier to manage than no server”
  47. © 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
  48. © 2018, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. Asynchronous Messaging for Microservices Amazon Simple Queue Service (SQS)  :          : DB   … " 150! $#%    &&
  49. © 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)  ,7A 2 Fargate E '"'?;= %'!BC >4-5 
  50. © 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
  51. © 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!!
  52. © 2018, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. Monolith to Microservices " '() # & ⇒ ,$%*!* +   https://aws.amazon.com/jp/microservices/
  53. © 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
  54. © 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
  55. © 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" !<C3Ae dXQ)URLK# % https://gihyo.jp/magazine/wdpress
  56. © 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 
  57. © 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
  58. © 2018, Amazon Web Services, Inc. or its Affiliates. All

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

    rights reserved.  !! "      
  60. © 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   
  61. © 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
  62. © 2018, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. Microservices  DevOps The human scalability of “DevOps” – Matt Klein@Lyft: Envoy</5 “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$" Envoy</5  *,; 34  !#9.= 7 
  63. © 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!
  64. © 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    
  65. © 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/
  66. © 2018, Amazon Web Services, Inc. or its Affiliates. All

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

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

    rights reserved. Thank you!! Microservices  83