Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

利用微服務加速創新的步伐

296 views

Published on

Expedite the Pace of Innovation with Microservices

利用微服務加速創新的步伐

Level: 200, 中文演講

講師: Louis Wang, Cloud Support Engineer, AWS & Shang-Wei Lin, Software Development Manager, MobiX Corp.

創業家兄弟透過推陳出新品牌來因應快速的市場變化,並且在2016年創立了另一個B2B2C的平台-松果購物來滿足更多面向消費者的需求。本場次將會說明創業家兄弟及松果購物如何使用AWS ECS 打造一個彈性又易於操作的底層平台來呼應不斷變動的市場。

聯繫銷售: https://aws.amazon.com/tw/contact-us/

與銷售線上聊天: https://pages.awscloud.com/tw-hkt-sales-chat.html

  • Be the first to comment

利用微服務加速創新的步伐

  1. 1. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Expedite the Pace of Innovation with Microservices Louis Wang, Cloud Support Engineer, Amazon Web Services Shang-Wei Lin, Software Development Manager, MobiX Corp
  2. 2. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Agenda Part A: Louis Wang- Cloud Support Engineer, AWS • Microservices and containers • AWS containers services • AWS Services with ECS Part B: Shang Wei Lin - Software Development Manager, MobiX Corp. • Company introduction • The challenge they were facing • Why AWS ECS • Summary
  3. 3. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  4. 4. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. When the impact of change is small, release velocity can increase Monolith Does everything Microservices Does one thing
  5. 5. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Monolith development lifecycle MonitorReleaseTestBuild Developers Delivery Pipelines Services
  6. 6. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. 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. Containers and Docker A container is a standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably from one computing environment to another.1 1 https://www.docker.com/resources/what-container Server Operating System Docker Engine AppA AppB AppC AppD
  8. 8. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. 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 Instance
  9. 9. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Containers have become the standard for how to ship and run your application in the cloud.
  10. 10. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Manually downloading and launching containers by hand is inefficient and error prone.
  11. 11. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. You need container orchestration to help you for expanding your service.
  12. 12. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  13. 13. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS Container Services Landscape MANAGEMENT Deployment, scheduling, scaling & management of containerized applications IMAGE REGISTRY Container image repository HOSTING Where the containers run
  14. 14. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Elastic Container Service Highly Scalable , Highly Performant Container Management System A managed platform EC S Cluster Management Container Orchestration & Placement Deep AWS Integration
  15. 15. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Scheduling and Orchestration Cluster Manager Placement Engine ECS AMI Docker Agent ECS Agent ECS AMI Docker Agent ECS Agent ECS AMI Docker Agent ECS Agent
  16. 16. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon ECS Constructs Define application containers: • Container image URL • CPU & memory requirements • Networking type • etc. register Task Definition run Task • A running instantiation of a task definition • Use EC2/FARGATE launch type create Service • Maintain n running copies • Integrated with ELB • Unhealthy tasks automatically replaced Elastic Load Balancer create Cluster • Infrastructure isolation boundary • IAM permissions boundary
  17. 17. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon ECS Task Placement Cluster Constraints Custom Constraints Placement Strategies Apply Filter • Identify the instances that satisfy the CPU, memory, and port requirements. • Identify the instances that satisfy the task placement constraints. • Identify the instances that satisfy the task placement strategies. • Select the instances for task placement.
  18. 18. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon ECS Service Discovery • Integration with Elastic Load Balancing • Service Discovery with AWS CloudMap Route 53 private zone Request Register Register Register DNS Query ECS Task ECS Task ECS Task Elastic Load Balancing Container Instance
  19. 19. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon ECS Scaling • Container Instance - EC2 AutoScaling • ECS Tasks - Service AutoScaling • Consider to use AWS Fargate Elastic Load Balancing Container InstanceContainer InstanceContainer Instance
  20. 20. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. “Just launch 10 copies of my container without managing container instance. Fargate lets you focus on designing and building your applications instead of managing the infrastructure that runs them.” x10
  21. 21. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. EC2 and Fargate launch type co-exist Web Notifications Availability Zone 1 Availability Zone 2 Availability Zone 3 Task Task Task Task ECS Cluster Task Task Task Task Task Task Task Task Task Task Task Task Task Task Task Task Task Task Task Task Shopping Cart Task EC2 EC2 EC2 EC2 EC2 EC2
  22. 22. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  23. 23. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS Developer Tools AWS Developer Tools AWS CodePipelineAWS CodeBuildAWS CodeCommit AWS CodeDeploy AWS CodeStar AWS X-Ray AWS Command Line InterfaceAWS Tools and SDKsAWS Cloud9 The AWS Developer Tools is a set of services designed to enable developers and IT operations professionals practicing DevOps to rapidly and safely deliver software.
  24. 24. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS Code Services End-to-end software release workflow using AWS Code services ProductionTestBuildSource AWS CodeBuildAWS CodeCommit AWS CodeDeploy AWS CodePipeline
  25. 25. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS ECS with Code Services Use AWS CodeDeploy to implement blue/green deployments for Amazon ECS and AWS Fargate. Tasks AWS Cloud Tasks Tasks
  26. 26. Thank you! © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  27. 27. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 基於 AWS 之上建構 因應快速變動的基礎設施 Shang-Wei Lin Software Development Manager MobiX Corp
  28. 28. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Agenda • 公司介紹 • 開發文化 • 成長階段中每個架構挑戰 • Why ECS • 結論&未來展望
  29. 29. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 好衣網 名片網 Photo 123 好菜網 好魚網 3C 市集 好吃 市集 生活 市集 2012年 3,000萬 2017年 37億/上櫃 • 創立於2012年,輕資產電商,專注於電商平台經營 • 快速因應市場趨勢與需求,不斷推陳出新不同品牌 • 2012年~2017年,營收成長100倍。於2017年上櫃 松果 購物
  30. 30. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T • 創立於2016年,B2B2C 電商平台 • 站台商品數高達10萬種以上 • 2018 年松果購物 App 下載數突破 135 萬、年增 100% 以上 • 2019年公開發行,預計2020年上櫃 創立 2016年 2019年6月 公開 發行
  31. 31. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T • 不斷增減且規模不一的網站 • 交易額增長迅速 • 行銷資源快速變動流量變化大 快速成長 多種品牌 IT & RD 部門的挑戰
  32. 32. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 開發文化 • 於 2012 開始就基於 AWS 的全雲端架構 • 聚焦核心業務的開發團隊 • 快速迭代的針對關鍵問題小幅調整架構測試
  33. 33. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 2013年 : 架構階段 1 佈署方式 營運現狀 Challenge
  34. 34. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 2014年 : 架構階段 2 佈署方式 營運現狀 Challenge
  35. 35. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 2015年 : 架構階段 3 佈署方式 營運現狀 Challenge
  36. 36. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 2016年 : 架構階段 4 佈署方式 營運現狀 Challenge
  37. 37. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 關鍵問題 流量 X 擴展 = 複雜
  38. 38. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 關鍵問題 • 伺服器維運與頻繁調整 • 數個異質性網站維運 • 漸進式微服務化
  39. 39. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 關鍵問題 • 因應彈性的行銷策略,流量變化幅度大 • 規模化後的微服務化 o search、redirect、tracking、 image processing ... • 營收驅動需求增加造成架構逐漸複雜化
  40. 40. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 解決方案 伺服器配置文件化 快速上手的 docker production 環境
  41. 41. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 解決方案 container orchestration Scheduling and Orchestration Cluster Manager Placement Engine Running Containers At Scale Availability Zone #1 Availability Zone #2 Availability Zone #3
  42. 42. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 解決方案 ECS 架構
  43. 43. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 解決方案 ECS 核心概念 Task Definition service task docker image
  44. 44. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 2018年~現在 : 最新架構圖 所有服務都可以透過 ECS Deploy 與 auto scaling 成功在極低的負擔下導入 auto scaling 的架構
  45. 45. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T • Amazon ECS Task Placement Strategies ECS 實戰坑坑 Service A Service B Service C ECS cluster Service A Service A
  46. 46. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T • Amazon ECS Task Placement Strategies 統一 cluaster service 的資源大小,平均叢集資源 ECS 實戰坑坑 Service A Service B Service C ECS cluster Service A Service A Service B
  47. 47. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 解決方案 - 總結 • 伺服器維運困難 o Docker 化、ECS 自動資源配置 • 人工擴展 o 架構重整  Secret Manager  CloudWatch o ECS 自動配置 container 數量 • 部署流程複雜 o CI/CD 化
  48. 48. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 結論 簡單 彈性 成本 擴展
  49. 49. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 未來 ● Auto Scaling Group Predictive Scaling for EC2 ● Auto Scaling Group with Multiple Instance Types ● ECS Fargate ● 持續推出的新功能
  50. 50. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 未來 全端、前端、後端
  51. 51. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Thank you! S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

×