Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.

Modern-Application-Design-with-Amazon-ECS

125 visualizaciones

Publicado el

容器一直是當代雲原生架構設計裡面非常重要的一門技術,Amazon ECS 自從 2015 年發布以來一直獲得許多客戶的喜愛,然而 Amazon ECS 要如何深入使用,有哪些最佳實踐呢?這個 session 我們將會帶領大家深入探討來 Amazon ECS 與 AWS Fargate 的最新功能,以及看看 Owling (奧丁丁) 團隊如何 All-in Amazon ECS 打造產品的最佳實踐。

  • DOWNLOAD FULL BOOKS, INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Responder 
    ¿Estás seguro?    No
    Tu mensaje aparecerá aquí
  • DOWNLOAD FULL eBOOK INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... 1.DOWNLOAD FULL. PDF eBook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB eBook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. doc eBook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. PDF eBook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB eBook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. doc eBook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, CookeBOOK Crime, eeBOOK Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Responder 
    ¿Estás seguro?    No
    Tu mensaje aparecerá aquí
  • DOWNLOAD FULL eBOOK INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... 1.DOWNLOAD FULL. PDF eBook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB eBook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. doc eBook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. PDF eBook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB eBook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. doc eBook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, CookeBOOK Crime, eeBOOK Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Responder 
    ¿Estás seguro?    No
    Tu mensaje aparecerá aquí
  • Sé el primero en recomendar esto

