SlideShare a Scribd company logo
1 of 64
Download to read offline
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
EC2のストレージどう使う?
Instance  Storageを理理解して
⾼高速IOを上⼿手に活⽤用!
2014年3月17日
アマゾンデータサービスジャパン株式会社
ソリューションアーキテクト 今井雄太
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
自己紹介
•  名前
–  今井雄太(  yuimai@amazon.co.jp  )
•  仕事
–  ソリューションアーキテクト
–  広告業界・アドテクノロジープレイヤーのお客様を担当し
ています
–  リスティング広告の配信システムの開発や媒体社で広告配
信システムまわりの開発・運⽤用を経験してきました。
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Agenda
Instance  Storageとは?
Instance  Storageの活⽤用シーン
1
2
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Agenda
Instance  Storageとは?
Instance  Storageの活⽤用シーン
1
2
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
5
AWSのストレージサービス?
1.  Simple  Queue  Service
2.  Instance  Store(Ephemeral  Disk)
3.  Elastic  Block  Store(EBS)
4.  AWS  Storage  Gateway
5.  Amazon  Simple  Storage  Service(S3)
6.  Amazon  Glacier
7.  Amazon  ElastiCache
8.  Amazon  SimpleDB
9.  Amazon  DynamoDB
10. Amazon  Relational  Database  Service(RDS)
11. Amazon  Redshift
12. Amazon  Kinesis
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
ブロックストレージのサービス
1.  Simple  Queue  Service
2.  Instance  Storage(Ephemeral  Disk)
3.  Elastic  Block  Store(EBS)
4.  AWS  Storage  Gateway
5.  Amazon  Simple  Storage  Service(S3)
6.  Amazon  Glacier
7.  Amazon  ElastiCache
8.  Amazon  SimpleDB
9.  Amazon  DynamoDB
10. Amazon  Relational  Database  Service(RDS)
11. Amazon  Redshift
12. Amazon  Kinesis
EC2で利利⽤用可能な基本的な
ブロックストレージ
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
インスタンスストレージ?
もしくは
エフェメラルディスク?
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Instance  Storageとは
•  特徴
–  EC2の物理筐体のローカルディスク
–  EC2インスタンスタイプにより、サイズと個
数、HDD/SSD、が予め決まっている。
•  利点
–  無料!
–  任意のファイルシステムが利用可能
–  ローカルディスクのため、ネットワークの影
響を受けにくい(レイテンシ・帯域)
•  注意
–  インスタンスを停止(Stop)すると、データが
消去される
※[重要]再起動(Reboot)では消えない。
–  スナップショット機能はない
–  別のEC2に付替えができない
EC2
/dev/xvdg
/dev/xvdf
揮発性
EC2へマウント
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
EBS?
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Amazon Elastic Block Storeとは
EBSとは、EC2に仮想外付けされる
ブロックレベルのストレージサービス
※各コンピュートサービスのデータ基盤
"   サイズは1GB単位で〜~1TBまで
"   サイズ/期間/IOで課⾦金金される
"   各EC2インスタンスで、複数EBSを使える
詳細
"   データは永続的に保存される
"   アベイラビリティゾーン(AZ)  に存在
"   他のEC2インスタンスに付け替え可能
"   バックアップから、EBSを作成可能
(他のAZに作成できる)
Region
Availability Zone - a
EBS EBS EBS
Availability Zone - b
EBS EBS
Amazon Simple
Storage Service
(S3)
EBS
Snapshot
EC2 EC2
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
EBSと
Instance Storage
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
EC2からの接続方法から見たストレージ分類
EBS
Provisioned 
IOPS
EBS
Standard
S3 GlacierInstance
Storage
IOPSが指定
可能なEBS
ブロックレベル
のディスク
WEB型の
オブジェクト
ストレージ
アーカイブ
専⽤用ストレージ
EC2インスタ
ンスの⼀一時
ディスク
揮発性 ⾮非揮発性(永続化)
コスト効果
(容量量あたり)
安価⾼高価
EC2
Storage
Gateway
選定するEC2
により起動時
にマッピング
アタッチ VTLStored
Cached
i-‐‑‒SCSI接続
無料料!
(Instance
料料⾦金金内に
含まれる)
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Instance  StorageとEBS
EC2
Instance Storage
•  内蔵ディスク
•  EC2と不可分
•  EC2をStop/Terminateするとクリアされる
•  性能・容量はインスタンスタイプごとに規定
•  追加費用なし
EBS
•  ネットワークで接続
•  EC2とは独立管理
•  EC2をTerminateしてもEBSは保持可能
•  Volumeごとに性能・容量を定義可能
•  EBSの費用が発生
物理的には
ネットワーク経由
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Instance  StorageとEBS
EC2
Instance Storage
•  内蔵ディスク
•  EC2と不可分
•  EC2をStop/Terminateするとクリアされる
•  性能・容量はインスタンスタイプごとに規定
•  追加費用なし
EBS
•  ネットワークで接続
•  EC2とは独立管理
•  EC2をTerminateしてもEBSは保持可能
•  Volumeごとに性能・容量を定義可能
•  EBSの費用が発生
物理的には
ネットワーク経由
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
AMIから見たストレージ分類
・  通常はこちらを⽤用いる
    (2009年年後半に追加)
・  EC2に停⽌止/終了了のオプ
    ション有
・  停⽌止しても、ファイル    
    システムは永続する
