Weitere ähnliche Inhalte
Ähnlich wie 20170803 bigdataevent (20)
Mehr von Makoto Uehara (15)
20170803 bigdataevent
- 2. 自己紹介
名前: 上原 誠 (うえはら まこと)
現職: AWS のテクニカルトレーナー
前職: 渋谷系のWeb系のインフラ系エンジニア
好きなHadoopエコシステム:ZooKeeper
好きなデータストア:Aerospike
- 8. © 2016 Amazon Web Services, Inc. and its affiliates. All rights reserved.
これはサーバーを使い続けることによる問題
※古い世代が残る、むやみに捨てられない
- 9. © 2016 Amazon Web Services, Inc. and its affiliates. All rights reserved.
クラウドだと
- 12. © 2016 Amazon Web Services, Inc. and its affiliates. All rights reserved.
CPU 10コア
メモリ 100GB
ディスク 500GB
例えばこういうジョブがあったら
- 13. © 2016 Amazon Web Services, Inc. and its affiliates. All rights reserved.
CPU 10コア
メモリ 100GB
ディスク 500GB
こんなクラスタになる
クラスタサイズ
CPU 10コア
メモリ 100GB
ディスク 500GB
ノード数 5台
1ノードサイズ
CPU 2コア
メモリ 20GB
ディスク 100GB
- 14. © 2016 Amazon Web Services, Inc. and its affiliates. All rights reserved.
CPU 10コア
メモリ 100GB
ディスク 500GB
ビッグデータなのでデータは増え続ける
線形に増えるのであれば大きな問題にはならない
- 15. © 2016 Amazon Web Services, Inc. and its affiliates. All rights reserved.
例えば既存ジョブのデータ量や処理負荷が2倍になったら
CPU 20コア
メモリ 200GB
ディスク 1000GB
- 16. © 2016 Amazon Web Services, Inc. and its affiliates. All rights reserved.
クラスタサイズも線形に2倍に増やす
これは別に問題ない
CPU 20コア
メモリ 200GB
ディスク 1000GB
クラスタサイズ
CPU 20コア
メモリ 200GB
ディスク 1000GB
ノード数 10台
1ノードサイズ
CPU 2コア
メモリ 20GB
ディスク 100GB
- 17. © 2016 Amazon Web Services, Inc. and its affiliates. All rights reserved.
CPU 10コア
メモリ 100GB
ディスク 500GB
問題は追加のジョブ要件があった場合
CPU 10コア
メモリ 100GB
ディスク 50GB
追加ジョブ
CPUメモリを多めに
使うがディスクは
あまりいらない
- 18. © 2016 Amazon Web Services, Inc. and its affiliates. All rights reserved.
ディスク容量が要件にマッチせずに1000GBまで増えている
さらに増設していくとさらに無駄も増えていく
※スペックが異なるヘテロな構成も可能だが設定が煩雑になる
クラスタサイズ
CPU 20コア
メモリ 200GB
ディスク 1000GB
ノード数 14台
ディスクは本来
550GBでいいのに
1000GBまで増えて
しまっている
CPU 10コア
メモリ 100GB
ディスク 500GB
CPU 10コア
メモリ 200GB
ディスク 50GB
MapReduceとHDFSが密結合なので仕方ない
- 19. © 2016 Amazon Web Services, Inc. and its affiliates. All rights reserved.
オンプレミスのHadoopクラスタは、
永続的に動き続けるクラスタにジョブを入れ込んでいく考え方
Job1 Job3
Job2
- 20. © 2016 Amazon Web Services, Inc. and its affiliates. All rights reserved.
クラウドだと
- 22. © 2016 Amazon Web Services, Inc. and its affiliates. All rights reserved.
それぞれのジョブにクラスタを立てる
Job3
Job2
Job1
- 23. © 2016 Amazon Web Services, Inc. and its affiliates. All rights reserved.
ジョブが終わったらジョブとともにクラスタも消す
クラスタを使い捨てる
使い捨て!
Job2
Job3
- 24. © 2016 Amazon Web Services, Inc. and its affiliates. All rights reserved.
そう、使い捨てこそがクラウドの
メリット
- 25. © 2016 Amazon Web Services, Inc. and its affiliates. All rights reserved.
AWSのEC2と同じ考え方
サイジングや
新しいツール検証
様々な試験
一時的な処理
- 26. © 2016 Amazon Web Services, Inc. and its affiliates. All rights reserved.
AWSのEC2と同じ考え方
消す
サイジングや
新しいツール検証
様々な試験
一時的な処理
終わったら
- 29. © 2016 Amazon Web Services, Inc. and its affiliates. All rights reserved.
それぞれのジョブにどのくらいのスペックのクラスタ
が適切かを事前に検証できる。なので最適なサイジングができる
使って、終わったら消
せるんだからバンバン
試せばいい
Job1
- 32. Job3
© 2016 Amazon Web Services, Inc. and its affiliates. All rights reserved.
唯一無二のクラスタをバージョンアップするから怖かった
(いや〜怖かった)
Job2
Job1
- 40. © 2016 Amazon Web Services, Inc. and its affiliates. All rights reserved.
そう、使い捨てこそがクラウドの
メリット(2回目)
- 42. © 2016 Amazon Web Services, Inc. and its affiliates. All rights reserved.
クラスタを使い捨ててもデータは残したい
データは残したい
Job2
Job3
- 43. © 2016 Amazon Web Services, Inc. and its affiliates. All rights reserved.
コンピューティング処理レイヤとストレージレイヤ
を分けることでデータを永続化
ストレージレイヤの分離
ストレージ
Job2
Job3
- 44. © 2016 Amazon Web Services, Inc. and its affiliates. All rights reserved.
コンピューティング処理レイヤとストレージレイヤを疎結合にする
それぞれのクラスタの永続データ
はストレージレイヤに保存
ストレージ
Job2
Job3
- 46. © 2016 Amazon Web Services, Inc. and its affiliates. All rights reserved.
オンプレだと
- 47. © 2016 Amazon Web Services, Inc. and its affiliates. All rights reserved.
無理
- 49. © 2016 Amazon Web Services, Inc. and its affiliates. All rights reserved.
・ストレージ製品の拡張限界。
・データセンターであれば契約ラック数の限界、またはフロアス
ペース限界。
・バックアップのためにクラスタ冗長化や別途DASなどを使う
(無理じゃないけど辛い)
- 50. © 2016 Amazon Web Services, Inc. and its affiliates. All rights reserved.
クラウドだと
- 51. © 2016 Amazon Web Services, Inc. and its affiliates. All rights reserved.
できる
- 52. © 2016 Amazon Web Services, Inc. and its affiliates. All rights reserved.
そう、S3
- 53. © 2016 Amazon Web Services, Inc. and its affiliates. All rights reserved.
S3の3つの特徴
1.丈夫 (耐久性99.999999999%)
2.容量無制限
3.Hadoopから接続しやすい (EMRFS、s3n、s3a)
- 54. © 2016 Amazon Web Services, Inc. and its affiliates. All rights reserved.
S3の3つの特徴
1.丈夫 (耐久性99.999999999%)
2.容量無制限
3.Hadoopから接続しやすい (EMRFS、s3n、s3a)
バックアップが必要ならクロスリージョンレ
プリケーションを活用できる
- 55. © 2016 Amazon Web Services, Inc. and its affiliates. All rights reserved.
S3の3つの特徴
1.丈夫 (耐久性99.999999999%)
2.容量無制限
3.Hadoopから接続しやすい (EMRFS、s3n、s3a)
あと安い
バックアップが必要ならクロスリージョンレ
プリケーションを活用できる
- 56. © 2016 Amazon Web Services, Inc. and its affiliates. All rights reserved.
コンピューティング処理レイヤとストレージレイヤを分ける
ストレージにS3
Job2
Job3
ストレージ
- 57. © 2016 Amazon Web Services, Inc. and its affiliates. All rights reserved.
コンピューティング処理レイヤとストレージレイヤを分ける
Hadoopクラスタに
EMR
コンピューティング処理
のHadoopクラスタにEMR
Job2
Job3
ストレージ
- 59. © 2016 Amazon Web Services, Inc. and its affiliates. All rights reserved.
一箇所のデータに対して
最適なデータ処理エンジンを使える
ストレージ
Athena
Redshift
- 60. ストレージ
© 2016 Amazon Web Services, Inc. and its affiliates. All rights reserved.
一箇所のデータに対して
最適なデータ処理エンジンを使える
Athena
Redshift
データレイク
- 62. © 2016 Amazon Web Services, Inc. and its affiliates. All rights reserved.
・データローカリティを活かした処理スループットの向上。
・起動し続けるのでクラスタではHDFSのデータは絶対。その司令
塔であるマスターノードはHA構成で死守する。
・Rack-awarenessでラック障害や距離を意識したデータ配置、
レプリケーション時のL2スイッチの上りの帯域の考慮、スイッチ
のDeepBuffer機能使ったりなど。
- 65. © 2016 Amazon Web Services, Inc. and its affiliates. All rights reserved.
クラウドらしさとは
・リソースをすぐに使えて不要になったら捨てる
・容量無制限のストレージ
・バージョンアップの気軽さ、本番スケールのテストのしやすさ
・ジャストサイズでプロビジョニング
・運用負荷軽減で本来やりたいことに注力
・データローカリティは下がる
・HDFSはテンポラリ
・NameNodeのメタデータ操作にビビらない。NameNodeも作って壊す
・他にもビッグデータ処理に役立つサービスとしてAthena、Kinesis、
Redshift、Snowball、QuickSightなどなど
:
- 66. © 2016 Amazon Web Services, Inc. and its affiliates. All rights reserved.
クラウドらしいベストプラクティス
・なるべくマネージドサービスを使って運用負荷軽減
・できるだけ一時クラスターを使う
・EC2スポットインスタンスの活用。「スポットフリート!」
・新しいインスタンスに移行してパフォーマンスを活用
・最適なサイジングの為のモニタリング
: