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

KubeCon Recap for Istio and K8s network performance @Kubernetes Meetup #11

KubeCon Recap for Istio and K8s network performance @Kubernetes Meetup #11

Kubernetes Meetup #11 での発表内容です。
・Performance and Scale @Istio Service Mesh の話(KubeCon Recap)
・Istio を Production に入れる際に考慮する点、見るべき点
・VM と Kubernetes での Network Performance の違いについて

More Decks by Masaya Aoyama (@amsy810)

Other Decks in Technology

Transcript

  1. Masaya Aoyama CyberAgent adtech studio Based on 「Performance and Scale

    @Istio Service Mesh」 by Fawad Khaliq, VMware Inc, Laurent Demailly, Google & Surya V Duggirala, IBM KubeCon Recap for Istio @Kubernetes Meetup #11 MasayaAoyama @amsy810
  2. 連載「今こそ始めよう!Kubernetes 入門」 @ThinkIT Japan Container Days v18.04 Keynote 登壇 CKA (CKA-1700-0138-0100)、CKAD

    (CKAD-1800-0002-0100) OpenStack Active Technical Contributor Masaya Aoyama (@amsy810) Infrastructure Engineer
  3. Today’s Agenda 01 Overview Performance and Scale @Is1o Service Mesh

    02 Release Status and Phase Release system (alpha, beta and stable) and status of each feature 03 Latency with Container NW Container vs Legacy VM network latencies
  4. Index > What is Is1o? Is1o Performance and Scalability WG

    What is For1o? Is1o Release History Max Query per Seconds Latencies (400 qps) Overview
  5. Micro Service Archtecture App a App b App c Deployment

    a Deployment b Deployment c Pod 各 Applica1on から 数珠つなぎで呼び出される
  6. Istio Archtecture Pilot Mixer Istio-Auth Envoy App a Envoy App

    b Envoy App c Deployment a Deployment b Deployment c Pod Data Plane Control Plane Envoy (C++) 全てのトラフィックを中継し Service Mesh を構成する
  7. 動的ルート設定によるサービス間の柔軟なトラフィック制御が可能 例: A/B Tes1ng、Canary Release、Blue-Green 1 Intelligent Routing and Load

    Balancing ネットワーク障害やカスケード障害からアプリケーションを保護 例: Timeout、Retry、Connec1on Limit、Circuit Breaker 2 Resilience across Languages and Platforms サービス間の依存関係やトラフィックの性質・流れをモニタリングし、 分散トレース問題を素早く特定 3 In-depth Telemetry and Reporting サービス間の相互作用にポリシーを適用し、 全体に対して公正かつ確実なポリシー反映を行う 4 Fleet Wide Policy Enforcement What is Istio? クラスタ内の Service 間認証、暗号化通信をサポート 5 Secure service-to-service authentication
  8. Istio Performance and Scalability Working Group Benchmark  様々な方法・環境でベンチマークを実施(Fortio, Blueperf, etc)

     詳しくは http://sched.co/Dquf WG Meetings: Wednesdays 9:30-10:00 PST – Weekly Forum: istio-perf@ Ref: https://github.com/istio/community/blob/master/WORKING- GROUPS.md#performance-and-scalability
  9. •  外部依存性なし •  3 Mbyte Docker Image / CLI • 

    Httpbin に類似した機能を持つ 1 Lightweight •  単一ノードの自己テストで 400,000 qps 2 High Performance •  簡単なグラフ作成 •  データの可視化 •  探索 3 Visualization •  Latency をもたせた状態でQPSを制御可能 4 QPS What is Fortio?
  10. Istio Release History // based on GithHub releases 0.3.0 2017-11

    0.4.0 2017-12 0.5.1 2018-01 0.6.0 2018-02 0.7.1 (latest) 2018-03
  11. Istio Release History // based on GithHub releases 0.3.0 2017-11

    0.4.0 2017-12 0.5.1 2018-01 0.6.0 2018-02 0.7.1 (latest) 2018-03
  12. Max Query per Seconds Latencies (400 qps) 0.5.1 0.6.0 0.7.1

    Max Query per Seconds (qps) [QPS] 0.5.1: 700 qps 0.6.0: 1000 qps 0.7.1: 1700 qps p99 p90
  13. Max Query per Seconds Latencies (400 qps) 0.5.1 0.6.0 0.7.1

    Latencies (400 qps) [Median (p50)] 0.5.1: 34 ms 0.6.0: 19 ms 0.7.1: 14 ms p99 p90 p75
  14. •  Alpha: デモ用途、一部制限有り •  Beta: プロダクション利用可能 •  Stable: 信頼性の高い状態 1

    Purpose •  Alpha: 下位互換性の保証なし •  Beta: APIのバージョン管理 •  Stable: 高信頼、下位互換性の維持 2 API •  Alpha: 定量化や保証はなし •  Beta: 定量化や保証はなし •  Stable: 定量化され、記録・保証される 3 Performance •  Alpha: なし •  Beta: 3 ヶ月の期間 •  Stable: 1 年間の期間 4 Deprecation Policy Feature Phase Definition Ref. h`ps://is1o.io/about/feature-stages.html
  15. Istio Features Traffic Management state of Protocols: HTTP 1.1 Protocols:

    HTTP 2.0 Protocols: gRPC Core state of Observability Prometheus Integra1on Statsd Integra1on Existing features and their current phases Security state of Deny Checker K8s Service Creden1al Distribu1on Pluggable Key/Cert Support for Is1o CA Protocols: TCP Protocols: WebSocket Rou1ng Rules: Retry Rou1ng Rules: Timeout Rou1ng Rules: Circuit Break Rou1ng Rules: Header Rewrite Rou1ng Rules: Traffic Splieng Ingress TLS K8s: Envoy Installa1on and Traffic Intercep1on K8s: Is1o Control Plane Installa1on Pillot Integra1on into K8s Service Discovery A`ribute Expression Language Mixer Adapter Authoring Model K8s: Is1o Control Pnane Upgrade Basic Config Resource Valida1on state of Local Logging Service Dashboard in Grafana Stackdriver Integra1on Service Graph Stable Beta Alpha Ref. h`ps://is1o.io/about/feature-stages.html
  16. Latency with Container NW Index > What is Is1o? Is1o

    Performance and Scalability WG What is For1o?_ Is1o Release History Max Query per Seconds Latencies (400 qps)
  17. // latency (Nginx on VM) Nginx on VM 従来と同じ方法で VM

    上に Nginx プロセスを立ち上げた場合 Node Node LoadBalancer ConnecDons 50 percenDle 99 percenDle Through put 100 conn 3 ms 7 ms 27000 rps 1000 conn 30 ms 70 ms 32900 rps 10000 conn 384 ms 460 ms 25700 rps Case 1 External Network
  18. Kubernetes Node Kubernetes Node LoadBalancer (1) Traffic が LoadBalancer に届き、

    各 Kubernetes Node 宛に負荷分散される Nginx on K8s Case 2 Kubernetes 上に Nginx Container を含む Pod を作成し、”type: LoadBalancer” Service を作成した場合 Pod Network External Network
  19. Kubernetes Node Kubernetes Node Pod Network External Network LoadBalancer (2)

    Node 上の iptables* で 各 Kubernetes Node 宛に負荷分散される Nginx on K8s Ref. h`ps://kubernetes.io/docs/concepts/services-networking/service/ 01 Userspace 上の Process が処理 userspace 02 Iptables が処理 kube-proxy は iptables の entry を書き換え iptables (K8s v1.1~, v1.2~ default) 03 ivps が処理、LoadBalancing 性能の向上 Kernel の rebuild が必要 (hash table size) ipvs (k8s v1.8~) * Proxy-mode の選択肢 Case 2 Kubernetes 上に Nginx Container を含む Pod を作成し、”type: LoadBalancer” Service を作成した場合
  20. ConnecDons 50 percenDle 99 percenDle Through put 100 conn 6

    ms (+ 100 %) 7 ms (+ 0 %) 18000 rps (- 33 %) 1000 conn 61ms (+ 103 %) 69 ms (- 1.4 %) 16700 rps (- 49 %) 10000 conn 641 ms (+ 66 %) 666 ms (+ 44 %) 15700 rps (- 39 %) // latency (Nginx on K8s) [Compare with Nginx on VM] Nginx on K8s Kubernetes Node Kubernetes Node LoadBalancer Case 2 Pod Network External Network Kubernetes 上に Nginx Container を含む Pod を作成し、”type: LoadBalancer” Service を作成した場合
  21. 01 02 Istio Latency v.0.5.0 > v.0.7.1 Throughput が +

    142 % Latency (p50) が - 59 % そろそろ Beta feature は 安定してきている? K8s Latency Latency Overhead VM < K8s Proxy-mode: ipvs による 性能向上に期待 軽微な Overhead はある Conclusion of my presentations Today’s talk is helpful and useful for us?
  22. Cloud Native for the future アプリケーション基盤としての Kubernetes    従来通りコンテナを載せて Scalable

    なアプリケーションの実行環境 フレームワークとしての Kubernetes   Kubernetes の Custom Resource Definition を使った開発   Custom Controller による API Resource のライフサイクル管理   watch, list, add, delete, apply, leader-election 機能の利用 プラットフォームとしての Kubernetes   マネージドサービス基盤としての Kubernetes   Vitess, Rook, NATS, Kubeflow では、create することで各 XaaS が立ち上がる
  23. Cloud Native に近しい技術や CNCF がホストするプロジェクトについて共有し合う会です! 昨今はコンテナ関係のエコシステムが大量に増えてきましたが、 それらの技術検証結果などを発表しあう場として利用していきたいと思っており、仲間を募集しております。 1. NATS on

    Kubernetesの 良いところ (仮) 2018 年 3 月に CNCF の incubator に仲間入 りを果たした、「Cloud Native なアプリケーション 向けのハイパフォーマンス Messaging システ ム」を提供する NATS について話します。 2. Fluent Bit vs Fluentd 1.x 「Fluentd 1.x vs Fluentd」および「Fluent Bit vs Fluentd 1.x」 の性能や利用可能なプラグインの 比較について話します。 3. サービスメッシュと仲間たち 
 〜Istio vs Conduit vs etc〜 様々な領域で話題になっている ServiceMesh。 Istio や Conduit など、様々な選択肢があります が、それぞれの特徴やできることについて話しま す。