EBS-‐‑‒
Backed  AMI
AMI (Amazon  Machine  Image
EC2のコピーをとりテンプレート化
することで、再利利⽤用可能
Instance  Store-‐‑‒
Backed  AMI
•  EC2開始当初からある
•  EC2に停止のオプションはない
•  EC2を終了するとデータは消える
起動ディスク
EBS
起動ディスク
Instance
Storage
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Instance Storage の適用箇所
OSブートディスク
としての利用
アプリ
データ
D:
システム
データ
C:
EBS
EC2
EBS
Windows
データ格納ディスク
としての利利⽤用
Instance
Storage
E:
データ計算⽤用
⼀一時ディスク
としての利利⽤用
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Instance Store の適用箇所
OSブートディスク
としての利用
アプリ
データ
/dev/xvdf
システム
データ
/dev/xvda1
EBS
EC2
EBS
Linux
データ格納ディスク
としての利利⽤用
Instance
Storage
/dev/xvdg
データ計算⽤用
⼀一時ディスク
としての利利⽤用
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
なぜいま
Instance Storage
の話なのか?
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Instance StorageにSSDを積んだイ
ンスタンスが増えてきた
•  EC2のタイプによって、選択できるInstance Storeは以下の通り。
Instance  Type Instance  Store  Volumes
m1.small 1  x  160  GB†
m1.medium 1  x  410  GB
m1.large 2  x  420  GB  (840  GB)
m1.xlarge 4  x  420  GB  (1680  GB)
m2.xlarge 1  x  420  GB
m2.2xlarge 1  x  850  GB
m2.4xlarge 2  x  840  GB  (1680  GB)
m3.medium 1  x  4  GB  SSD
m3.large 1  x  32  GB  SSD
m3.xlarge 2  x  40  GB  SSD  (80  GB)
m3.2xlarge 2  x  80  GB  SSD  (160  GB)
t1.micro
None
  (use  Amazon  EBS  volumes)
c1.medium 1  x  350  GB†
c1.xlarge 4  x  420  GB  (1680  GB)
Instance  Type Instance  Store  Volumes
c3.large 2  x  16  GB  SSD  (32  GB)
c3.xlarge 2  x  40  GB  SSD  (80  GB)
c3.2xlarge 2  x  80  GB  SSD  (160  GB)
c3.4xlarge 2  x  160  GB  SSD  (320  GB)
c3.8xlarge 2  x  320  GB  SSD  (640  GB)
cc2.8xlarge 4  x  840  GB  (3360  GB)
cg1.4xlarge 2  x  840  GB  (1680  GB)
cr1.8xlarge 2  x  120  GB  SSD  (240  GB)
hi1.4xlarge 2  x  1024  GB  SSD  (2048  GB)
hs1.8xlarge 24  x  2048  GB  (49  TB)
i2.xlarge 1  x  800  GB  SSD
i2.2xlarge 2  x  800  GB  SSD  (1600  GB)
i2.4xlarge 4  x  800  GB  SSD  (3200  GB)
i2.8xlarge 8  x  800  GB  SSD  (6400  GB)
※2014年年1⽉月29⽇日時点
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
I2 Instance での Instance Store
Size
EC
Us
vCP
Us
Memo
ry
(GiB)
Instance
Storage (GiB)
EBS-
Optimiz
ed
Read
IOPS
First
Write
IOPS
Network
Performance
i2.xlarge 14 4 30.5 1 x 800 (SSD) Yes 35,000 35,000 Moderate
i2.2xlarge 27 8 61 2 x 800 (SSD) Yes 75,000 75,000 High
i2.4xlarge 53 16 122 4 x 800 (SSD) Yes 175,000 155,000 High
i2.8xlarge 104 32 244 8 x 800 (SSD) - 365,000 315,000 10 Gigabit
I2 インスタンス 
・⾼高I/Oを実現するインスタンスタイプ
・⾼高速なSSD(Instance  Store)を内蔵
・以下の条件を満たす場合、最⼤大IOPSが以下のように明⽰示されている
    ・Linux  Kernel  3.8以上
        ・ブロックサイズを4KBの倍数
※2014年年1⽉月29⽇日時点
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
C3 Instance での Instance Store
C3 インスタンス 
・⾼高CPUを実現するインスタンスタイプ
・⾼高速なSSD(Instance  Store)を選択可能
Size ECUs vCPUs
Memory
(GiB)
Instance
Storage(GiB)
EBS-
Optimized
Network
Performance
c3.large 7 2 3.75 2 x 16 (SSD) - Moderate
c3.xlarge 14 4 7.5 2 x 40 (SSD) Yes Moderate
c3.2xlarge 28 8 15 2 x 80 (SSD) Yes High
c3.4xlarge 55 16 30 2 x 160 (SSD) Yes High
c3.8xlarge 108 32 60 2 x 320 (SSD) - 10 Gigabit
※2014年年1⽉月29⽇日時点
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
M3 Instance でのInstance Store
Size ECUs vCPUs
Memory
(GiB)
Instance Storage (GiB)
EBS-
Optimized
Network
Performanc
e
m3.medium 3 1 3.75 1 x 4 (SSD) - Moderate
m3.large 6.5 2 7 1 x 32 (SSD) - Moderate
m3.xlarge 13 4 15 2 x 40 (SSD) Yes Moderate
m3.2xlarge 26 8 30 2 x 80 (SSD) Yes High
M3 インスタンス 
・新型CPUを搭載したインスタンスタイプ
・従来はEBSのみ接続であったが、
    ⾼高速なSSD(Instance  Store)を選択可能に!
※2014年年1⽉月29⽇日時点
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
EBSでIOPSを
稼ぐには?
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
•  Provisioned IOPS
–  1ボリューム最大4000IOPSまで指定可能なオプ
ション
–  16KB以下のブロックサイズの場合、指定IOPSの
10%以内に収まる性能を、年間99.9%の時間で提
供
•  EBS-Optimized Instance
–  EC2とEBS間のネットワークを最適化するオプ
ション
–  Provisioned IOPSと一緒に利用すると効果が高い
EC2
EBSの性能向上と⼀一定化オプション
EC2
Optimized
P-IOPS
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
価格⾯面でEBS(PIOPS)と⽐比較してみる
•  Read, Writeの性能や可用性、コストなどを考
慮するとトータルとしてどちら良いか?
Placement Group	
i2.8xlarge	
DRBD
32vCPU (104ECU)
244 GB Memory
SSD 800GB x8	
32vCPU (88ECU)
244 GB Memory
PIOPS 4000 IOPS/800GB x8	
cr1.8xlarge	
PIOPS	
3年 Reserved Instance
$ 4049.4
3年 Reserved Instance
$ 5814.3
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
EBSと比べると
より安価に速い
SSDも使える
Instance Storage
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
しかしEC2を
Terminateしたり、
Stopするとデータ
がなくなる
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
いくつかの活用方
法についてのアイ
デアをご紹介して
いきます
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Agenda
Instance  Storageとは?
Instance  Storageの活⽤用シーン
1
2
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Instance Storageを使うべきなのは
•  高IOPS、高帯域なストレージが必要
な場合
•  消えても良い一次データの置き場と
して使う場合
•  ストレージ冗長化を準備できる場合
S3活かしたいメリット
考慮すべき制約
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Instance Storageの活用シーン
•  アプリケーションコードやログの吐
き出し先として
•  バッチ処理等の一時ストレージとし
て
•  ストレージやデータベースのディス
クとして
S3
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Instance Storageの活用シーン
•  アプリケーションコードやログの吐
き出し先として
•  バッチ処理等の一時ストレージとし
て
•  ストレージやデータベースのディス
クとして
S3
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
アプリケーションコードやログの吐き出し先
として
•  追加費⽤用が発⽣生しない
•  ログ吐き出しを受ける⾼高速なIO
S3活かしたいメリット
考慮すべき制約
•  インスタンスをStop/Terminateするとデータが
なくなるので、ログはS3などに吐き出すように
しておく
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
アプリケーションコードやログの吐き出し先
として
AMI
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
アプリケーションコードやログの吐き出し先
として
EC2
Instance
Storage
コード
AMI
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
アプリケーションコードやログの吐き出し先
として
EC2
Instance
Storage
コード
ログ
AMI
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
アプリケーションコードやログの吐き出し先
として
EC2
Instance
Storage
コード
ログ
AMI
コードはAMIやリポジトリ
から取得する
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
アプリケーションコードやログの吐き出し先
として
EC2
Instance
Storage
コード
ログ
AMI
コードはAMIやリポジトリ
から取得する	

ログはS3に吐き出す
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Instance Storageの活用シーン
•  アプリケーションコードやログの吐
き出し先として
•  バッチ処理等の一時ストレージとし
て
•  ストレージやデータベースのディス
クとして
S3
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
バッチ処理等の一時ディスクとして利用
•  ⾼高速・⾼高帯域なIOを必要とするようなバッチ処
理理に
S3活かしたいメリット
考慮すべき制約
•  インスタンス障害時にはデータのサルベージは
諦める
•  インスタンスの障害等が起こった時に、S3から
再度度データを取り出してリトライが可能なアー
キテクチャに
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
バッチ処理等の一時ディスクとして利用
EC2
Instance
Storage
Data
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
バッチ処理等の一時ディスクとして利用
EC2
Instance
Storage
Data
バッチ処理!
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
バッチ処理等の一時ディスクとして利用
EC2
Instance
Storage
Data
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
バッチ処理等の一時ディスクとして利用
EC2
Instance
Storage
EC2
Instance
Storage
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
バッチ処理等の一時ディスクとして利用
EC2
Instance
Storage
EC2
Instance
Storage
S3からデータを取得
してやり直す
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Instance Storageの活用シーン
•  アプリケーションコードやログの吐
き出し先として
•  バッチ処理等の一時ストレージとし
て
•  ストレージやデータベースのディス
クとして
S3
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
ストレージやデータベースのディスクとして
EC2
Instance
Storage
EC2EC2 EC2
Storage  software
DBMS
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
バッチ処理等の一時ディスクとして利用
•  ストレージ層に⾼高速なIOを!
S3活かしたいメリット
考慮すべき制約
•  ストレージデバイス単位の障害への耐久性
•  EC2単位の障害への耐久性
•  これらの耐久性について、OSやDBMS、スト
レージソフトウェアの層で対処する
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
OS層での対策例: DRBD
AZ-A AZ-B
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
ストレージソフトウェア層での対策例:
GlusterFS
GlusterFS
NFS
GlusterFS
NFS
GlusterFS
NFS
GlusterFS
NFS
GlusterFS
NFS
GlusterFS
NFS
GlusterFS
NFS
GlusterFS
NFS
GlusterFS
NFS
GlusterFS
NFS
GlusterFS
AZ-A
AZ-B
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
DBMS層での対策例:非同期レプリケーション
トランザクションログ転送
Ephe
meral
Ephe
meral
Ephe
meral
Ephe
meral
Master	
 Slave
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
MongoDB  Sharded  Replica  sets
複数のAZに跨ってレプリカセットを配備することで高可用性を実現
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Leader
Compute 1 Compute 2 Compute 3 Compute n
A1 A2 A3
A3A2 A1
B3 B1 B2
B2B1 B3
Table A
primary,
secondary
data
Table B
primary,
secondary
data
A1
A2
B3
B1
DBMS層での対策例例:Redshift
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
いろいろ
ありますね・・・
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
デザインパターン
にしてみました
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
デザインパターンにまとめてみる
EC2にデータ永続化をさせないパターン
EC2
Instance
Storage
Data
•  コード
•  ログ
•  バッチ処理のデータ
•  DBのSlave
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
デザインパターンにまとめてみる
データを⾮非同期レプリケーションするパターン
EC2
Instance
Storage
EC2
Instance
Storage
Data
Async
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
デザインパターンにまとめてみる
データを同期ミラーリングするパターン
EC2
Instance
Storage
EC2
Instance
Storage
Data Data
Sync
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
デザインパターンにまとめてみる
データを持ち合うパターン
EC2
Instance
Storage
EC2
Instance
Storage
Data  A Data  B
Data  B Data  A
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
注意:RAIDについて
RAIDのディスク冗⻑⾧長化は
あくまでホスト内の耐久性向上施策
EC2
Instance
Storage
Instance
Storage
Sync
•  EC2ホスト内でのデータ耐
久性を上げるという対策と
してはあり
•  ただし、EC2ホスト自体の
TerminateやStopへの対策
にはならないので注意!
まとめ	
"   SSDのエフェメラルディスクはAWS上では最速の性
能を発揮!如何に使いこなすかがキモ!
"   構成次第では、エフェメラルも実用に耐えれる!
"   更に上級を目指すAWSエンジニアはエフェメラル
ディスクも選択肢に入れて、トータルな要件を踏まえ
て最適なアーキテクトを!
SSD
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
•  ネットワーク冗長化
–  DRBD
–  ClusterPro
–  DataKeeper
•  分散FS
–  GlusterFS (OSS)
–  OrangeFS
–  Lustre
–  Windows Distributed File System (DFS)
–  HDFS
参考)
OS層/ストレージソフトウェア層での対策群
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
RDBMSの冗長化 (ログシッピング)
–  MySQL + replication (+ MHA)
–  PostgreSQL + streaming replication
–  Oracle + Data Guard
–  SQL Server + AlwaysOn
分散DB
–  MySQL Cluster
–  MongoDB
–  Cassandra
–  (Redshift)
参考)DBMS層での対策群

