Contenu connexe Plus de Amazon Web Services Japan (20) 202107 AWS Black Belt Online Seminar CON350 コンテナとサーバレスの使い分け1. © 2021, Amazon Web Services, Inc. or its Affiliates.
AWS 公式 Webinar
https://amzn.to/JPWebinar
過去資料
https://amzn.to/JPArchive
コンテナとサーバレスの使い分け
AWS Black Belt Online Seminar
AWS Container Specialist
Principal Solution Architect
荒⽊靖宏
2021-July
2. © 2021, Amazon Web Services, Inc. or its Affiliates.
このセッションで扱うこと
• コンテナとサーバレスの特徴およびシステム構成
• ⼀般的なWebアプリにおける作り⽅⽐較
• コンテナとサーバレスどちらを使うかのディシジョンツリー
2
3. © 2021, Amazon Web Services, Inc. or its Affiliates.
サーバーレスの特徴
サーバ管理が不要 柔軟なスケーリング
アイドル時のリソース確保が不要 組み込まれた⾼可⽤性
4. © 2021, Amazon Web Services, Inc. or its Affiliates.
抽象化のレベル
ビジネスロジックへの注力
Serverless
物理マシン
仮想マシン
コンテナ
AWS
Lambda
AWS
Fargate
• 自動スケール
• 耐障害
• メンテナンス不要
• ビジネスへの注力
Source: Cloud Native Application Security Report | Snyk
5. © 2021, Amazon Web Services, Inc. or its Affiliates.
サーバ・バックエンド
Hardware
Virtualize
OS
Container
Runtime
Middleware
Code
Serverless
プラットフォーム
コンテナ
プラットフォーム
6. © 2021, Amazon Web Services, Inc. or its Affiliates.
サービス構成のためのビルディングブロック(⼀部)
Network
Elastic Load Balancing
Amazon API
Gateway
API Proxy
AWS AppSync
Amazon S3
Storage
Amazon SNS
Amazon SQS
Messaging and Queues
Amazon
Kinesis
Streaming
Authentication, WAF
Amazon Cognito
AWS WAF
Monitoring and Debugging
AWS X-Ray
Amazon CloudWatch
Amazon DynamoDB
Database
Amazon RDS
Amazon Aurora
Amazon EFS
7. © 2021, Amazon Web Services, Inc. or its Affiliates.
⼀般的な3-tier WEB アプリケーション
プレゼンテーション層 アプリケーション層 永続層
ウェブ
サーバー
アプリケーション
サーバー
データベース
サーバー
Apache、
NGINX等
Tomcat、
Weblogic等
Oracle、
MySQL等
8. © 2021, Amazon Web Services, Inc. or its Affiliates.
EC2(仮想サーバー)での構成例
Auto
Scaling
group
Amazon Simple
Storage Service (S3)
Amazon
CloudFront
Elastic Load
Balancing
(ELB)
Amazon RDS
AWS Cloud
Browser/
mobile
EC2 instances
Auto
Scaling
group
EC2 instances
WEB AP DB
Static Contents
CDN LB LB
Elastic Load
Balancing
(ELB)
9. © 2021, Amazon Web Services, Inc. or its Affiliates.
コンテナでの構成例
Amazon
CloudFront
Elastic Load
Balancing
(ELB)
Amazon RDS
Browser/
mobile
WEB AP DB
Static Contents
CDN LB LB
Elastic Load
Balancing
(ELB)
ECS + Fargate ECS + Fargate
AWS Cloud
Amazon Simple
Storage Service (S3)
10. © 2021, Amazon Web Services, Inc. or its Affiliates.
サーバーレスでの構成例
Amazon API Gateway
Amazon
CloudFront AWS Lambda
Browser/
mobile
Static Contents
CDN
Amazon
DynamoDB
AWS Cloud
Amazon Simple
Storage Service (S3)
WEB AP DB
11. © 2021, Amazon Web Services, Inc. or its Affiliates.
デシジョンツリー
アプリケーション
またはプラット
フォームのランタ
イム管理を望んで
いますか?
短い実行タスク
(15分未満)ま
たは非同期処理
必須
10 GB 以下のメモ
リ
特殊なハードウェ
アは不要 (ARM、
GPUなど不要)
Lambdaバースト
制限内?
アプリ
プラット
フォーム
いいえ いいえ いいえ いいえ は
い
はい はい はい はい
い
い
え
ステートレス処理
Lambda
コンテナ
12. © 2021, Amazon Web Services, Inc. or its Affiliates.
このセッションで扱ったこと
• コンテナとサーバレスの特徴およびシステム構成
→AWSが管理運⽤する範囲が違う
• ⼀般的なWebアプリにおける作り⽅⽐較
→同じような構成もできるが制約もある
• コンテナとサーバレスどちらを使うかのディシジョンツリー
→適⽤条件を確認しましょう
12