Contenu connexe
Similaire à [よくわかるクラウドデータベース] CassandraからAmazon DynamoDBへの移行事例
Similaire à [よくわかるクラウドデータベース] CassandraからAmazon DynamoDBへの移行事例 (20)
Plus de Amazon Web Services Japan
Plus de Amazon Web Services Japan (20)
[よくわかるクラウドデータベース] CassandraからAmazon DynamoDBへの移行事例
- 2. 自己紹介
大谷 晋平
• ohtani@amazon.com
• @shot6
アマゾンデータサービスジャパン所属
• 技術本部エマージングソリューション部
• 部長/ソリューションアーキテクト
好きな言葉
• Less is More
好きなAWSサービス
• S3
• DynamoDB
2
© 2012 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. DynamoDBとは
4
© 2012 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. DynamoDBとは
NoSQL as a Service
超高速・予測可能な一貫したパフォーマンス
シームレスなスケーラビリティ、そして低コスト
運用管理必要なし
低レイテンシ、SSD
プロビジョンスループット
無限に使えるストレージ
5
© 2012 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. DynamoDBの生い立ち
RDBMSの課題に対処するため、Amazon Dynamo
(DynamoDBの先祖)を設計・開発
Amazon Dynamoの特長
• ベネフィット
• 結果整合性モデル採用による可用性向上
• HWを追加する毎に性能が向上するスケーラビリティ
• クエリーモデルが単純なためパフォーマンスが予測できる
• 妥協点
• 強い整合性モデルではない
• スケールアップの際にHWの追加やクラスタのリバランスが必要
• 開発者がDB管理作業から開放されるわけではない
”Amazon S3のようなサービスとして使いたい”という声
7
© 2012 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. サイバーエリアリサーチ様について
© 2012 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. サイバーエリアリサーチ様について
16
© 2012 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. 現状のSURFPOINTの課題
システムへの高負荷 / イマイチな安定性
• データ取得ミス / データ更新への影響
• Cassandra 6ノードを利用
焼津IDC~お客様システム間のレイテンシ
システム拡張におけるコスト面での懸念
→AWSが検討の材料に上がる
20
© 2012 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.
- 21. Cassandraの構成
Cassandraとは
• NoSQLのオープンソース製品
• USではメジャーな製品で、スケーラビリティと高可用性が特徴
構成と現状
• オンプレ 6ノード、各ノード2TBx4のRAID0
• DBは実効3TB程度、42億件のIPアドレス情報
• リクエストには12.2KBのXMLを返す。
課題
• 参照負荷に耐えられていない
• 時々Keyに対してValueを返さないなど、暴れがち。
→運用管理に大きな負荷がかかっていた
21
© 2012 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.
- 25. 属性情報テーブルの分割
・ 42億レコード
・ 36万レコード
・ 100万レコード
・ 500GB
・ 300MB
・ 600MB
25
© 2012 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.
25
- 26. テスト1
Amazon EC2
c1.xlarge
AmazonLinux
NginX + php-fpm + APC
PHP + AWS sdk
Client
Readスループット=80
Writeスループット=10
DynamoDB
26
© 2012 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.
26
- 27. テスト2
管理サーバー
EC2 ( c1.xlarge )
AmazonLinux
NginX + php-fpm
PHP + AWS sdk
XML出力
監視
データread/write
お客様システム
お客様システム
DynamoDB
27
© 2012 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.
27
- 28. チューニング(1)
Amazon EC2
c1.xlarge
AmazonLinux
NginX + php-fpm + APC
PHP + AWS sdk
Client
https(SSL接続)で通信している
→httpで通信するよう変更
Readスループット=80
Writeスループット=10
DynamoDB
28
© 2012 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.
28
- 29. チューニング(2)
1183rps : C1.xlarge, Apache, 非公式sdk
731rps : C1.medium, NginX, 非公式sdk
419rps : C1.xlarge, Apache, 公式sdk, preloader有効
132rps : C1.medium, Apache, 公式sdk, preloader有効
131rps : C1.medium, NginX, 公式sdk, preloader有効
109rps : C1.medium, Apache, 公式sdk, preloader適用前
95rps : C1.medium, NginX, 公式sdk, preloader適用前
29
© 2012 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.
- 34. オートスケーリングの実行例
34
© 2012 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.
34
- 35. 自動的なスケーリングの実行例
35
© 2012 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.
35
- 36. バースト的トラフィックが発生した時
36
© 2012 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.
36
- 39. 今後の構成
管理用EC2
お客様EC2
お客様
Server
IP
地域
組織 天気 株価 ・・・
39
© 2012 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.
- 40. コスト比較
40
© 2012 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.
- 41. 旧Cassandraシステム構築時にかかった費用
開発期間:約18カ月
• 本番サーバースペック選定のための実証テスト
• サーバー機の価格交渉・ 200v電源は確保できるのか?
• などなど
初期コスト:ざっと数100万円
• Cassandraノード用x86サーバー ×6台
ランニングコスト:月額 数10万円
• IDC費用(設置場所+電源+ネットワーク)
• 加えて、ファイヤーウォールやロードバランサーのコスト
41
© 2012 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.
- 45. まとめ
45
© 2012 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.
- 47. ご静聴ありがとうございました!
47
© 2012 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.