More Related Content

What's hot

AWSのログ管理ベストプラクティス
AWSのログ管理ベストプラクティスAWSのログ管理ベストプラクティス
AWSのログ管理ベストプラクティスAkihiro Kuwano
 
20190424 AWS Black Belt Online Seminar Amazon Aurora MySQL
20190424 AWS Black Belt Online Seminar Amazon Aurora MySQL20190424 AWS Black Belt Online Seminar Amazon Aurora MySQL
20190424 AWS Black Belt Online Seminar Amazon Aurora MySQLAmazon Web Services Japan
 
20200422 AWS Black Belt Online Seminar Amazon Elastic Container Service (Amaz...
20200422 AWS Black Belt Online Seminar Amazon Elastic Container Service (Amaz...20200422 AWS Black Belt Online Seminar Amazon Elastic Container Service (Amaz...
20200422 AWS Black Belt Online Seminar Amazon Elastic Container Service (Amaz...Amazon Web Services Japan
 
AWS Black Belt Online Seminar AWS Direct Connect
AWS Black Belt Online Seminar AWS Direct ConnectAWS Black Belt Online Seminar AWS Direct Connect
AWS Black Belt Online Seminar AWS Direct ConnectAmazon Web Services Japan
 
ストリーム処理を支えるキューイングシステムの選び方
ストリーム処理を支えるキューイングシステムの選び方ストリーム処理を支えるキューイングシステムの選び方
ストリーム処理を支えるキューイングシステムの選び方Yoshiyasu SAEKI
 
Oracleからamazon auroraへの移行にむけて
Oracleからamazon auroraへの移行にむけてOracleからamazon auroraへの移行にむけて
Oracleからamazon auroraへの移行にむけてYoichi Sai
 
20190326 AWS Black Belt Online Seminar Amazon CloudWatch
20190326 AWS Black Belt Online Seminar Amazon CloudWatch20190326 AWS Black Belt Online Seminar Amazon CloudWatch
20190326 AWS Black Belt Online Seminar Amazon CloudWatchAmazon Web Services Japan
 
20220409 AWS BLEA 開発にあたって検討したこと
20220409 AWS BLEA 開発にあたって検討したこと20220409 AWS BLEA 開発にあたって検討したこと
20220409 AWS BLEA 開発にあたって検討したことAmazon Web Services Japan
 
20190220 AWS Black Belt Online Seminar Amazon S3 / Glacier
20190220 AWS Black Belt Online Seminar Amazon S3 / Glacier20190220 AWS Black Belt Online Seminar Amazon S3 / Glacier
20190220 AWS Black Belt Online Seminar Amazon S3 / GlacierAmazon Web Services Japan
 
初心者向けMongoDBのキホン!
初心者向けMongoDBのキホン!初心者向けMongoDBのキホン!
初心者向けMongoDBのキホン!Tetsutaro Watanabe
 
The Twelve-Factor Appで考えるAWSのサービス開発
The Twelve-Factor Appで考えるAWSのサービス開発The Twelve-Factor Appで考えるAWSのサービス開発
The Twelve-Factor Appで考えるAWSのサービス開発Amazon Web Services Japan
 
20210127 今日から始めるイベントドリブンアーキテクチャ AWS Expert Online #13
20210127 今日から始めるイベントドリブンアーキテクチャ AWS Expert Online #1320210127 今日から始めるイベントドリブンアーキテクチャ AWS Expert Online #13
20210127 今日から始めるイベントドリブンアーキテクチャ AWS Expert Online #13Amazon Web Services Japan
 
202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM)
202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM)202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM)
202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM)Amazon Web Services Japan
 
マルチテナント化で知っておきたいデータベースのこと
マルチテナント化で知っておきたいデータベースのことマルチテナント化で知っておきたいデータベースのこと
マルチテナント化で知っておきたいデータベースのことAmazon Web Services Japan
 
20200303 AWS Black Belt Online Seminar AWS Cloud Development Kit (CDK)
20200303 AWS Black Belt Online Seminar AWS Cloud Development Kit (CDK)20200303 AWS Black Belt Online Seminar AWS Cloud Development Kit (CDK)
20200303 AWS Black Belt Online Seminar AWS Cloud Development Kit (CDK)Amazon Web Services Japan
 
20190731 Black Belt Online Seminar Amazon ECS Deep Dive
20190731 Black Belt Online Seminar Amazon ECS Deep Dive20190731 Black Belt Online Seminar Amazon ECS Deep Dive
20190731 Black Belt Online Seminar Amazon ECS Deep DiveAmazon Web Services Japan
 
20190410 AWS Black Belt Online Seminar Amazon Elastic Container Service for K...
20190410 AWS Black Belt Online Seminar Amazon Elastic Container Service for K...20190410 AWS Black Belt Online Seminar Amazon Elastic Container Service for K...
20190410 AWS Black Belt Online Seminar Amazon Elastic Container Service for K...Amazon Web Services Japan
 
20191016 AWS Black Belt Online Seminar Amazon Route 53 Resolver
20191016 AWS Black Belt Online Seminar Amazon Route 53 Resolver20191016 AWS Black Belt Online Seminar Amazon Route 53 Resolver
20191016 AWS Black Belt Online Seminar Amazon Route 53 ResolverAmazon Web Services Japan
 
20190514 AWS Black Belt Online Seminar Amazon API Gateway
20190514 AWS Black Belt Online Seminar Amazon API Gateway 20190514 AWS Black Belt Online Seminar Amazon API Gateway
20190514 AWS Black Belt Online Seminar Amazon API Gateway Amazon Web Services Japan
 

What's hot (20)

AWSのログ管理ベストプラクティス
AWSのログ管理ベストプラクティスAWSのログ管理ベストプラクティス
AWSのログ管理ベストプラクティス
 
20190424 AWS Black Belt Online Seminar Amazon Aurora MySQL
20190424 AWS Black Belt Online Seminar Amazon Aurora MySQL20190424 AWS Black Belt Online Seminar Amazon Aurora MySQL
20190424 AWS Black Belt Online Seminar Amazon Aurora MySQL
 
20200422 AWS Black Belt Online Seminar Amazon Elastic Container Service (Amaz...
20200422 AWS Black Belt Online Seminar Amazon Elastic Container Service (Amaz...20200422 AWS Black Belt Online Seminar Amazon Elastic Container Service (Amaz...
20200422 AWS Black Belt Online Seminar Amazon Elastic Container Service (Amaz...
 
AWS Black Belt Online Seminar AWS Direct Connect
AWS Black Belt Online Seminar AWS Direct ConnectAWS Black Belt Online Seminar AWS Direct Connect
AWS Black Belt Online Seminar AWS Direct Connect
 
ストリーム処理を支えるキューイングシステムの選び方
ストリーム処理を支えるキューイングシステムの選び方ストリーム処理を支えるキューイングシステムの選び方
ストリーム処理を支えるキューイングシステムの選び方
 
Oracleからamazon auroraへの移行にむけて
Oracleからamazon auroraへの移行にむけてOracleからamazon auroraへの移行にむけて
Oracleからamazon auroraへの移行にむけて
 
20190326 AWS Black Belt Online Seminar Amazon CloudWatch
20190326 AWS Black Belt Online Seminar Amazon CloudWatch20190326 AWS Black Belt Online Seminar Amazon CloudWatch
20190326 AWS Black Belt Online Seminar Amazon CloudWatch
 
20220409 AWS BLEA 開発にあたって検討したこと
20220409 AWS BLEA 開発にあたって検討したこと20220409 AWS BLEA 開発にあたって検討したこと
20220409 AWS BLEA 開発にあたって検討したこと
 
20190220 AWS Black Belt Online Seminar Amazon S3 / Glacier
20190220 AWS Black Belt Online Seminar Amazon S3 / Glacier20190220 AWS Black Belt Online Seminar Amazon S3 / Glacier
20190220 AWS Black Belt Online Seminar Amazon S3 / Glacier
 
初心者向けMongoDBのキホン!
初心者向けMongoDBのキホン!初心者向けMongoDBのキホン!
初心者向けMongoDBのキホン!
 
The Twelve-Factor Appで考えるAWSのサービス開発
The Twelve-Factor Appで考えるAWSのサービス開発The Twelve-Factor Appで考えるAWSのサービス開発
The Twelve-Factor Appで考えるAWSのサービス開発
 
20210127 今日から始めるイベントドリブンアーキテクチャ AWS Expert Online #13
20210127 今日から始めるイベントドリブンアーキテクチャ AWS Expert Online #1320210127 今日から始めるイベントドリブンアーキテクチャ AWS Expert Online #13
20210127 今日から始めるイベントドリブンアーキテクチャ AWS Expert Online #13
 
202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM)
202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM)202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM)
202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM)
 
マルチテナント化で知っておきたいデータベースのこと
マルチテナント化で知っておきたいデータベースのことマルチテナント化で知っておきたいデータベースのこと
マルチテナント化で知っておきたいデータベースのこと
 
Infrastructure as Code (IaC) 談義 2022
Infrastructure as Code (IaC) 談義 2022Infrastructure as Code (IaC) 談義 2022
Infrastructure as Code (IaC) 談義 2022
 
20200303 AWS Black Belt Online Seminar AWS Cloud Development Kit (CDK)
20200303 AWS Black Belt Online Seminar AWS Cloud Development Kit (CDK)20200303 AWS Black Belt Online Seminar AWS Cloud Development Kit (CDK)
20200303 AWS Black Belt Online Seminar AWS Cloud Development Kit (CDK)
 
20190731 Black Belt Online Seminar Amazon ECS Deep Dive
20190731 Black Belt Online Seminar Amazon ECS Deep Dive20190731 Black Belt Online Seminar Amazon ECS Deep Dive
20190731 Black Belt Online Seminar Amazon ECS Deep Dive
 
20190410 AWS Black Belt Online Seminar Amazon Elastic Container Service for K...
20190410 AWS Black Belt Online Seminar Amazon Elastic Container Service for K...20190410 AWS Black Belt Online Seminar Amazon Elastic Container Service for K...
20190410 AWS Black Belt Online Seminar Amazon Elastic Container Service for K...
 
20191016 AWS Black Belt Online Seminar Amazon Route 53 Resolver
20191016 AWS Black Belt Online Seminar Amazon Route 53 Resolver20191016 AWS Black Belt Online Seminar Amazon Route 53 Resolver
20191016 AWS Black Belt Online Seminar Amazon Route 53 Resolver
 
20190514 AWS Black Belt Online Seminar Amazon API Gateway
20190514 AWS Black Belt Online Seminar Amazon API Gateway 20190514 AWS Black Belt Online Seminar Amazon API Gateway
20190514 AWS Black Belt Online Seminar Amazon API Gateway
 

Viewers also liked

AWSマイスターシリーズ Instance Store(Ephemeral Disk) & Elastic Block Store
AWSマイスターシリーズ Instance Store(Ephemeral Disk) & Elastic Block StoreAWSマイスターシリーズ Instance Store(Ephemeral Disk) & Elastic Block Store
AWSマイスターシリーズ Instance Store(Ephemeral Disk) & Elastic Block StoreAmazon Web Services Japan
 
初心者向けWebinar AWSでDRを構築しよう
初心者向けWebinar AWSでDRを構築しよう初心者向けWebinar AWSでDRを構築しよう
初心者向けWebinar AWSでDRを構築しようAmazon Web Services Japan
 
My sqlで2億件のシリアルデータと格闘した話
My sqlで2億件のシリアルデータと格闘した話My sqlで2億件のシリアルデータと格闘した話
My sqlで2億件のシリアルデータと格闘した話saiken3110
 
AWS上で使えるストレージ十番勝負
AWS上で使えるストレージ十番勝負AWS上で使えるストレージ十番勝負
AWS上で使えるストレージ十番勝負Akio Katayama
 
[AWSマイスターシリーズ] Amazon VPC VPN & Direct Connect
[AWSマイスターシリーズ] Amazon VPC VPN & Direct Connect[AWSマイスターシリーズ] Amazon VPC VPN & Direct Connect
[AWSマイスターシリーズ] Amazon VPC VPN & Direct ConnectAmazon Web Services Japan
 
AWS Blackbelt 2015シリーズ Amazon CloudWatch & Amazon CloudWatch Logs
AWS Blackbelt 2015シリーズ Amazon CloudWatch & Amazon CloudWatch LogsAWS Blackbelt 2015シリーズ Amazon CloudWatch & Amazon CloudWatch Logs
AWS Blackbelt 2015シリーズ Amazon CloudWatch & Amazon CloudWatch LogsAmazon Web Services Japan
 
CloudWatchの使い方
CloudWatchの使い方CloudWatchの使い方
CloudWatchの使い方ShinsukeYokota
 

Viewers also liked (7)

AWSマイスターシリーズ Instance Store(Ephemeral Disk) & Elastic Block Store
AWSマイスターシリーズ Instance Store(Ephemeral Disk) & Elastic Block StoreAWSマイスターシリーズ Instance Store(Ephemeral Disk) & Elastic Block Store
AWSマイスターシリーズ Instance Store(Ephemeral Disk) & Elastic Block Store
 
初心者向けWebinar AWSでDRを構築しよう
初心者向けWebinar AWSでDRを構築しよう初心者向けWebinar AWSでDRを構築しよう
初心者向けWebinar AWSでDRを構築しよう
 
My sqlで2億件のシリアルデータと格闘した話
My sqlで2億件のシリアルデータと格闘した話My sqlで2億件のシリアルデータと格闘した話
My sqlで2億件のシリアルデータと格闘した話
 
AWS上で使えるストレージ十番勝負
AWS上で使えるストレージ十番勝負AWS上で使えるストレージ十番勝負
AWS上で使えるストレージ十番勝負
 
[AWSマイスターシリーズ] Amazon VPC VPN & Direct Connect
[AWSマイスターシリーズ] Amazon VPC VPN & Direct Connect[AWSマイスターシリーズ] Amazon VPC VPN & Direct Connect
[AWSマイスターシリーズ] Amazon VPC VPN & Direct Connect
 
AWS Blackbelt 2015シリーズ Amazon CloudWatch & Amazon CloudWatch Logs
AWS Blackbelt 2015シリーズ Amazon CloudWatch & Amazon CloudWatch LogsAWS Blackbelt 2015シリーズ Amazon CloudWatch & Amazon CloudWatch Logs
AWS Blackbelt 2015シリーズ Amazon CloudWatch & Amazon CloudWatch Logs
 
CloudWatchの使い方
CloudWatchの使い方CloudWatchの使い方
CloudWatchの使い方
 

Similar to EC2のストレージどう使う? -Instance Storageを理解して高速IOを上手に活用!-

[AWSマイスターシリーズ] Instance Store & Elastic Block Store
[AWSマイスターシリーズ] Instance Store & Elastic Block Store[AWSマイスターシリーズ] Instance Store & Elastic Block Store
[AWSマイスターシリーズ] Instance Store & Elastic Block StoreAmazon Web Services Japan
 
20140315 jawsdays i2 instance io performance
20140315 jawsdays i2 instance io performance20140315 jawsdays i2 instance io performance
20140315 jawsdays i2 instance io performanceMatsumoto Hiroki
 
