본문 바로가기
IT 둘러보기

클라우드를 통한 현대적 애플리케이션 디자인 및 구축 패턴

by 날고싶은커피향 2023. 3. 16.

[애플리케이션 현대화 및 개발] 클라우드를 통한 현대적 애플리케이션 디자인 및 구축 패턴 - 윤석찬, AWS 수석 테크 에반젤리스트

  1. 1. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS 클라우드를 통한 현대적 애플리케이션 디자인 및 구축 패턴 The Design and Patterns of Modern Applications on AWS 윤석찬, AWS 수석 테크 에반젤리스트 @channyun
  2. 2. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Go to Webinar “Questions” 창에 자신이 질문한 내역이 표시됩니다. 기본적으로 모든 질문은 공개로 답변 됩니다만 본인만 답변을 받고 싶으면 (비공개)라고 하고 질문해 주시면 됩니다. 본 컨텐츠는 고객의 편의를 위해 AWS 서비스 설명을 위해 온라인 세미나용으로 별도로 제작, 제공된 것입니다. 만약 AWS 사이트와 컨텐츠 상에서 차이나 불일치가 있을 경우, AWS 사이트(aws.amazon.com)가 우선합니다. 또한 AWS 사이트 상에서 한글 번역문과 영어 원문에 차이나 불일치가 있을 경우(번역의 지체로 인한 경우 등 포함), 영어 원문이 우선합니다. AWS는 본 컨텐츠에 포함되거나 컨텐츠를 통하여 고객에게 제공된 일체의 정보, 콘텐츠, 자료, 제품(소프트웨어 포함) 또는 서비스를 이용함으로 인하여 발생하는 여하한 종류의 손해에 대하여 어떠한 책임도 지지 아니하며, 이는 직접 손해, 간접 손해, 부수적 손해, 징벌적 손해 및 결과적 손해를 포함하되 이에 한정되지 아니합니다. 고지 사항(Disclaimer) 강연 중 질문하는 방법…
  3. 3. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. ”현대적” 비지니스 환경의 변화 IT 기술의 가속화 90% 15% Source: McKinsey 79% Source: Gartner
  4. 4. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. FeedbackIdeas Experiment Innovation Flywheel 빠른 혁신을 위해서는 많은 실험이 필요하다! Invention requires two things: the ability to try lots of experiments, and not having to live with the collateral damage of failed experiments. Andy Jassy CEO, Amazon Web Services “
  5. 5. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Modern Application Design장애 복원력 높은 확장성 및 가용성 높은 보안성 배포 자동화 서비스 모듈화 상호 운용성 Cloud Native 현대적 앱 디자인 = 높은 완성도 && 낮은 구축 비용
  6. 6. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. 앱 현대화 진화 과정 ­ 아마존닷컴의 사례 Monolithic + single teams 2001 Service-Oriented + 2 pizza teams 2002 2014 Microservices + 1000s x 2 pizza teams >60 Million deployments per year
  7. 7. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. 마이크로 서비스 아키텍처 서버리스 기반 운영 모델 데브옵스 자동화 배포 방식 앱 현대화를 위한 가지 디자인 패턴3
  8. 8. 1. 마이크로 서비스 아키텍처 어떻게 비지니스 로직에 집중하는 효율적인 아키텍처와 조직을 구성할 수 있나요?
  9. 9. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. 마이크로서비스 아키텍처란? 하나의 빌드 패키지 각 서비스별 빌드 패키지
  10. 10. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. 다른 서비스의 내부 구조를 알지 못해도, 내 서비스 코드를 업데이트 할 수 있다. 서비스들이 네트워크를 통해 서로 API로 통신한다. 서비스는 독자적으로 업데이트하며, 서로 영향을 주지 않는다. “service-oriented architecture composed of loosely coupled elements that have bounded contexts” Adrian Cockcroft (VP of Cloud Architecture @ AWS, former Cloud Architect at Netflix) 마이크로서비스 아키텍처란?
  11. 11. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Mobile client Client IoT API Gateway 사용자 DB 배송 DB 재고 DB 상품 전시 서비스 계정 서비스 주문 서비스 재고 서비스 쇼핑몰 사이트 아키텍처 예제 장바구니 DB 장바구니 서비스
  12. 12. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. MICROSERVICE API API MICROSERVICE MICROSERVICE EVENT API MICROSERVICE EVENT API MICROSERVICE APPLICATION Mobile client Client IoT PERSISTENCE PERSISTENCE 독립적 API 서비스 및 데이터 스토어(Datastore) CODE SDK DATASTORES
  13. 13. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon DynamoDB Amazon ElastiCache for Redis & Memcached 키-값 인-메모리 Amazon Neptune 그래프관계형 DB 시계열 Amazon RDS Amazon Aurora Amazon DocumentDB 문서 with MongoDB compatibility Amazon Timestream 원장 Amazon QLDB for MySQL & PostgreSQL for MySQL, PostgreSQL, MariaDB, Oracle, SQL Server Key lookup 빠은 응답시간, 빠른 처리량 쉽고 빠르게 데이터 관계 생성 및 탐색 참조 무결성, ACID 트랜잭션, Schema- on-Write 각종 문서 저장 인덱싱 시간에 따른 순차 데이터 수집, 저장 및 처리 1/1000 초 미만의 응답시간. 메모리 스토어 모든 변경에 대한 완전, 불변, 검증 가능한 기록 실시간 입찰 장바구니 OLTP 소셜 네트워킹 추천 서비스 웹 서비스, 상품 카달로그, ERP, CRM 콘텐츠 관리, 개인에 맞춰 편집된 환경 관리 사물 인터넷, 시계열 로그 분석 리더 보드, 실시간 분석, 캐싱 헬스케어, 금융 정보, 공급망 관리, 판매 이력 요구 사항 별 데이터 스토어(Datastore) 활용 요 구 사 항 특 징
  14. 14. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. MICROSERVICE API API MICROSERVICE MICROSERVICE EVENT API MICROSERVICE EVENT API MICROSERVICE APPLICATION Mobile client Client IoT PERSISTENCE PERSISTENCE 이벤트 기반(Events-driven) 구조 Observable Events
  15. 15. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. 서비스 간 통합 및 오케스트레이션 Queues Pub/sub Workflow Amazon API Gateway Amazon SQS Amazon SNS AWS Step Functions Connect Client-to-Service Service-to-Service Orchestration
  16. 16. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. 서비스 간 통합 및 오케스트레이션 1. Request / Response Lambda function SQS Queue SNS Topic Service B Service C Service D Service A 2. Publish / Subscribe request response Simpler integration, less code Start Submit Job Wait X Seconds Get Job Status Job Complete? Set Job Failed Set Job Succeeded Sent Message to SNS End 3. Workflow Orchestration
  17. 17. 2. 서버리스 기반 운영 모델 어떻게 마이크로서비스 기반 애플리케이션을 효율적으로 운영할 수 있을까요?
  18. 18. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. 앱추상화수준 비지니스 로직 집중도 SERVERLESS 물리 서버 가상 서버 컨테이너 AWS Lambda AWS Fargate • 확장성 가용성 제공 • 장애 복원력 • 실행 시간만 과금 • 관리/운영 불필요 • 비지니스 로직만 집중 IT 운영 모델 패러다임의 진화
  19. 19. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Compute Linux EC2 Elastic Beanstalk AWS LambdaFargate Databases MySQL MySQL on EC2 RDS MySQL Aurora Aurora Serverless DynamoDB Storage HDD S3 Messaging ESBs Amazon MQ Kinesis SQS / SNS Analytics Hadoop Hadoop on EC2 EMR Athena EBS Volumes FSx File Server Elastic File Systems RabbitMQ on EC2 Elastic Container Service Redshift Glue Amazon SageMakerTensorflow on P3 Personalize Forecast Machine Learning Tensorflow on GPU On-Premises Less Cloud ServerlessManaged 클라우드 기반의 IT 운영 모델 선택 옵션
  20. 20. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Clients HTTP REST Elastic Load Balancing Amazon ECS Amazon API Gateway AWS Lambda Auto Scaling 가상서버 컨테이너 서버리스 EC2 Instances ECS Pods Lambda Functions 클라우드 기반 마이크로서비스 아키텍처 패턴
  21. 21. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. 서버 운영 및 배포 불필요 비지니스 로직에 집중 DEVELOPER 불필요한 부담을 경감 서버리스 서비스 환경 AWS Messaging & Orchestration Compute Physical Infrastructure API Business logic Storage & Databases 서버리스(Serverless)의 장점 서버 관리 불필요 트래픽 따라 자동 확장 실행 비용 만큼만 지불 고 가용성 및 보안
  22. 22. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS Lambda AWS Fargate Amazon API Gateway Amazon SNS Amazon SQS AWS Step Functions COMPUTE DATA STORES INTEGRATION Amazon Aurora Serverless Amazon S3 Amazon DynamoDB AWS AppSync AWS AppMesh Amazon QLDB 컴퓨팅 함수 컨테이너 스토리지 관계형 DB 키-밸류 DB 원장 DB 서버리스 애플리케이션을 위한 서비스 스택 API 엔드포인트 서비스간 큐 서비스간 노티 서비스간 워크플로 데이터API 서비스 메쉬
  23. 23. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. 서버리스 기반 마이크로 서비스 구축 방식 Amazon Cognito 웹 사이트 Amazon Simple Storage Service (S3)Amazon API Gateway API 서비스 AWS Lambda (Serverless Function) Any AWS Service 모바일 애플리케이션 AWS Fargate (Serverless Container)
  24. 24. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Aurora Amazon DynamoDB Amazon Pinpoint Amazon CloudFront 모바일 애플리케이션 웹 사이트 Amazon Simple Storage Service (S3) 서버리스 기반 마이크로 서비스 구축 방식 Amazon Cognito AWS AppSync AWS Lambda AWS Amplify
  25. 25. 3. 데브옵스 자동화 배포 방식 어떻게 마이크로서비스 애플리케이션을 빠르고 효율적으로 배포할 수 있나요?
  26. 26. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. 기존 모놀리식(Monolith) 개발 사이클 developers delivery pipelines services monitorreleasetestbuild
  27. 27. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. 마이크로서비스 개발 사이클 developers services monitorreleasetestbuild delivery pipelines monitorreleasetestbuild monitorreleasetestbuild monitorreleasetestbuild monitorreleasetestbuild monitorreleasetestbuild
  28. 28. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. DevOps Best practices 소프트웨어 배포 완전 자동화 표준화된 셀프-서비스 도구 인프라 표준화 및 템플릿 Infrastructure as code
  29. 29. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. 지속적 통합(CI) 및 배포(CD) 도구 활용 AWS CodeBuild + Third Party AWS CodeCommit AWS CodeBuild AWS CodeDeploy AWS X-Ray Source Build Test Deploy Monitor AWS CodePipeline 소스 코드 저장소 부터 패키지 빌드, 테스트, 배포 및 모니터링까지 전 과정에 대해 AWS 기반 서버리스 CI/CD 도구 제공
  30. 30. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Infra as Code(IaC) 기반 자동화 Developer AWS CodeCommit AWS CodeBuild AWS CloudFormation Amazon SNS Amazon S3 bucket stack stack stack pre-create create stacks post-create deploy AWS CodePipeline region region cfn-nag
  31. 31. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS Cloud Development Kit (CDK) CDK Application CloudFormation Template Stack(s) Construct Resources AWS CloudFormationAWS Lambda Amazon S3 bucket from aws_cdk import ( aws_lambda as _lambda, aws_s3 as _s3, aws_s3_notifications, core ) # create lambda function function = _lambda.Function(self, "lambda_function", runtime= _lambda.Runtime.PYTHON_3_7, handler= "lambda-handler.main", code=_lambda.Code.asset("./lambda")) # create s3 bucket s3 = _s3.Bucket(self, "s3bucket") # create s3 notification for lambda function notification = aws_s3_notifications.LambdaDestination(function) # assign notification for the s3 event type s3.add_event_notification(_s3.EventType.OBJECT_CREATED, notification) Amazon S3에 Lambda 함수 트리거 추가 설정
  32. 32. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS X-Ray를 통한 마이크로서비스 간 모니터링 분산 서비스간 시각적 추적 Slow Query 분석 서비스간 내부 속성별 반응 속도 추적
  33. 33. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. 마이크로 서비스 아키텍처 서버리스 기반 운영 모델 데브옵스 자동화 배포 방식 앱 현대화를 위한 가지 디자인 패턴3 API 및 이벤트 기반 서비스 구조화 다양한 데이터스토어 활용 비지니스 로직에만 집중 가능 클라우드 네이티브 서비스 활용 지속적 통합(CI) 및 배포(CD) 도구 활용 코드 기반 배포 및 모니터링 자동화
  34. 34. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. PUBG 서비스 3백만 동시 접속 및 10배 트래픽 수용 마이크로서비스 및 서버리스 기반 앱 현대화 사례 음식 성분 분석 기존 36시간 처리 시간을 10초로 단축 IoT 플랫폼 개발 구축 및 관리 비용 80% 절감 미국 증시 매매 검증 시스템 구축 3개월 만에 완료 뉴스 사이트 매 시간당 50회 이상 서비스 배포
  35. 35. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. 실험 팀을 꾸리세요 고객을 직접 소통 가능한 자율적인 실행 팀 구성 실험 프로젝트를 시작하세요 빠른 속도의 개발을 위한 클라우드 기반 셀프 서비스 도입 빠르게 서비스를 배포하세요 고객의 피드백에 따라 빠르게 기능 개발 및 재배포 진행 업무를 분리하세요 마이크로서비스로 분리 가능한 독립적 기능 정의 1 2 3 4 어디서부터 시작할까요?
  36. 36. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. 공인 교육 Developing on AWS 과정은 AWS SDK를 사용하여 안전하고 확장 가능한 클라우드 애플리케이션을 개발하는 방법을 배웁니다. 또한 코드를 사용하여 AWS와 상호작용하는 방법을 살펴보고, 주요 개념, 모범 사례 및 문제 해결 팁을 설명합니다. 공인 자격증 AWS Certified Developer ­ Associate 1년 이상의 실무 경험이 있는 개발자 대상 본 자격증은 AWS 주요 서비스의 사용 방법과 기본적인 AWS 아키텍처 모범 사례, AWS 클라우드 기반 애플리케이션을 능숙하게 개발, 배포 및 디버깅할 수 있습니다. AWS Certified DevOps Engineer ­ Professional 2년 이상의 실무 경험이 있는 DevOps 엔지니어 대상 본 자격증은 AWS 환경을 프로비저닝하고 운영 및 관리하는 방법, 높은 가용성, 뛰어난 확장성 및 복원성 높은 시스템을 구현하고, 운영 프로세스를 자동화할 수 있는 도구를 설계 관리 및 유지할 수 있습니다. https://www.aws.training/ 에서 더 많은 정보를 확인해보세요! 현대적 앱 개발을 위한 교육 자료
  37. 37. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. aws-korea-marketing@amazon.com twitter.com/AWSKorea facebook.com/amazonwebservices.ko youtube.com/user/AWSKorea slideshare.net/awskorea twitch.tv/aws 애플리케이션 현대화 및 개발 특집 온라인세미나에 참석해주셔서 대단히 감사합니다. 저희가 준비한 내용, 어떻게 보셨나요? 더 나은 세미나를 위하여 설문을 꼭 작성해 주시기 바랍니다.
반응형