Contenu connexe
Similaire à Amazon redshiftのご紹介 (20)
Plus de Amazon Web Services Japan (20)
Amazon redshiftのご紹介
- 1. Amazon Redshiftの
ご紹介
2013.04.10
アマゾンデータサービスジャパン
株式会社
© 2013 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.
- 2. クラウドコンピューティングとは?
初期投資が不要 低額な利用価格 実際の使用分
のみ支払い
セルフサービスな スケールアップ、 ビジネススピード
インフラ ダウンが容易 の改善
Deploy
© 2013 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.
2
- 3. お客様のアプリケーション
IDE プラグイン Tools to
ライブラリ & SDKs Web インターフェース デプロイと自動化 Access
Java, PHP, .NET, Eclipse AWS Elastic Beanstalk Services
Python, Ruby Management Console Visual Studio AWS CloudFormation
ネットワーク&ルーティング
認証 & 請求 Amazon VPC Cross-
AWS IAM モニタリング スケーリング
Amazon Elastic LB Service
Identity Federation Amazon CloudWatch Auto Scale
Amazon Route 53 Features
Consolidated Billing AWS Direct Connect
コンテンツ配信 メッセージ メール配信 オンデマンド High-Level
分散処理
Amazon Amazon SNS Amazon ワークホース Building
Elastic MapReduce
CloudFront Amazon SQS SES Amazon Mechanical Turk
Blocks
ストレージ データベース
Amazon RDS
コンピュータ処理 Amazon S3 Amazon DynamoDB Low-Level
Amazon EC2 Amazon EBS Amazon SimpleDB
Amazon Glacier
Building
Amazon Elasticache
AWS StorageGateway Blocks
Amazon Redshift
AWS のグローバルなインフラ
Geographical Regions, Availability Zones, Points of Presence
© 2013 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. 3
- 4. 世界中のインフラを利用可能
リージョン
エッジローケーション
オレゴン
GovCloud
東京
ダブリン
バージニア
カリフォルニア
シドニー
シンガポール
サンパウロ
AWSを利用開始すれば、
世界8(+1)カ所のリージョン(地域)
17のアベイラビリティゾーン(データセンター群)
39のエッジロケーションを即座に利用可能
© 2013 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.
4
- 5. なぜマネージド・データベースなのか?
security
documentation, licensing planning scripting & coding
& training
5% 5%
performance tuning
install, upgrade, patch 40% 25%
and migrate
システムの
独自性を向上
backup & recovery,
data load & unload
© 2013 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
- 6. AWSの各種ビッグデータサービス
OLTP用フルマネージドのSQLデータベース
Amazon
RDS
サービス
高速、予測可能かつ拡張性の高いフルマ
Amazon
DynamoDB
ネージドNoSQLデータベースサービス
拡張性の高い、Hadoopのフルマネージド
Amazon
EMR
サービス
データウェアハウス用フルマネージド、
Redshift 超並列、カラムナ型(列指向型)データ
ベースサービス
© 2013 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. 6
- 7. 行型 vs. カラムナ型
DWHにはカラムナ型のデータベースが用いられる
行型 – トランザクション処理向き カラムナ型 – 分析処理向き
orderid name qty orderid name qty
1 Book 100 1 Book 100
2 Pen 50 2 Pen 50
… …
n Eraser 70 n Eraser 70
© 2013 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. 7
- 8. Redshiftの概要(1)
Data Warehouse as a Service – 分析用に整理された
大量の統合業務データの管理サービス(フルマネージド
サービス)
拡張性:数百GB~数PBまで拡張可能
高速:カラムナ型、超並列演算(MPP)
低額:インスタンスの従量課金(初期費用、ライセンス
費用不要)
© 2013 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
- 9. Redshiftの概要(2)
耐久性・可用性:S3へのバックアップ、ノード・ドライ
ブ故障への対応
連携:インプットデータはS3、DynamoDB、 EMR(予
定)と言ったAWSサービスとの連携
Postgres SQL JDBC/ODBC ドライバを使ったSQLクラ
イアント、BIツールをサポート
© 2013 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.
9
- 10. アーキテクチャー
BIツール
リーダーノードを経由して
クエリーを実行
JDBC/ODBC
各コンピュートノードで演算が
並列実行
リーダー SQL エンドポイント:
ノード • クエリーの並列化 各コンピュートノードにローカ
• 結果を生成
ルストレージを保持
10GigE Mesh
コンピュートノードはhs1.xlと
hs1.8xlから選択
コン コン コン
ピュート ピュート ピュート
ノード ノード ノード クエリー実行ノード
• “N” スケールアウト
を実現
• ローカルディスク
S3, DynamoDB, EMRとの統合
© 2013 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. 10
- 11. DWノード(コンピュートノード)
High Storage Extra Large (XL) DW Node:
• CPU: 2 virtual cores
• ECU: 4.4
• Memory: 15 GiB
• Storage: 3 HDD with 2 TB of local attached storage
• Network: Moderate
• Disk I/O: Moderate
• API: dw.hs1.xlarge
High Storage Eight Extra Large (8XL) DW Node:
• CPU: 16 virtual cores
• ECU: 35
• Memory: 120 GiB
• Storage: 24 HDD with 16 TB of local attached storage
• Network: 10 Gigabit Ethernet with support for cluster placement groups
• Disk I/O: Very High
• API: dw.hs1.8xlarge
© 2013 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. 11
- 12. 拡張性
数百GBから数PBまで拡張可能
Extra Large Node (XL) 8 Extra Large Node (8XL)
シングルノード (2TB) クラスター 2 – 100ノード(32TB – 1.6PB)
クラスター 2 – 32ノード(4TB – 64TB)
© 2013 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.
12
- 13. データの挿入
AWSの様々なサービスからデータのロードが可能
• S3からの各ノードへの並列データロード
• Amazon DynamoDBからの挿入
• Amazon EMR(予定)
• ロードの際に発生したエラーをトラッキング
スタースキーマやインデックスは不要
RDMSと比較し、x 2 – 4の圧縮率
• 複数の圧縮アルゴリズムの採用
• 自動圧縮機能
© 2013 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. 13
- 14. データの挿入
S3からデータのローディング
% psql --host=mydb.wetyuioop.us-east-1.redshift-
dev.amazonaws.com --port=5439 –username=admin --
dbname=mydb
mydb=# copy customer from 's3://data/customer.tbl.1'
credentials
'aws_access_key_id=XXXXYYYYZZZZ;aws_secret_acc
ess_key=abcdefghijklmn' delimiter '|';
© 2013 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. 14
- 15. クエリー
PostgreSQL JDBC/ODBCドライバ経由で標準的な
SQLを実行可能
対応BIツール
• ACTUATE • pentaho
• birst • PERVASIVE
• tableau
• JASPERSOFT
など
• MicroStrategy
リーダーノードに接続し、クエリー実行
• リーダーノードがクエリーを分配し、C++のコードを生成、
コンピュートノードで実行
• 使用可能な全コンピュートノードにおいてリーダーノードに
結果を返す
© 2013 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. 15
- 16. セキュリティ
データベース内のデータの暗号化
• ロード前のデータをS3に暗号化した状態で保持することも可能
クライアント・クラスタ間におけるSSL通信
クラスタ単位でのセキュリティ・グループの指定
• EC2 Security Group/CIDRの指定
VPC(Virtual Private Cloud)への対応
• 外部から隔離されたPrivateサブネット内にクラスタ構築が可能
© 2013 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. 16
- 17. 耐久性
全データは非同期でS3上にバックアップを生成
• データの挿入速度によってバックアップ取得時間は依存
• 増分バックアップをスナップショットにより取得可能
バックアップ頻度はユーザーが決定
• 自動・手動によるバックアップが可能
© 2013 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. 17
- 18. 可用性
データはプライマリとは、別ノードにセカンダリコピー
が保存される
ドライブの故障は透過的に処理
• リーダーノードは自動的にクエリーをセカンダリ・コピーに
ルート
• 冗長性を維持するために、データの再配置が実行される
単一・複数ノードの故障
• 新規ノードが割当てられるまで、クラスタは使用不可となる
• 自動的に他ノードからデータがコピーされる
• 複数ノード障害時にプライマリ/セカンダリのデータを損失した
場合、スナップショットからの復旧が必要となる
© 2013 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. 18
- 19. パイロットテスト
現行の本番環境
• 32 nodes, 128 CPUs, 4.2TB RAM, 1.6 PB disk
Amazon Redshift
• 20億行、6つの代表的なクエリー
• 2ノードクラスタ
クエリーの実行速度 > 10倍に向上
© 2013 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. 19
- 20. 金額
従量課金
ノード数 x 時間単価
コンピュートノードのみの課金(リーダーノードは課金されません)
hs1.xlarge hs1.8xlarge
コンピュー コンピュート TB当たりの TB当たりの
トノード ノード 時間単価 年単価
$/時 $/時
オンデマンド $0.850 $6.80 $0.425 $3,723
1年リザーブド $0.500 $4.00 $0.250 $2,190
3年リザーブド $0.228 $1.82 $0.114 $999
© 2013 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. 20
- 21. 21
© 2013 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.