Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Google Cloud のネットワークとロードバランサ

Google Cloud のネットワークとロードバランサ

Google Cloudのネットワークとロードバランサーについて解説する資料です。九州インフラ交流勉強会(Kixs) Vol.003 ロードバランサーの夜 -LB Night Fever- で発表した資料です。

GoogleCloudPlatformJapan

February 10, 2017
Tweet

More Decks by GoogleCloudPlatformJapan

Other Decks in Technology

Transcript

  1. Confidential & Proprietary
    Google Cloud Platform 1
    Proprietary + Confidential
    Google Cloud Platform
    ネットワークとロードバランシング
    〜 九州インフラ交流勉強会(Kixs) Vol.003 〜
    Google Cloud, Customer Engineer, Masanori Satoh
    Google Cloud, カスタマーエンジニア, 佐藤聖規
    February 10, 2017

    View Slide

  2. Confidential & Proprietary
    Google Cloud Platform 2
    佐藤聖規 (Satoh, Masanori)
    カスタマーエンジニア
    ・Google Cloudのソリューションのご提案
    ・お客様プロジェクトへのアーキテクチャ・プロダクトの
    技術的なご支援
    ・DevOps (CI/CD、開発ツール、プラクティス)、Java 関

    View Slide

  3. Confidential & Proprietary
    Google Cloud Platform 3
    Cloud Platform is built on the same infrastructure that powers Google.

    View Slide

  4. Confidential & Proprietary
    Google Cloud Platform 4

    View Slide

  5. Confidential & Proprietary
    Google Cloud Platform 5
    世界を駆け巡るGoogle バックボーンネットワーク

    View Slide

  6. Building what’s next 6
    FASTER US - Japan - Taiwan

    View Slide

  7. Google Cloud ネットワーク
    現在のリージョンとゾーン数
    POP
    ネットワーク経路
    2017年にローンチ予定のリージョンと
    ゾーン数
    #
    # https://peering.google.com
    https://cloud.google.com/compute/docs/regions-zones/regions-zones
    2
    3
    シンガポール
    2
    サウスカロライナ
    バージニア北部
    ベルギー
    ロンドン
    東京
    台湾
    ムンバイ
    シドニー
    オレゴン
    アイオワ
    フランクフルト
    サンパウロ
    フィンランド
    3
    3
    3
    3
    3
    3
    2
    4
    3
    3
    3

    View Slide

  8. Cloud Virtual Network

    複数リージョンで
    単一のネットワーク
     -> トラフィックはGoogle
     のバックボーンを通過
    US
    192.168.0.0/16
    192.168.0.0/24
    JP
    192.168.1.0/24

    サブネット、VPN、
    ダイレクトピアリング構成
    も可能

    View Slide

  9. Confidential & Proprietary
    Google Cloud Platform 9
    ロードバランサー
    ● Google基盤の上に作られたスケーラビリティと堅牢性を備えたサービス
    ● 大きくわけて 2 種類のロードバランサーを提供
    ● HTTP (S) ロードバランサー
    ● TCP / UDP ネットワークロードバランサー

    View Slide

  10. Confidential & Proprietary
    Google Cloud Platform 10
    HTTPロードバランサー
    ● HTTP/HTTPSリクエストをコントロール
    ● ポート80/8080/443
    ● HTTPS (SSL) オフロード対応
    ● シングルIP
    ● 外部IPアドレス
    ● コンテンツベースのルーティング
    ● URIを見てバックエンドの振り分けプールを判断する
    ● ヘルスチェックメカニズム
    ● 事前ウォーミングの必要なし

    View Slide

  11. Confidential & Proprietary
    Google Cloud Platform 11
    HTTPロードバランサー:負荷分散アルゴリズム
    ● インスタンスの負荷ベース
    ● CPU 使用率
    ● 秒間リクエスト数(RPS)
    ● マルチリージョンで構成した場合はユーザに一番近いリージョンに転送される
    ● セッションアフィニティを設定可能

    View Slide

  12. Confidential & Proprietary
    Google Cloud Platform 12
    HTTPロードバランサーの使用例
    リージョン跨ぎの負荷分散 コンテンツベースルーティング

    View Slide

  13. Confidential & Proprietary
    Google Cloud Platform 13
    リージョン跨ぎの負荷分散
    HTTP(S) ロードバランサー リージョンまたぎ負荷分散
    1IPを最も近いリージョンのインスタンスグループに分散

    View Slide

  14. Confidential & Proprietary
    Google Cloud Platform 14
    HTTPロードバランサー:リージョン跨ぎの負荷分散

    View Slide

  15. Confidential & Proprietary
    Google Cloud Platform 15
    HTTPロードバランサー:コンテンツベースルーティング

    View Slide

  16. Confidential & Proprietary
    Google Cloud Platform 16
    バックエンドサービス
    ● バックエンドサービスは、1つもしくは複数のインスタンスグループで構成
    ● CPU使用率か、秒間リクエスト数(RPS) により負荷が分散される。
    ● 各バックエンドに対して、ヘルスチェックが行われる。
    ● インスタンスをインスタンスグループに追加することで、バックエンドサービスとし
    てアサインできる。
    ● インスタンスを直接バックエンドサービスに追加することはできない。

    View Slide

  17. Confidential & Proprietary
    Google Cloud Platform 17
    秒間100万のリクエストに対応
    Compute Engine Load Balancing hits 1 million requests per second!
    64インスタンスで
    負荷を生成
    200インスタンスで
    Webサーバを提供
    ロードバランサーの IP
    アドレスは一つだけ

    View Slide

  18. Confidential & Proprietary
    Google Cloud Platform 18
    従来型ロードバランサー
    region 2 region 3
    region 1
    従来型Load Balancer と Google HTTP (S) Load Balancerの違い
    VMs VMs VMs
    ... ... ...
    LB(s)
    DNS LB
    Google Cloud Platform のロードバランサー
    region 2 region 3
    region 1
    VMs VMs VMs
    :::::::::::::::::::::::::::::::::::::::::::::::
    HTTP LB
    DNS :)
    VMベースのロードバランサ:
    静的IP無し、遅いスケール、DNSに依存 (TTLの影響を受
    けるなど)、障害検知も遅い
    Google HTTP (S) Load Balancer:
    1つの Global IP アドレス、最短のホップ、 ウォーミングなし
    で拡張可能、DNS依存なし、障害検知
    X
    X
    X
    X
    X
    X
    X
    X
    X
    X
    1つのglobal IP:
    11.22.33.44

    View Slide

  19. Confidential & Proprietary
    Google Cloud Platform 19
    TCP / UDP ネットワークロードバランサー
    ● TCP/UDP (L4) パケットが対象
    ● バックエンドは、同一リージョン内のみ
    ● TCP proxyとして動作、リージョンをまたいだInstanceへ負荷分散 (Alpha)
    ● バックエンドのヘルスチェックはHTTP
    ● 事前ウォームアップの必要なし

    View Slide

  20. Confidential & Proprietary
    Google Cloud Platform 20
    負荷分散のアルゴリズム
    ● ハッシュベース
    ● ソースIP/ポートおよび宛先IP/ポートのハッシュを計算して宛先を決定
    ● 新しいコネクションは、別のインスタンスに分散される
    ● コネクションがクローズするまで、すべてのパケットは同じインスタンスに転送され

    ● セッションアフィニティを設定可能 (クライアントIPアドレス、クライアントIP + プロト
    コル)

    View Slide

  21. Confidential & Proprietary
    Google Cloud Platform 21
    TCP / UDP ネットワークロードバランサー
    ターゲットプール
    ヘルスチェック
    転送ルール
    インスタンス

    View Slide

  22. Confidential & Proprietary
    Google Cloud Platform 22
    Container Engine
    DataStore
    Load balancing
    Pokémon GOとGCP

    View Slide

  23. Confidential & Proprietary
    Google Cloud Platform 23
    Resarch at Google
    Maglev: A Fast and Reliable Software Network Load Balancer
    Googleを支えるテクノロジーシリーズ
    第1回 分散型ロードバランサーを実現するMaglev(パート1) (中井悦司)
    第2回 分散型ロードバランサーを実現するMaglev(パート2) (中井悦司)
    こちらもご覧ください

    View Slide

  24. Thank you
    福岡の皆様向けの
    イベント企画中!
    Coming Soon!

    View Slide