More Related Content
Similar to 成長していくサービスとAWS
Similar to 成長していくサービスとAWS (20)
成長していくサービスとAWS
- 1. ©2016, Amazon Web Services, Inc. or its affiliates. All rights reserved.
成長していくサービスとAWS
アマゾンウェブサービスジャパン株式会社
半場光晴
- 2. ©2016, Amazon Web Services, Inc. or its affiliates. All rights reserved.
目次
• このセッションの対象
• サービス成長とスケーラビリティ
• サービス成長の指標
• サービス規模別の構成例
• まとめ
- 3. ©2016, Amazon Web Services, Inc. or its affiliates. All rights reserved.
このセッションの対象
• AWSやクラウド初心者の方
• Webサービスを運営されている方
• サービスを急成長させなければならない方
• サービスを継続的にスケールさせたい方
• 現状サービス規模にあった適切なスケールを模
索している方
- 4. ©2016, Amazon Web Services, Inc. or its affiliates. All rights reserved.
目次
• このセッションの対象
• サービス成長とスケーラビリティ
• サービス成長の指標
• サービス規模別の構成例
• まとめ
- 5. ©2016, Amazon Web Services, Inc. or its affiliates. All rights reserved.
サービス成長とスケーラビリティ
• サービス規模によって適切な構成は変化してい
く
– 変化に対応できるスケーラブルな構成を保とう
• AWSを活用してスケーラビリティを保持しよう
– 言わずもがな、サービスありき
– オートスケーリング?についてはのちほど
- 6. ©2016, Amazon Web Services, Inc. or its affiliates. All rights reserved.
目次
• このセッションの対象
• サービス成長とスケーラビリティ
• サービス成長の指標
• サービス規模別の構成例
• まとめ
- 7. ©2016, Amazon Web Services, Inc. or its affiliates. All rights reserved.
サービス成長の指標
• ユーザー
• トラフィック
• パートナー
• データ
• 売上
など
- 8. ©2016, Amazon Web Services, Inc. or its affiliates. All rights reserved.
目次
• このセッションの対象
• サービス成長とスケーラビリティ
• サービス成長の指標
• サービス規模別の構成例
• まとめ
- 9. ©2016, Amazon Web Services, Inc. or its affiliates. All rights reserved.
サービス規模別の構成例
ユーザー数 = 1
- 10. ©2016, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ユーザー数 = 1
• 固定IP
• ひとつのインスタン
スにLAMPオールイン
• 仮に、この構成のま
まスケールしようと
すると、
Amazon
EC2
instance
Elastic IP
User
Amazon
Route 53
- 11. ©2016, Amazon Web Services, Inc. or its affiliates. All rights reserved.
スケールアップの一択
• シンプル
• たくさんのインスタ
ンスタイプ
• 簡単
• しかし、いずれ限界
が来る
c4.8xlarge
m3.2xlarge
t2.micro
- 12. ©2016, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ユーザー数 = 1
• The SPOF
• 冗長性なし
• LAMP密結合
– 問題の切り分けが難し
い
Amazon
EC2
instance
Elastic IP
User
Amazon
Route 53
- 13. ©2016, Amazon Web Services, Inc. or its affiliates. All rights reserved.
サービス規模別の構成例
ユーザー数 > 1
- 14. ©2016, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ユーザー数 > 1
• まずはWebとDBを分
離
– DBが独立したことで
AWSサービスの利用
が選択できるようにな
る
Web
Instance
Database
Instance
Elastic IP
User
Amazon
Route 53
- 15. ©2016, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ユーザー数 > 1
Fully managed
Amazon
DynamoDB
Managed NoSQL
database service
using SSD storage
Seamless scalability
Zero administration
Amazon RDS
Microsoft SQL Server
Oracle
MySQL
PostgreSQL
MariaDB
Amazon Aurora
BYOL or license
Included
Amazon
Redshift
Massively parallel,
petabyte-scale data
warehouse service
Fast, powerful, and
easy to scale
- 16. ©2016, Amazon Web Services, Inc. or its affiliates. All rights reserved.
To NoSQL, or not to
NoSQL?
- 17. ©2016, Amazon Web Services, Inc. or its affiliates. All rights reserved.
SQLから始めよう
• 成熟度が高く、よく使い古されている
– どのようにスケールさせるかについても
• たくさんのツール、文献、Web上の情報
• NoSQLに比べて優秀な技術者を見つけやすい
- 18. ©2016, Amazon Web Services, Inc. or its affiliates. All rights reserved.
NoSQLの出番は?
• とても低いレイテンシー
• とても高いIOPS
• 大量のデータ
• リレーショナルじゃない
• トランザクション管理がいらない
• スキーマレス
- 19. ©2016, Amazon Web Services, Inc. or its affiliates. All rights reserved.
サービス規模別の構成例
ユーザー数 > 100
- 20. ©2016, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ユーザー数 > 100
• RDSを利用して無用
な手間を減らす
– サービス成長に、ます
ます集中
Web
instance
Elastic IP
RDS DB
instance
User
Amazon
Route 53
- 21. ©2016, Amazon Web Services, Inc. or its affiliates. All rights reserved.
サービス規模別の構成例
ユーザー数 > 1,000
- 22. ©2016, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ユーザー数 > 1,000
• 各レイヤーを冗長化
• 合わせてロードバラ
ンシング
• マルチAZも
Web
Instance
RDS DB Instance
Active (Multi-AZ)
Availability Zone Availability Zone
Web
Instance
RDS DB Instance
Standby (Multi-AZ)
ELB
Balancer
User
Amazon
Route 53
- 23. ©2016, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ELBを入れたなら
horizontally
vertically
- 24. ©2016, Amazon Web Services, Inc. or its affiliates. All rights reserved.
サービス規模別の構成例
ユーザー数 > 100,000
- 25. ©2016, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ユーザー数 > 100,000
RDS DB Instance
Active (Multi-AZ)
Availability Zone Availability Zone
RDS DB Instance
Standby (Multi-AZ)
ELB
Balancer
RDS DB Instance
Read Replica
RDS DB Instance
Read Replica
RDS DB Instance
Read Replica
RDS DB Instance
Read Replica
Web
Instance
Web
Instance
Web
Instance
Web
Instance
Web
Instance
Web
Instance
Web
Instance
Web
Instance
Amazon
Route 53User
- 26. ©2016, Amazon Web Services, Inc. or its affiliates. All rights reserved.
処理性能や処理効率を上げるために
• 各レイヤーで、負荷
をオフロードして、
パフォーマンス上げ
る
– 静的ファイル
– セッション
– クエリーキャッシュ
RDS DB Instance
Active (Multi-AZ)
Availability Zone
ELB
Balancer
Amazon S3
Amazon
CloudFront
Amazon
Route 53
User
ElastiCache DynamoDB
Web Instances
- 27. ©2016, Amazon Web Services, Inc. or its affiliates. All rights reserved.
満を持してオートスケーリング
• 疎結合、冗長化、および、オフロードを取り込
み済み
• スケールコントロールの対象が明確になる
– 何をトリガーにスケールするのか?
• オートスケーリングがより効果的に
- 28. ©2016, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Auto Scalingによる自動拡大/縮小
• Auto Scaling
– EC2を負荷に応じて自動的に拡大/縮小させる仕組み
– 例) CPU使用率が5分以上継続して70%以上だったら2台追加
Auto Scaling Group
ELB
CloudWatch
負荷状況を監視
EC2を追加構築
ELBの振り分けに追加
Web Web Web Web
- 29. ©2016, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ユーザー数 > 100,000
• オートスケーリングで効率よく
November
Before
After
- 30. ©2016, Amazon Web Services, Inc. or its affiliates. All rights reserved.
サービス規模別の構成例
ユーザー数 > 500,000
- 31. ©2016, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ユーザー数 > 500,000
Availability Zone
Amazon
Route 53
User
Amazon S3
Amazon
CloudFront
Availability Zone
ELB
Balancer
DynamoDB
RDS DB Instance
Read Replica
Web
Instance
Web
Instance
Web
Instance
ElastiCache RDS DB Instance
Read Replica
Web
Instance
Web
Instance
Web
Instance
ElastiCacheRDS DB Instance
Standby (Multi-AZ)
RDS DB Instance
Active (Multi-AZ)
- 32. ©2016, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ユーザー数 > 500,000
• ノード数増加 > オペレーション複雑化 > 自動
化がますます大事に
• ノード数増加 > 状態管理複雑化 > モニタリン
グ/アラーティングがますます大事に
– SaaS利用でアウトソース < サービスありき
- 33. ©2016, Amazon Web Services, Inc. or its affiliates. All rights reserved.
自動化からのBlue/Green Deployment
• Blue/Greenにもいくつか方法があります
– Switch DNS
– Swap Auto Scaling Group
– Swap ASG lauch configurations
など
• 詳しくは、
– SlideShare
– YouTube
- 34. ©2016, Amazon Web Services, Inc. or its affiliates. All rights reserved.
サービス規模別の構成例
ユーザー数 > 1,000,000
- 35. ©2016, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ユーザー数 > 1,000,000
RDS DB Instance
Active (Multi-AZ)
Availability Zone
ELB
Balancer
RDS DB Instance
Read Replica
RDS DB Instance
Read Replica
Web
Instance
Web
Instance
Web
Instance
Web
Instance
Amazon
Route 53
User
Amazon S3
Amazon
CloudFront
DynamoDB
Amazon SQS
ElastiCache
Worker
Instance
Worker
Instance
Amazon
CloudWatch
Internal App
Instance
Internal App
Instance Amazon SES
Lambda
- 36. ©2016, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ユーザー数 > 1,000,000
• モノリシック > マイクロサービス
– API
– キューイング
– サーバーレス
– コンテナ
- 37. ©2016, Amazon Web Services, Inc. or its affiliates. All rights reserved.
マイクロサービスの事例
• Amazon
– SlideShare
– Two pizza team
– API
- 38. ©2016, Amazon Web Services, Inc. or its affiliates. All rights reserved.
サービス規模別の構成例
ユーザー数 > 10,000,000
- 39. ©2016, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ユーザー数 > 10,000,000
• Amazon Auroraに移行する
• NoSQLの本格利用を開始する
– DynamoDB
– HBase on EMR
• もっとマイクロサービス化する
• マルチAZからマルチリージョンへ
- 40. ©2016, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Auroraの事例
• Expedia様
– SlideShare
– MS SQL > NoSQL > RDS MySQL > Aurora
- 41. ©2016, Amazon Web Services, Inc. or its affiliates. All rights reserved.
目次
• このセッションの対象
• サービス成長とスケーラビリティ
• サービス成長の指標
• サービス規模別の構成例
• まとめ
- 42. ©2016, Amazon Web Services, Inc. or its affiliates. All rights reserved.
まとめ
• 冗長構成にしよう
– マルチAZからアプリケーションまで
• AWSマネージドサービスを活用しよう
– サービス成長に注力しよう
• まずは、SQLから始めよう
– それから、NoSQLも使おう
• キャッシュを効かせよう
– フロントエンドからバックエンドまで
- 43. ©2016, Amazon Web Services, Inc. or its affiliates. All rights reserved.
続 まとめ
• 構成要素を疎結合にしよう
– 層ごとにスケール
– 将来のマイクロサービス化にも適応
• サービスを監視しよう
• 自動化しよう
– Infrastructure as code
• そして、オートスケーリングを活用しよう
- 44. ©2016, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ご相談ください
• サービス規模の大小にかかわらず、お気軽に、
ご相談ください
- 45. ©2016, Amazon Web Services, Inc. or its affiliates. All rights reserved.
TECHNICAL &
BUSINESS
SUPPORT
Account
Management
Support
Professional
Services
Solutions
Architects
Training &
Certification
Security
& Pricing
Reports
Partner
Ecosystem
AWS
MARKETPLACE
Backup
Big Data
& HPC
Business
Apps
Databases
Development
Industry
Solutions
Security
APPLICATION
SERVICES
Queuing
Notifications
Search
Orchestration
Email
ENTERPRISE
APPS
Virtual
Desktops
Storage
Gateway
Sharing &
Collaboration
Email &
Calendaring
Directories
HYBRID CLOUD
MANAGEMENT
Backups
Deployment
Direct
Connect
Identity
Federation
Integrated
Management
SECURITY &
MANAGEMENT
Virtual Private
Networks
Identity &
Access
Encryption
Keys
Configuration Monitoring Dedicated
INFRASTRUCTURE
SERVICES
Regions
Availability
Zones
Compute Storage
Databases
SQL, NoSQL,
Caching
CDNNetworking
PLATFORM
SERVICES
App
Mobile
& Web
Front-end
Functions
Identity
Data Store
Real-time
Development
Containers
Source
Code
Build
Tools
Deployment
DevOps
Mobile
Sync
Identity
Push
Notifications
Mobile
Analytics
Mobile
Backend
Analytics
Data
Warehousing
Hadoop
Streaming
Data
Pipelines
Machine
Learning
Editor's Notes
- 元ネタ
http://www.slideshare.net/AmazonWebServices/arc301-scaling-up-to-your-first-10-million-users
- 1ページに収まらないので、マルチAZの図説を省力していますが、マルチAZの体でお願いします