Modern-Application-Design-with-Amazon-ECS

  1. 1. S U M M I T T a i pe i 2 0 1 9
  2. 2. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Modern Application Design with Amazon ECS Neo Chen Solutions Architect AWS Hong Kong & Taiwan A W S T P E S U M M I T 2 0 1 9
  3. 3. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Best practices for Developing Modern Application • Componentize applications using microservices • Secure the entire application lifecycle by automating security • Simplify infrastructure management with serverless technologies • Enable experimentation by creating small autonomous teams • Update applications and infrastructure quickly by automating CI/CD • Standardize operations by modeling apps and infrastructure as code • Improve application performance by increasing observability
  4. 4. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T What changes have to be made in this new world? Architectural patterns Operational model Software delivery
  5. 5. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T When the impact of change is small, release velocity can increase Monolith Does everything Microservices Does one thing
  6. 6. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Microservice development lifecycle developers services monitorreleasetestbuild delivery pipelines monitorreleasetestbuild monitorreleasetestbuild monitorreleasetestbuild monitorreleasetestbuild monitorreleasetestbuild
  7. 7. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Containers and Microservices • Do one thing, really well • Any app, any language • Isolated execution environment • Test and deploy same artifact • Faster startup Container Container Container Container
  8. 8. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS Container Services landscape MANAGEMENT Deployment, scheduling, scaling & management of containerized applications HOSTING Where the containers run IMAGE REGISTRY Container image repository
  9. 9. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  10. 10. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Request and Assign GPUs for ECS tasks GPU Pinning
  11. 11. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. GPU Pinning {"containerDefinitions": [ { "logConfiguration": {...} }, "cpu": 1024, "resourceRequirements": [ { "type": "GPU", "value": "1" } ], "image": "brentley/tensorflow-gpu:latest", "essential": true, "name": "tensorflow-gpu" } ], "memory": "6144", "family": "tensorflow-1-gpu", "cpu": "1024", "placementConstraints": []}
  12. 12. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. GPU Pinning $ aws ecs register-task-definition --cli-input-json file://gpu-8-taskdef.json $ aws ecs run-task --cluster $clustername --task-definition tensorflow-8-gpu
  13. 13. S U M M I T GPU Pinning { "tasks": [ { "taskArn": "arn:aws:ecs:us-east-1:xxxxxxxxxxxx:task/d92a5dfc-eb27-4164-9c1e-774ce76c09a3", ... "containers": [ { "containerArn": "arn:aws:ecs:us-east-1:xxxxxxxxxxxx:container/bfeb5861-044e-4630-a893-d079a73ac9eb", "taskArn": "arn:aws:ecs:us-east-1:xxxxxxxxxxxx:task/d92a5dfc-eb27-4164-9c1e-774ce76c09a3", "name": "tensorflow-gpu", "gpuIds": [ "GPU-17b47bc3-9714-d453-1a5d-1708c2f70343", "GPU-3b5a4f55-3390-563b-b753-8b1b694ab912", "GPU-5948b416-092f-29f6-ea77-f9980fc88e68", "GPU-782cf655-c047-1adf-4369-327bcdb904c4", "GPU-8e8330b6-ec47-7617-9853-c9c3ee2d364c", "GPU-8f7b6c73-f179-126e-3528-3ee0efb13357", "GPU-d162715b-e84e-d1c7-40ee-d388df900dc5", "GPU-f4f81c16-31be-d200-9521-151b5b39346d" ], "lastStatus": "PENDING", "cpu": "1024", "networkInterfaces": [] }]}]}
  14. 14. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  15. 15. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Auto manage HTTP and DNS namespaces for ECS services Service Discovery
  16. 16. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Server Side Service Discovery Pattern • Connections are proxied • Discovery is abstracted away • Availability and capacity impact • Additional latency
  17. 17. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Client Side Service Discovery Pattern • Clients connect directly to providers • Fewer components in the system • Clients must be registry aware • Client side load balancing
  18. 18. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Service Discovery
  19. 19. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Service Discovery $ ecs-cli compose --project-name ecsdemo-nodejs service up --create-log-groups --private-dns-namespace service --enable-service-discovery --cluster-config fargate-demo --vpc $vpc
  20. 20. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Service Discovery $ cat docker-compose.yml version: '3' services: ecsdemo-frontend: environment: - NODEJS_URL=http://ecsdemo-nodejs.service:3000 …
  21. 21. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  22. 22. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS CodeDeploy AWS CodeDeploy now automates blue-green deployments to AWS Fargate and Amazon Elastic Container Service (ECS) New
  23. 23. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T CodeDeploy-ECS blue-green deployments • Provisions “green” tasks, then flips traffic at the load balancer • Validation “hooks” enable testing at each stage of the deployment • Fast rollback to “blue” tasks in seconds if case of hook failure or CloudWatch alarms • Monitor deployment status and history via console, API, Amazon SNS notifications, and CloudWatch Events • Use “CodeDeploy-ECS” deploy action in CodePipeline or “aws ecs deploy” command in Jenkins
  24. 24. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  25. 25. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Life before X-Ray
  26. 26. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Visibility into downstream AWS services integration
  27. 27. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Created subsegments for data access layer to capture queries performance Troubleshooting SQL queries performance
  28. 28. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
  29. 29. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T SQL performance logs Latency (ms) Parameters SQL Command 7.0 @RecID Int 32639064 IF EXISTS (SELECT 1 FROM dbo.Schedule_Detail sd LEFT JOIN dbo.Schedule s on s.Schedule_RecID = sd.Schedule_RecID . . . 34.8 IF EXISTS (SELECT sr.SR_Location_RecID FROM DBO.SR_LOCATION as sr WHERE sr.SR_Location_RecID =24) SELECT . . . 1.0 @recid Int 65 SELECT Owner_Level_RecID FROM dbo.User_Defined_Field_Owner_Level WHERE User_Defined_Field_RecID = @recid 18.6 @serviceRecId Int 11111899 SELECT Company_RecID FROM dbo.SR_Service WHERE SR_Service_RecID = @serviceRecId 123.7 @problemFlag Int 1 . . . exec dbo.usp_getSRDetailTable @problemFlag, @resolutionFlag, @internalAnalysisFlag, @serviceRecID, @includeChild 1201.8 @problemFlag Int 1 . . . exec dbo.usp_getSRDetailTable @problemFlag, @resolutionFlag, @internalAnalysisFlag, @serviceRecID, @includeChild batch-get-traces --trace-ids <trace-ids> <value> <value> Pass trace-ids for SQL calls
  30. 30. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T X-Ray advantages • Provides architects with a live architecture diagram • Pinpoints the bottlenecks • Helps optimize performance • Helps optimize SQL queries • Enables data-driven architecture decisions
  31. 31. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Modern Application Design with Amazon ECS Julian Liu Architect Owlting Inc. A W S T P E S U M M I T 2 0 1 9
  32. 32. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T About Owlting OBS OwlNest OwlTing Market Local Experiences * OwlJourney
  33. 33. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Owlting on ECS Simple, yet powerful You don’t pay for the control plane Seamlessly integration • Amazon CloudWatch • AWS Identity and Access Management (IAM) • Amazon Virtual Private Cloud (Amazon VPC)
  34. 34. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T CI/CD with ECS CodePipeline CodeBuild for global deployment AWS CodeBuild • Trustable • Flexible for all kinds of work loads AWS CodePipeline • Deploy directly to ECS • Blue Green deployment • Cross region deployment
  35. 35. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T CloudWatch event with ECS for scheduled jobs at scale ECS Lambda Crontab on instances Reliability ◎ ◎ △ Scalability ◎ ◎ △ Performance ◎ ○ ◎ Cost ◎ △ ◎
  36. 36. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Data Persistency with ECS by Amazon EFS EFS is a perfect fit for storage sharing • Configurations files • Static assets, like jpg, css, js, etc… VPC ECS Cluster Instance Instance Availability Zone 1 Availability Zone 2 Amazon Elastic File System File system File system
  37. 37. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
  38. 38. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Build Your Own L7 Router on top of ECS HAProxy Openresty • lua-resty-dns-client backend owltingweb server-template owltingweb- 2 _http._tcp.owlting-web.local check resolvers dns access_by_lua ' local dns_client = require "resty.dns.client" local toip = dns_client.toip local ip, port = toip("_http._tcp.owlting-web.local ", 61001 ) ';
  39. 39. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Looking forward Choose what suits you best • Fargate / ECS / EKS AWS App Mesh WE ARE HIRING!
  40. 40. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  41. 41. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
  42. 42. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  43. 43. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Bringing cloud-native capabilities to your applications Assess and prioritize, one app at a time Re-host (lift-and-shift) data center à EC2 Re-platform (lift-tinker-shift) VMs à containers Re-factor monolith à microservices Re-invent (cloud-native) new serverless microservices Determine modernization path
  44. 44. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  45. 45. Thank you! S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Julian Liu julian@owlting.com Neo Chen neochen@amazon.com

×