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

2019/07/11 ふくばねてす node-2 コンテナ移行におけるアレコレと使えるアレコレ(仮)

2019/07/11 ふくばねてす node-2 コンテナ移行におけるアレコレと使えるアレコレ(仮)

コンテナ移行時に使えるCNCFプロダクトを紹介します。

Transnano

July 11, 2019
Tweet

More Decks by Transnano

Other Decks in Technology

Transcript

  1. What’s Envoy • Cloud-native high-performance edge/middle/service proxy ◦ Written by

    C++ • Programmable L3/L4 and L7 proxy ◦ OSI参照モデル • A side-car proxy that provides the functionality you need to create microservices ◦ マイクロサービスが抱える問題をサイドカーとして解決 • Lyftによって開発された • Cloud Native Graduated ◦ 現在6つ、Kubernetes, Prometheus, Envoy, CoreDNS, containerd, Fluentd https://landscape.cncf.io/selected=envoy
  2. Feature • Dynamic Configuration ◦ Service Discovery Integration ◦ Routing

    Configuration ◦ Securing with SSL • Observability(可観測性) ◦ Log Parsing ◦ Metrics Aggregation ◦ Change Logging • Deployment Models ◦ Front Proxy ◦ Service Mesh ◦ Hosted Where You Are • Resilience(レジリエンス/弾力性) ◦ Circuit Breaking ◦ Automatic Retries ◦ Health Checks ◦ Backpressure • etc... Envoy単体または、サイドカーとして機能を提供
  3. Advantages of comparing Envoy with other systems nginx(web server) •

    Full HTTP/2 transparent proxy ◦ nginx only supports HTTP/2 for downstream connections. • Freely available advanced load balancing haproxy v1(LB) • HTTP/2 • Integration with a remote service discovery/global rate limiting services Amazon’s ELB(SD, LB) • Statistics and logging • Stability • Advanced load balancing Linkerd v1(RPC routing proxy) • Hot reload • HTTP/2 and gRPC • Low resource
  4. Automatic Retries / Rate Limits Automatic Retries Rate Limits https://medium.com/dm03514-tech-blog/sre-resiliency-bolt-on-sidecar-rate-limiting-wi

    th-envoy-sidecar-5381bd4a1137 https://developers.redhat.com/blog/2017/06/01/microservices-pat terns-with-envoy-proxy-part-ii-timeouts-and-retries/
  5. Traces 代表的なトレーサー • Jaeger • Zipkin ServiceA ServiceB ServiceC ServiceA

    ServiceB ServiceC 200ms 100ms 300ms サービスの関係や処理時間などがわかる Envoyを使うと、透過的なトレースが可能 https://github.com/jaegertracing/artwork https://zipkin.io/
  6. Security / Authentication Security • Terminating SSL / TLS •

    Forcing insecure traffic to HTTPS Authentication • RBAC
  7. Service Discovery Integration • 設定ファイルによる静的な設定 • xDS configuration API(RESTまたはgRPCのAPIによる設定) ◦

    Endpoint Discovery Service (EDS) API ◦ Cluster discovery service (CDS) API ◦ Route discovery service (RDS) API ◦ Listener discovery service (LDS) API ◦ Secret discovery service (SDS) API • Consul: Service Discovery
  8. Envoy Tips • CentOS 6/7ではそのままだと動かない!requires glibc >= 2.18 ◦ とは言っても最新の

    glibc_2.29とかではpythonのバージョンがあがりビルドできない ◦ ビルドはめちゃくちゃ時間かかります。 (私がC経験がないので長いと思ってしまう ) ◦ 2.18をリンクさせた人も 1年以上動作実績ありとのこと ◦ Amazon linuxもRH系なので同じこと • Ubuntuはそのまま動くぞ Running Envoy on CentOS 6/7 — Joey Bratton
  9. 用語 1. Downstream: App⇔Envoy間通信 2. Upstream: Envoyと外の通信 3. Cluster: EnvoyがUpstreamに接続するホストグループ

    4. Endpoint: Cluster内にあるメンバーの1つで、Upstreamのホスト 5. Listener: DownstreamがEnvoyに接続するための情報で、アドレス・ ポートやUNIXドメインソケットを指定 6. Route: URLやHTTPヘッダからどのClusterに接続するかの経路情報 App Envoy Service 1 2 3 4 5
  10. Appendix • Envoy (Envoy proxy)、Istio とは? - Qiita • "Building

    Fault Tolerant Microservices" というプレゼンがとても良かった話 - Qiita • Building Fault Tolerant Microservices • Envoyでサービスメッシュを作ろう - Qiita • EnvoyとAmazon ECS Service Discoveryを利用したgRPCの負荷分散 – PSYENCE:MEDIA • Running Envoy on CentOS 6/7 — Joey Bratton • How to Condemn Your Microservices Architecture to Fail Before You Even Start • Setting Up an Envoy Front Proxy on Amazon ECS • Microservices Patterns With Envoy Sidecar Proxy, Part I: Circuit Breaking • Circuit Breakerの効用をEnvoy + Gatlingで検証してみた • Envoy Proxyに入門した • cncf/trailmap: TrailMap files from the cncf/landscape repo • Ops meets NoOps • DevLOVE X 20190623 B CloudNative Sue • SRE: Resiliency: Bolt on Rate Limiting using Envoy - Dm03514 Tech Blog - Medium • Microservices Patterns With Envoy Proxy, Part II: Timeouts and Retries - Red Hat Developer Blog