20180704 AWS Black Belt Online Seminar Amazon Elastic File System (Amazon EFS...
20180704 AWS Black Belt Online Seminar Amazon Elastic File System (Amazon EFS...20180704 AWS Black Belt Online Seminar Amazon Elastic File System (Amazon EFS...
20180704 AWS Black Belt Online Seminar Amazon Elastic File System (Amazon EFS...Amazon Web Services Japan
 
20180704(20190520 Renewed) AWS Black Belt Online Seminar Amazon Elastic File ...
20180704(20190520 Renewed) AWS Black Belt Online Seminar Amazon Elastic File ...20180704(20190520 Renewed) AWS Black Belt Online Seminar Amazon Elastic File ...
20180704(20190520 Renewed) AWS Black Belt Online Seminar Amazon Elastic File ...Amazon Web Services Japan
 
[db tech showcase Tokyo 2016] D24: データベース環境における検証結果から理解する失敗しないフラッシュ活用法 第三章 ~デ...
[db tech showcase Tokyo 2016] D24: データベース環境における検証結果から理解する失敗しないフラッシュ活用法 第三章 ~デ...[db tech showcase Tokyo 2016] D24: データベース環境における検証結果から理解する失敗しないフラッシュ活用法 第三章 ~デ...
[db tech showcase Tokyo 2016] D24: データベース環境における検証結果から理解する失敗しないフラッシュ活用法 第三章 ~デ...Insight Technology, Inc.
 
[AWSマイスターシリーズ] Amazon Redshift
[AWSマイスターシリーズ] Amazon Redshift[AWSマイスターシリーズ] Amazon Redshift
[AWSマイスターシリーズ] Amazon RedshiftAmazon Web Services Japan
 
クラウドサービスAmazon EC2を活用した「SKIPaaS」構築事例
クラウドサービスAmazon EC2を活用した「SKIPaaS」構築事例クラウドサービスAmazon EC2を活用した「SKIPaaS」構築事例
クラウドサービスAmazon EC2を活用した「SKIPaaS」構築事例Yuuki Namikawa
 
[AWSマイスターシリーズ] Amazon ElastiCache
[AWSマイスターシリーズ] Amazon ElastiCache[AWSマイスターシリーズ] Amazon ElastiCache
[AWSマイスターシリーズ] Amazon ElastiCacheAmazon Web Services Japan
 
20190320 AWS Black Belt Online Seminar Amazon EBS
20190320 AWS Black Belt Online Seminar Amazon EBS20190320 AWS Black Belt Online Seminar Amazon EBS
20190320 AWS Black Belt Online Seminar Amazon EBSAmazon Web Services Japan
 
SAPでクラウドはじめてみませんか? AWS and Azure
SAPでクラウドはじめてみませんか? AWS and AzureSAPでクラウドはじめてみませんか? AWS and Azure
SAPでクラウドはじめてみませんか? AWS and AzureMasaru Hiroki
 
AWS Black Belt Techシリーズ Amazon Relational Database Service (RDS)
AWS Black Belt Techシリーズ Amazon Relational Database Service (RDS)AWS Black Belt Techシリーズ Amazon Relational Database Service (RDS)
AWS Black Belt Techシリーズ Amazon Relational Database Service (RDS)Amazon Web Services Japan
 
AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)
AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)
AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)Amazon Web Services Japan
 
【JAWS-UG Sapporo】はじめてのAWSワークショップ 概説
【JAWS-UG Sapporo】はじめてのAWSワークショップ 概説【JAWS-UG Sapporo】はじめてのAWSワークショップ 概説
【JAWS-UG Sapporo】はじめてのAWSワークショップ 概説Machie Atarashi
 
[db tech showcase Tokyo 2016] D32: SPARCサーバ + Pure Storage DB仮想化のすべらない話 〜 Exa...
[db tech showcase Tokyo 2016] D32: SPARCサーバ + Pure Storage DB仮想化のすべらない話 〜 Exa...[db tech showcase Tokyo 2016] D32: SPARCサーバ + Pure Storage DB仮想化のすべらない話 〜 Exa...
[db tech showcase Tokyo 2016] D32: SPARCサーバ + Pure Storage DB仮想化のすべらない話 〜 Exa...Insight Technology, Inc.
 
20130309 windows on aws handson
20130309 windows on aws handson20130309 windows on aws handson
20130309 windows on aws handsonGenta Watanabe
 
Developers.IO 2017 MongoDB on AWS Advance
Developers.IO 2017 MongoDB on AWS AdvanceDevelopers.IO 2017 MongoDB on AWS Advance
Developers.IO 2017 MongoDB on AWS AdvanceShuji Kikuchi
 
AWS初心者向けWebinar RDBのAWSへの移行方法(Oracleを例に)
AWS初心者向けWebinar RDBのAWSへの移行方法(Oracleを例に)AWS初心者向けWebinar RDBのAWSへの移行方法(Oracleを例に)
AWS初心者向けWebinar RDBのAWSへの移行方法(Oracleを例に)Amazon Web Services Japan
 
[AWSマイスターシリーズ]AWS Storage Gateway
[AWSマイスターシリーズ]AWS Storage Gateway[AWSマイスターシリーズ]AWS Storage Gateway
[AWSマイスターシリーズ]AWS Storage GatewayAmazon Web Services Japan
 

Similar to EC2のストレージどう使う? -Instance Storageを理解して高速IOを上手に活用!- (20)

[AWSマイスターシリーズ] Instance Store & Elastic Block Store
[AWSマイスターシリーズ] Instance Store & Elastic Block Store[AWSマイスターシリーズ] Instance Store & Elastic Block Store
[AWSマイスターシリーズ] Instance Store & Elastic Block Store
 
20140315 jawsdays i2 instance io performance
20140315 jawsdays i2 instance io performance20140315 jawsdays i2 instance io performance
20140315 jawsdays i2 instance io performance
 
20180704 AWS Black Belt Online Seminar Amazon Elastic File System (Amazon EFS...
20180704 AWS Black Belt Online Seminar Amazon Elastic File System (Amazon EFS...20180704 AWS Black Belt Online Seminar Amazon Elastic File System (Amazon EFS...
20180704 AWS Black Belt Online Seminar Amazon Elastic File System (Amazon EFS...
 
20180704(20190520 Renewed) AWS Black Belt Online Seminar Amazon Elastic File ...
20180704(20190520 Renewed) AWS Black Belt Online Seminar Amazon Elastic File ...20180704(20190520 Renewed) AWS Black Belt Online Seminar Amazon Elastic File ...
20180704(20190520 Renewed) AWS Black Belt Online Seminar Amazon Elastic File ...
 
[db tech showcase Tokyo 2016] D24: データベース環境における検証結果から理解する失敗しないフラッシュ活用法 第三章 ~デ...
[db tech showcase Tokyo 2016] D24: データベース環境における検証結果から理解する失敗しないフラッシュ活用法 第三章 ~デ...[db tech showcase Tokyo 2016] D24: データベース環境における検証結果から理解する失敗しないフラッシュ活用法 第三章 ~デ...
[db tech showcase Tokyo 2016] D24: データベース環境における検証結果から理解する失敗しないフラッシュ活用法 第三章 ~デ...
 
[AWSマイスターシリーズ] Amazon Redshift
[AWSマイスターシリーズ] Amazon Redshift[AWSマイスターシリーズ] Amazon Redshift
[AWSマイスターシリーズ] Amazon Redshift
 
クラウドサービスAmazon EC2を活用した「SKIPaaS」構築事例
クラウドサービスAmazon EC2を活用した「SKIPaaS」構築事例クラウドサービスAmazon EC2を活用した「SKIPaaS」構築事例
クラウドサービスAmazon EC2を活用した「SKIPaaS」構築事例
 
[AWSマイスターシリーズ] Amazon ElastiCache
[AWSマイスターシリーズ] Amazon ElastiCache[AWSマイスターシリーズ] Amazon ElastiCache
[AWSマイスターシリーズ] Amazon ElastiCache
 
20190320 AWS Black Belt Online Seminar Amazon EBS
20190320 AWS Black Belt Online Seminar Amazon EBS20190320 AWS Black Belt Online Seminar Amazon EBS
20190320 AWS Black Belt Online Seminar Amazon EBS
 
SAPでクラウドはじめてみませんか? AWS and Azure
SAPでクラウドはじめてみませんか? AWS and AzureSAPでクラウドはじめてみませんか? AWS and Azure
SAPでクラウドはじめてみませんか? AWS and Azure
 
第19回「IBM Smarter Storage、ストレージに関するビジョンと展望」(2012/08/23 on しすなま!)
第19回「IBM Smarter Storage、ストレージに関するビジョンと展望」(2012/08/23 on しすなま!)第19回「IBM Smarter Storage、ストレージに関するビジョンと展望」(2012/08/23 on しすなま!)
第19回「IBM Smarter Storage、ストレージに関するビジョンと展望」(2012/08/23 on しすなま!)
 
AWS Black Belt Techシリーズ Amazon Relational Database Service (RDS)
AWS Black Belt Techシリーズ Amazon Relational Database Service (RDS)AWS Black Belt Techシリーズ Amazon Relational Database Service (RDS)
AWS Black Belt Techシリーズ Amazon Relational Database Service (RDS)
 
AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)
AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)
AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)
 
Scaling MongoDB on AWS
Scaling MongoDB on AWSScaling MongoDB on AWS
Scaling MongoDB on AWS
 
【JAWS-UG Sapporo】はじめてのAWSワークショップ 概説
【JAWS-UG Sapporo】はじめてのAWSワークショップ 概説【JAWS-UG Sapporo】はじめてのAWSワークショップ 概説
【JAWS-UG Sapporo】はじめてのAWSワークショップ 概説
 
[db tech showcase Tokyo 2016] D32: SPARCサーバ + Pure Storage DB仮想化のすべらない話 〜 Exa...
[db tech showcase Tokyo 2016] D32: SPARCサーバ + Pure Storage DB仮想化のすべらない話 〜 Exa...[db tech showcase Tokyo 2016] D32: SPARCサーバ + Pure Storage DB仮想化のすべらない話 〜 Exa...
[db tech showcase Tokyo 2016] D32: SPARCサーバ + Pure Storage DB仮想化のすべらない話 〜 Exa...
 
20130309 windows on aws handson
20130309 windows on aws handson20130309 windows on aws handson
20130309 windows on aws handson
 
Developers.IO 2017 MongoDB on AWS Advance
Developers.IO 2017 MongoDB on AWS AdvanceDevelopers.IO 2017 MongoDB on AWS Advance
Developers.IO 2017 MongoDB on AWS Advance
 
AWS初心者向けWebinar RDBのAWSへの移行方法(Oracleを例に)
AWS初心者向けWebinar RDBのAWSへの移行方法(Oracleを例に)AWS初心者向けWebinar RDBのAWSへの移行方法(Oracleを例に)
AWS初心者向けWebinar RDBのAWSへの移行方法(Oracleを例に)
 
[AWSマイスターシリーズ]AWS Storage Gateway
[AWSマイスターシリーズ]AWS Storage Gateway[AWSマイスターシリーズ]AWS Storage Gateway
[AWSマイスターシリーズ]AWS Storage Gateway
 

More from Yuta Imai

Node-RED on device to Apache NiFi on cloud, via SORACOM Canal, with no Internet
Node-RED on device to Apache NiFi on cloud, via SORACOM Canal, with no InternetNode-RED on device to Apache NiFi on cloud, via SORACOM Canal, with no Internet
Node-RED on device to Apache NiFi on cloud, via SORACOM Canal, with no InternetYuta Imai
 
HDP2.5 Updates
HDP2.5 UpdatesHDP2.5 Updates
HDP2.5 UpdatesYuta Imai
 
Deep Learning On Apache Spark
Deep Learning On Apache SparkDeep Learning On Apache Spark
Deep Learning On Apache SparkYuta Imai
 
Hadoop in adtech
Hadoop in adtechHadoop in adtech
Hadoop in adtechYuta Imai
 
Hadoop/Spark セルフサービス系の事例まとめ
Hadoop/Spark セルフサービス系の事例まとめHadoop/Spark セルフサービス系の事例まとめ
Hadoop/Spark セルフサービス系の事例まとめYuta Imai
 
IoTアプリケーションで利用するApache NiFi
IoTアプリケーションで利用するApache NiFiIoTアプリケーションで利用するApache NiFi
IoTアプリケーションで利用するApache NiFiYuta Imai
 
OLAP options on Hadoop
OLAP options on HadoopOLAP options on Hadoop
OLAP options on HadoopYuta Imai
 
Apache ambari
Apache ambariApache ambari
Apache ambariYuta Imai
 
Spark at Scale
Spark at ScaleSpark at Scale
Spark at ScaleYuta Imai
 
Dynamic Resource Allocation in Apache Spark
Dynamic Resource Allocation in Apache SparkDynamic Resource Allocation in Apache Spark
Dynamic Resource Allocation in Apache SparkYuta Imai
 
Apache Hiveの今とこれから - 2016
Apache Hiveの今とこれから - 2016Apache Hiveの今とこれから - 2016
Apache Hiveの今とこれから - 2016Yuta Imai
 
Hadoop最新事情とHortonworks Data Platform
Hadoop最新事情とHortonworks Data PlatformHadoop最新事情とHortonworks Data Platform
Hadoop最新事情とHortonworks Data PlatformYuta Imai
 
Benchmark and Metrics
Benchmark and MetricsBenchmark and Metrics
Benchmark and MetricsYuta Imai
 
Hadoop and Kerberos
Hadoop and KerberosHadoop and Kerberos
Hadoop and KerberosYuta Imai
 
Spark Streaming + Amazon Kinesis
Spark Streaming + Amazon KinesisSpark Streaming + Amazon Kinesis
Spark Streaming + Amazon KinesisYuta Imai
 
オンラインゲームの仕組みと工夫
オンラインゲームの仕組みと工夫オンラインゲームの仕組みと工夫
オンラインゲームの仕組みと工夫Yuta Imai
 
Amazon Machine Learning
Amazon Machine LearningAmazon Machine Learning
Amazon Machine LearningYuta Imai
 
Global Gaming On AWS
Global Gaming On AWSGlobal Gaming On AWS
Global Gaming On AWSYuta Imai
 
Digital marketing on AWS
Digital marketing on AWSDigital marketing on AWS
Digital marketing on AWSYuta Imai
 
クラウドネイティブなアーキテクチャでサクサク解析
クラウドネイティブなアーキテクチャでサクサク解析クラウドネイティブなアーキテクチャでサクサク解析
クラウドネイティブなアーキテクチャでサクサク解析Yuta Imai
 

More from Yuta Imai (20)

Node-RED on device to Apache NiFi on cloud, via SORACOM Canal, with no Internet
Node-RED on device to Apache NiFi on cloud, via SORACOM Canal, with no InternetNode-RED on device to Apache NiFi on cloud, via SORACOM Canal, with no Internet
Node-RED on device to Apache NiFi on cloud, via SORACOM Canal, with no Internet
 
HDP2.5 Updates
HDP2.5 UpdatesHDP2.5 Updates
HDP2.5 Updates
 
Deep Learning On Apache Spark
Deep Learning On Apache SparkDeep Learning On Apache Spark
Deep Learning On Apache Spark
 
Hadoop in adtech
Hadoop in adtechHadoop in adtech
Hadoop in adtech
 
Hadoop/Spark セルフサービス系の事例まとめ
Hadoop/Spark セルフサービス系の事例まとめHadoop/Spark セルフサービス系の事例まとめ
Hadoop/Spark セルフサービス系の事例まとめ
 
IoTアプリケーションで利用するApache NiFi
IoTアプリケーションで利用するApache NiFiIoTアプリケーションで利用するApache NiFi
IoTアプリケーションで利用するApache NiFi
 
OLAP options on Hadoop
OLAP options on HadoopOLAP options on Hadoop
OLAP options on Hadoop
 
Apache ambari
Apache ambariApache ambari
Apache ambari
 
Spark at Scale
Spark at ScaleSpark at Scale
Spark at Scale
 
Dynamic Resource Allocation in Apache Spark
Dynamic Resource Allocation in Apache SparkDynamic Resource Allocation in Apache Spark
Dynamic Resource Allocation in Apache Spark
 
Apache Hiveの今とこれから - 2016
Apache Hiveの今とこれから - 2016Apache Hiveの今とこれから - 2016
Apache Hiveの今とこれから - 2016
 
Hadoop最新事情とHortonworks Data Platform
Hadoop最新事情とHortonworks Data PlatformHadoop最新事情とHortonworks Data Platform
Hadoop最新事情とHortonworks Data Platform
 
Benchmark and Metrics
Benchmark and MetricsBenchmark and Metrics
Benchmark and Metrics
 
Hadoop and Kerberos
Hadoop and KerberosHadoop and Kerberos
Hadoop and Kerberos
 
Spark Streaming + Amazon Kinesis
Spark Streaming + Amazon KinesisSpark Streaming + Amazon Kinesis
Spark Streaming + Amazon Kinesis
 
オンラインゲームの仕組みと工夫
オンラインゲームの仕組みと工夫オンラインゲームの仕組みと工夫
オンラインゲームの仕組みと工夫
 
Amazon Machine Learning
Amazon Machine LearningAmazon Machine Learning
Amazon Machine Learning
 
Global Gaming On AWS
Global Gaming On AWSGlobal Gaming On AWS
Global Gaming On AWS
 
Digital marketing on AWS
Digital marketing on AWSDigital marketing on AWS
Digital marketing on AWS
 
クラウドネイティブなアーキテクチャでサクサク解析
クラウドネイティブなアーキテクチャでサクサク解析クラウドネイティブなアーキテクチャでサクサク解析
クラウドネイティブなアーキテクチャでサクサク解析
 

EC2のストレージどう使う? -Instance Storageを理解して高速IOを上手に活用!-

  • 1. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. EC2のストレージどう使う? Instance  Storageを理理解して ⾼高速IOを上⼿手に活⽤用! 2014年3月17日 アマゾンデータサービスジャパン株式会社 ソリューションアーキテクト 今井雄太
  • 2. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 自己紹介 •  名前 –  今井雄太(  yuimai@amazon.co.jp  ) •  仕事 –  ソリューションアーキテクト –  広告業界・アドテクノロジープレイヤーのお客様を担当し ています –  リスティング広告の配信システムの開発や媒体社で広告配 信システムまわりの開発・運⽤用を経験してきました。
  • 3. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. Agenda Instance  Storageとは? Instance  Storageの活⽤用シーン 1 2
  • 4. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. Agenda Instance  Storageとは? Instance  Storageの活⽤用シーン 1 2
  • 5. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 5 AWSのストレージサービス? 1.  Simple  Queue  Service 2.  Instance  Store(Ephemeral  Disk) 3.  Elastic  Block  Store(EBS) 4.  AWS  Storage  Gateway 5.  Amazon  Simple  Storage  Service(S3) 6.  Amazon  Glacier 7.  Amazon  ElastiCache 8.  Amazon  SimpleDB 9.  Amazon  DynamoDB 10. Amazon  Relational  Database  Service(RDS) 11. Amazon  Redshift 12. Amazon  Kinesis
  • 6. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. ブロックストレージのサービス 1.  Simple  Queue  Service 2.  Instance  Storage(Ephemeral  Disk) 3.  Elastic  Block  Store(EBS) 4.  AWS  Storage  Gateway 5.  Amazon  Simple  Storage  Service(S3) 6.  Amazon  Glacier 7.  Amazon  ElastiCache 8.  Amazon  SimpleDB 9.  Amazon  DynamoDB 10. Amazon  Relational  Database  Service(RDS) 11. Amazon  Redshift 12. Amazon  Kinesis EC2で利利⽤用可能な基本的な ブロックストレージ
  • 7. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. インスタンスストレージ? もしくは エフェメラルディスク?
  • 8. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. Instance  Storageとは •  特徴 –  EC2の物理筐体のローカルディスク –  EC2インスタンスタイプにより、サイズと個 数、HDD/SSD、が予め決まっている。 •  利点 –  無料! –  任意のファイルシステムが利用可能 –  ローカルディスクのため、ネットワークの影 響を受けにくい(レイテンシ・帯域) •  注意 –  インスタンスを停止(Stop)すると、データが 消去される ※[重要]再起動(Reboot)では消えない。 –  スナップショット機能はない –  別のEC2に付替えができない EC2 /dev/xvdg /dev/xvdf 揮発性 EC2へマウント
  • 9. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. EBS?
  • 10. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. Amazon Elastic Block Storeとは EBSとは、EC2に仮想外付けされる ブロックレベルのストレージサービス ※各コンピュートサービスのデータ基盤 "   サイズは1GB単位で〜~1TBまで "   サイズ/期間/IOで課⾦金金される "   各EC2インスタンスで、複数EBSを使える 詳細 "   データは永続的に保存される "   アベイラビリティゾーン(AZ)  に存在 "   他のEC2インスタンスに付け替え可能 "   バックアップから、EBSを作成可能 (他のAZに作成できる) Region Availability Zone - a EBS EBS EBS Availability Zone - b EBS EBS Amazon Simple Storage Service (S3) EBS Snapshot EC2 EC2
  • 11. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. EBSと Instance Storage
  • 12. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. EC2からの接続方法から見たストレージ分類 EBS Provisioned  IOPS EBS Standard S3 GlacierInstance Storage IOPSが指定 可能なEBS ブロックレベル のディスク WEB型の オブジェクト ストレージ アーカイブ 専⽤用ストレージ EC2インスタ ンスの⼀一時 ディスク 揮発性 ⾮非揮発性(永続化) コスト効果 (容量量あたり) 安価⾼高価 EC2 Storage Gateway 選定するEC2 により起動時 にマッピング アタッチ VTLStored Cached i-‐‑‒SCSI接続 無料料! (Instance 料料⾦金金内に 含まれる)
  • 13. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. Instance  StorageとEBS EC2 Instance Storage •  内蔵ディスク •  EC2と不可分 •  EC2をStop/Terminateするとクリアされる •  性能・容量はインスタンスタイプごとに規定 •  追加費用なし EBS •  ネットワークで接続 •  EC2とは独立管理 •  EC2をTerminateしてもEBSは保持可能 •  Volumeごとに性能・容量を定義可能 •  EBSの費用が発生 物理的には ネットワーク経由
  • 14. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. Instance  StorageとEBS EC2 Instance Storage •  内蔵ディスク •  EC2と不可分 •  EC2をStop/Terminateするとクリアされる •  性能・容量はインスタンスタイプごとに規定 •  追加費用なし EBS •  ネットワークで接続 •  EC2とは独立管理 •  EC2をTerminateしてもEBSは保持可能 •  Volumeごとに性能・容量を定義可能 •  EBSの費用が発生 物理的には ネットワーク経由
  • 15. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. AMIから見たストレージ分類 ・  通常はこちらを⽤用いる     (2009年年後半に追加) ・  EC2に停⽌止/終了了のオプ     ション有 ・  停⽌止しても、ファイル         システムは永続する EBS-‐‑‒ Backed  AMI AMI (Amazon  Machine  Image EC2のコピーをとりテンプレート化 することで、再利利⽤用可能 Instance  Store-‐‑‒ Backed  AMI •  EC2開始当初からある •  EC2に停止のオプションはない •  EC2を終了するとデータは消える 起動ディスク EBS 起動ディスク Instance Storage
  • 16. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. Instance Storage の適用箇所 OSブートディスク としての利用 アプリ データ D: システム データ C: EBS EC2 EBS Windows データ格納ディスク としての利利⽤用 Instance Storage E: データ計算⽤用 ⼀一時ディスク としての利利⽤用
  • 17. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. Instance Store の適用箇所 OSブートディスク としての利用 アプリ データ /dev/xvdf システム データ /dev/xvda1 EBS EC2 EBS Linux データ格納ディスク としての利利⽤用 Instance Storage /dev/xvdg データ計算⽤用 ⼀一時ディスク としての利利⽤用
  • 18. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. なぜいま Instance Storage の話なのか?
  • 19. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. Instance StorageにSSDを積んだイ ンスタンスが増えてきた •  EC2のタイプによって、選択できるInstance Storeは以下の通り。 Instance  Type Instance  Store  Volumes m1.small 1  x  160  GB† m1.medium 1  x  410  GB m1.large 2  x  420  GB  (840  GB) m1.xlarge 4  x  420  GB  (1680  GB) m2.xlarge 1  x  420  GB m2.2xlarge 1  x  850  GB m2.4xlarge 2  x  840  GB  (1680  GB) m3.medium 1  x  4  GB  SSD m3.large 1  x  32  GB  SSD m3.xlarge 2  x  40  GB  SSD  (80  GB) m3.2xlarge 2  x  80  GB  SSD  (160  GB) t1.micro None  (use  Amazon  EBS  volumes) c1.medium 1  x  350  GB† c1.xlarge 4  x  420  GB  (1680  GB) Instance  Type Instance  Store  Volumes c3.large 2  x  16  GB  SSD  (32  GB) c3.xlarge 2  x  40  GB  SSD  (80  GB) c3.2xlarge 2  x  80  GB  SSD  (160  GB) c3.4xlarge 2  x  160  GB  SSD  (320  GB) c3.8xlarge 2  x  320  GB  SSD  (640  GB) cc2.8xlarge 4  x  840  GB  (3360  GB) cg1.4xlarge 2  x  840  GB  (1680  GB) cr1.8xlarge 2  x  120  GB  SSD  (240  GB) hi1.4xlarge 2  x  1024  GB  SSD  (2048  GB) hs1.8xlarge 24  x  2048  GB  (49  TB) i2.xlarge 1  x  800  GB  SSD i2.2xlarge 2  x  800  GB  SSD  (1600  GB) i2.4xlarge 4  x  800  GB  SSD  (3200  GB) i2.8xlarge 8  x  800  GB  SSD  (6400  GB) ※2014年年1⽉月29⽇日時点
  • 20. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. I2 Instance での Instance Store Size EC Us vCP Us Memo ry (GiB) Instance Storage (GiB) EBS- Optimiz ed Read IOPS First Write IOPS Network Performance i2.xlarge 14 4 30.5 1 x 800 (SSD) Yes 35,000 35,000 Moderate i2.2xlarge 27 8 61 2 x 800 (SSD) Yes 75,000 75,000 High i2.4xlarge 53 16 122 4 x 800 (SSD) Yes 175,000 155,000 High i2.8xlarge 104 32 244 8 x 800 (SSD) - 365,000 315,000 10 Gigabit I2 インスタンス ・⾼高I/Oを実現するインスタンスタイプ ・⾼高速なSSD(Instance  Store)を内蔵 ・以下の条件を満たす場合、最⼤大IOPSが以下のように明⽰示されている     ・Linux  Kernel  3.8以上         ・ブロックサイズを4KBの倍数 ※2014年年1⽉月29⽇日時点
  • 21. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. C3 Instance での Instance Store C3 インスタンス ・⾼高CPUを実現するインスタンスタイプ ・⾼高速なSSD(Instance  Store)を選択可能 Size ECUs vCPUs Memory (GiB) Instance Storage(GiB) EBS- Optimized Network Performance c3.large 7 2 3.75 2 x 16 (SSD) - Moderate c3.xlarge 14 4 7.5 2 x 40 (SSD) Yes Moderate c3.2xlarge 28 8 15 2 x 80 (SSD) Yes High c3.4xlarge 55 16 30 2 x 160 (SSD) Yes High c3.8xlarge 108 32 60 2 x 320 (SSD) - 10 Gigabit ※2014年年1⽉月29⽇日時点
  • 22. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. M3 Instance でのInstance Store Size ECUs vCPUs Memory (GiB) Instance Storage (GiB) EBS- Optimized Network Performanc e m3.medium 3 1 3.75 1 x 4 (SSD) - Moderate m3.large 6.5 2 7 1 x 32 (SSD) - Moderate m3.xlarge 13 4 15 2 x 40 (SSD) Yes Moderate m3.2xlarge 26 8 30 2 x 80 (SSD) Yes High M3 インスタンス ・新型CPUを搭載したインスタンスタイプ ・従来はEBSのみ接続であったが、    ⾼高速なSSD(Instance  Store)を選択可能に! ※2014年年1⽉月29⽇日時点
  • 23. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. EBSでIOPSを 稼ぐには?
  • 24. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. •  Provisioned IOPS –  1ボリューム最大4000IOPSまで指定可能なオプ ション –  16KB以下のブロックサイズの場合、指定IOPSの 10%以内に収まる性能を、年間99.9%の時間で提 供 •  EBS-Optimized Instance –  EC2とEBS間のネットワークを最適化するオプ ション –  Provisioned IOPSと一緒に利用すると効果が高い EC2 EBSの性能向上と⼀一定化オプション EC2 Optimized P-IOPS
  • 25. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 価格⾯面でEBS(PIOPS)と⽐比較してみる •  Read, Writeの性能や可用性、コストなどを考 慮するとトータルとしてどちら良いか? Placement Group i2.8xlarge DRBD 32vCPU (104ECU) 244 GB Memory SSD 800GB x8 32vCPU (88ECU) 244 GB Memory PIOPS 4000 IOPS/800GB x8 cr1.8xlarge PIOPS 3年 Reserved Instance $ 4049.4 3年 Reserved Instance $ 5814.3
  • 26. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. EBSと比べると より安価に速い SSDも使える Instance Storage
  • 27. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. しかしEC2を Terminateしたり、 Stopするとデータ がなくなる
  • 28. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. いくつかの活用方 法についてのアイ デアをご紹介して いきます
  • 29. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. Agenda Instance  Storageとは? Instance  Storageの活⽤用シーン 1 2
  • 30. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. Instance Storageを使うべきなのは •  高IOPS、高帯域なストレージが必要 な場合 •  消えても良い一次データの置き場と して使う場合 •  ストレージ冗長化を準備できる場合 S3活かしたいメリット 考慮すべき制約
  • 31. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. Instance Storageの活用シーン •  アプリケーションコードやログの吐 き出し先として •  バッチ処理等の一時ストレージとし て •  ストレージやデータベースのディス クとして S3
  • 32. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. Instance Storageの活用シーン •  アプリケーションコードやログの吐 き出し先として •  バッチ処理等の一時ストレージとし て •  ストレージやデータベースのディス クとして S3
  • 33. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. アプリケーションコードやログの吐き出し先 として •  追加費⽤用が発⽣生しない •  ログ吐き出しを受ける⾼高速なIO S3活かしたいメリット 考慮すべき制約 •  インスタンスをStop/Terminateするとデータが なくなるので、ログはS3などに吐き出すように しておく
  • 34. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. アプリケーションコードやログの吐き出し先 として AMI
  • 35. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. アプリケーションコードやログの吐き出し先 として EC2 Instance Storage コード AMI
  • 36. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. アプリケーションコードやログの吐き出し先 として EC2 Instance Storage コード ログ AMI
  • 37. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. アプリケーションコードやログの吐き出し先 として EC2 Instance Storage コード ログ AMI コードはAMIやリポジトリ から取得する
  • 38. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. アプリケーションコードやログの吐き出し先 として EC2 Instance Storage コード ログ AMI コードはAMIやリポジトリ から取得する ログはS3に吐き出す
  • 39. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. Instance Storageの活用シーン •  アプリケーションコードやログの吐 き出し先として •  バッチ処理等の一時ストレージとし て •  ストレージやデータベースのディス クとして S3
  • 40. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. バッチ処理等の一時ディスクとして利用 •  ⾼高速・⾼高帯域なIOを必要とするようなバッチ処 理理に S3活かしたいメリット 考慮すべき制約 •  インスタンス障害時にはデータのサルベージは 諦める •  インスタンスの障害等が起こった時に、S3から 再度度データを取り出してリトライが可能なアー キテクチャに
  • 41. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. バッチ処理等の一時ディスクとして利用 EC2 Instance Storage Data
  • 42. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. バッチ処理等の一時ディスクとして利用 EC2 Instance Storage Data バッチ処理!
  • 43. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. バッチ処理等の一時ディスクとして利用 EC2 Instance Storage Data
  • 44. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. バッチ処理等の一時ディスクとして利用 EC2 Instance Storage EC2 Instance Storage
  • 45. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. バッチ処理等の一時ディスクとして利用 EC2 Instance Storage EC2 Instance Storage S3からデータを取得 してやり直す
  • 46. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. Instance Storageの活用シーン •  アプリケーションコードやログの吐 き出し先として •  バッチ処理等の一時ストレージとし て •  ストレージやデータベースのディス クとして S3
  • 47. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. ストレージやデータベースのディスクとして EC2 Instance Storage EC2EC2 EC2 Storage  software DBMS
  • 48. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. バッチ処理等の一時ディスクとして利用 •  ストレージ層に⾼高速なIOを! S3活かしたいメリット 考慮すべき制約 •  ストレージデバイス単位の障害への耐久性 •  EC2単位の障害への耐久性 •  これらの耐久性について、OSやDBMS、スト レージソフトウェアの層で対処する
  • 49. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. OS層での対策例: DRBD AZ-A AZ-B
  • 50. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. ストレージソフトウェア層での対策例: GlusterFS GlusterFS NFS GlusterFS NFS GlusterFS NFS GlusterFS NFS GlusterFS NFS GlusterFS NFS GlusterFS NFS GlusterFS NFS GlusterFS NFS GlusterFS NFS GlusterFS AZ-A AZ-B
  • 51. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. DBMS層での対策例:非同期レプリケーション トランザクションログ転送 Ephe meral Ephe meral Ephe meral Ephe meral Master Slave
  • 52. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. MongoDB  Sharded  Replica  sets 複数のAZに跨ってレプリカセットを配備することで高可用性を実現
  • 53. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. Leader Compute 1 Compute 2 Compute 3 Compute n A1 A2 A3 A3A2 A1 B3 B1 B2 B2B1 B3 Table A primary, secondary data Table B primary, secondary data A1 A2 B3 B1 DBMS層での対策例例:Redshift
  • 54. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. いろいろ ありますね・・・
  • 55. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. デザインパターン にしてみました
  • 56. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. デザインパターンにまとめてみる EC2にデータ永続化をさせないパターン EC2 Instance Storage Data •  コード •  ログ •  バッチ処理のデータ •  DBのSlave
  • 57. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. デザインパターンにまとめてみる データを⾮非同期レプリケーションするパターン EC2 Instance Storage EC2 Instance Storage Data Async
  • 58. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. デザインパターンにまとめてみる データを同期ミラーリングするパターン EC2 Instance Storage EC2 Instance Storage Data Data Sync
  • 59. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. デザインパターンにまとめてみる データを持ち合うパターン EC2 Instance Storage EC2 Instance Storage Data  A Data  B Data  B Data  A
  • 60. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 注意:RAIDについて RAIDのディスク冗⻑⾧長化は あくまでホスト内の耐久性向上施策 EC2 Instance Storage Instance Storage Sync •  EC2ホスト内でのデータ耐 久性を上げるという対策と してはあり •  ただし、EC2ホスト自体の TerminateやStopへの対策 にはならないので注意!
  • 61. まとめ "   SSDのエフェメラルディスクはAWS上では最速の性 能を発揮!如何に使いこなすかがキモ! "   構成次第では、エフェメラルも実用に耐えれる! "   更に上級を目指すAWSエンジニアはエフェメラル ディスクも選択肢に入れて、トータルな要件を踏まえ て最適なアーキテクトを! SSD
  • 62. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 63. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. •  ネットワーク冗長化 –  DRBD –  ClusterPro –  DataKeeper •  分散FS –  GlusterFS (OSS) –  OrangeFS –  Lustre –  Windows Distributed File System (DFS) –  HDFS 参考) OS層/ストレージソフトウェア層での対策群
  • 64. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. RDBMSの冗長化 (ログシッピング) –  MySQL + replication (+ MHA) –  PostgreSQL + streaming replication –  Oracle + Data Guard –  SQL Server + AlwaysOn 分散DB –  MySQL Cluster –  MongoDB –  Cassandra –  (Redshift) 参考)DBMS層での対策群