Service Mesh (1) - Introduction

โ˜๏ธ ํดํด 5๊ธฐ ์‹œ์ฆŒ 1 ์Šคํ„ฐ๋”” : 90DaysOfDevOps ๋ ˆํฌ์ง€ํ† ๋ฆฌ๋ฅผ ๋ฐ”ํƒ•์œผ๋กœ ๊ณต๋ถ€ํ•ฉ๋‹ˆ๋‹ค!

 

๐Ÿงฉ 77 > Let's break down a Service Mesh

๐Ÿงฉ 79 > Comparing Different Service Meshes

 

90DaysOfDevOps/2023/day77.md at main ยท MichaelCade/90DaysOfDevOps

This repository started out as a learning in public project for myself and has now become a structured learning map for many in the community. We have 3 years under our belt covering all things Dev...

github.com

Day 77. Let's break down a Service Mesh

๐Ÿ“ ์„œ๋น„์Šค ๋ฉ”์‹œ ํƒ„์ƒ ๋ฐฐ๊ฒฝ

: ์„œ๋น„์Šค ๋ฉ”์‹œ๋Š” MSA๊ฐ€ ๊ตด๋ฆฐ ์Šค๋…ธ์šฐ๋ณผ.. โ„๏ธ

  • ๋ถ„์‚ฐ ํ™˜๊ฒฝ โ†’ ์ ์  ์ปจํ…Œ์ด๋„ˆ ๋‚ด๋ถ€์—์„œ ์‹คํ–‰๋˜๋Š” ์ž‘์€ ์ฝ”๋“œ ๋ฉ์–ด๋ฆฌ์˜ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜..
    • ๊ทผ๋ฐ ์„œ๋กœ ํ†ต์‹ ํ•  ์ˆ˜ ์žˆ์–ด์•ผ ํ•ด!!
      • ๊ทผ๋ฐ ๋˜ ์•”ํ˜ธํ™”๋˜๋ฉด์„œ ์Šน์ธ๋œ ๋ฐฉ์‹์ด์–ด์•ผํ•ด!!!!!
        • ์•„๋‹ˆ ๊ทผ๋ฐ ๋˜ ๋ˆ„๊ฐ€ ํ•˜๋‚˜ ์žฅ์•  ๋‚˜๋ฒ„๋ฆฌ๋ฉด ์–ด๋–ป๊ฒŒ ํ•ด๊ฒฐํ•˜์ง€? โ†’ ๋„ˆ๋ฌด ๋ณต์žกํ•ด!!!!
  • ๋„คํŠธ์›Œํฌ์˜ ์˜ˆ์ธก ๋ถˆ๊ฐ€๋Šฅ์„ฑ โ†’ ๋„ˆ๋ฌด ์˜์กดํ•ด์„œ๋Š” ์•ˆ ๋˜๋Š”๋ฐ, ๊ทธ๋ ‡๋‹ค๊ณ  ๊ณ„์† ์ฝ”๋“œ๋ฅผ ์ˆ˜์ •ํ•˜๊ธฐ์—” ๋˜โ€ฆ.
์„œ๋น„์Šค ๋ฉ”์‹œ
= ์„ธ๋ถ„ํ™”๋œ ํŠธ๋ž˜ํ”ฝ ์ œ์–ด, AuthN, AuthZ ๋ฐ observability๋ฅผ ์œ„ํ•œ ๊ณ„์ธต์„ ์ œ๊ณตํ•˜์—ฌ ์„œ๋น„์Šค ๊ฐ„ ํ†ต์‹ ์„ ์ฒ˜๋ฆฌํ•˜๋Š” ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ๋„คํŠธ์›Œํฌ ๊ณ„์ธต

 


๐Ÿ“ ์„œ๋น„์Šค ๋ฉ”์‹œ๊ฐ€ ํ•ด๊ฒฐํ•˜๋ ค๋Š” ๋ฌธ์ œ

  1. ๋งˆ์ดํฌ๋กœ ์„œ๋น„์Šค ํ™•์žฅํ•˜๋ฉฐ ์ ์‘ํ•ด์•ผ ํ•˜๋Š” ๋ถˆ์•ˆ์ •ํ•˜๊ณ  ๋ฐ”๋€Œ๋Š” ๋ณต์žกํ•œ ๋„คํŠธ์›Œํฌ
  2. RBAC, AuthZ, AuthN์ด ์ค‘์š”ํ•œ ํ™˜๊ฒฝ์—์„œ (๊ฑฐ์˜) zero-trust ๋ณด์žฅ
  3. ์•”ํ˜ธํ™”, ํŠธ๋ž˜ํ”ฝ ํ•„ํ„ฐ๋ง ๊ธฐ์ˆ  โ†’ ๋ฐ์ดํ„ฐ ์†์‹ค ๋ฐฉ์ง€ ์ ‘๊ทผ ๋ณด์žฅ
  4. ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ์ƒํƒœ์™€ ์š”์ฒญ ์ฒ˜๋ฆฌํ•˜๋Š” ํŠน์„ฑ ๊ฒฐ์ • ๋ฐ ์‹œ๊ฐํ™”
  5. ์„œ๋น„์Šค์˜ ๊ฐ€์šฉ์„ฑ๊ณผ ์•ˆ์ •์„ฑ ๋ณด์žฅ

๐Ÿ“ ์„œ๋น„์Šค ๋ฉ”์‹œ์˜ ์ฃผ์š” ๊ธฐ๋Šฅ

  • ์„œ๋น„์Šค์˜ ๋กœ๋“œ ๋ฐธ๋Ÿฐ์‹ฑ
  • ์—ฌ๋Ÿฌ ํ™˜๊ฒฝ ์‚ฌ์ด์—์„œ ์„œ๋น„์Šค ์ฐพ๊ธฐ
  • HTTP์™€ gRPC ์š”์ฒญ์˜ ๊ท ์ผํ•œ ํŠธ๋ž˜ํ”ฝ ์ œ์–ด์™€ ๋ผ์šฐํŒ…
  • ์š”์ฒญ ์žฌ์‹œ๋„ ์ž๋™ํ™”
  • ๋ณต์›๋ ฅ ์œ„ํ•œ ์‹คํŒจ ์ฃผ์ž… (Fault injection for resiliency)
  • ๋กœ๊น…, ๋ชจ๋‹ˆํ„ฐ๋ง, ๋ฉ”ํŠธ๋ฆญ
  • Peer AuthN, AuthZ
  • mTLS ์‚ฌ์šฉํ•œ ์„œ๋น„์Šคโ†” ์„œ๋น„์Šค ์•”ํ˜ธํ™”

๐Ÿ“ ์„œ๋น„์Šค ๋ฉ”์‹œ ๊ตฌ์„ฑ ์š”์†Œ

etc-image-0

  • Control plane : ๊ตฌ์„ฑ ๋ฐฐํฌ (configuration deploy)
  • Data Plane : ์‚ฌ์ด๋“œ์นด(sidecar)์™€ ๊ฒŒ์ดํŠธ์›จ์ด(gateway) ๋‘˜ ๋‹ค์— ๊ตฌํ˜„๋˜์–ด ์žˆ๋‹ค
  • k8s cluster์—์„œ ์œ„์น˜ํ•˜๊ณ  ์žˆ๋‹ค.

 

  • ๋™์ž‘ ๋ฐฉ์‹
    • Operator โ†’ ํŠธ๋ž˜ํ”ฝ ๋ผ์šฐํŒ…/๋ณด์•ˆ ์ •์ฑ… ์ ์šฉ
    • Control Plane โ†’ ๊ฒŒ์ดํŠธ์›จ์ด๋‚˜ ์‚ฌ์ด๋“œ์นด ํ”„๋ก์‹œ์— ๊ตฌ์„ฑ/์ •์ฑ… push
    • Gateway/Sidecar โ†’ ํŠธ๋ž˜ํ”ฝ ๊ทœ์น™ ์ ์šฉ
  • ์œ„ ์‚ฌ์ง„ ์˜ˆ์‹œ
    • ๋งจ ์ฒ˜์Œ Ingress ๊ฒŒ์ดํŠธ์›จ์ด๊ฐ€ ์™ธ๋ถ€ ์ธ๋ฐ”์šด๋“œ ์š”์ฒญ์„ ๋ฐ›๋Š”๋‹ค.
    • ์š”์ฒญ ๊ฒฝ๋กœ์˜ ์ฒซ ๋ฒˆ์งธ ์„œ๋น„์Šค์ธ Service A๋กœ ์ „๋‹ฌ
    • Service A๋Š” ์ด ์š”์ฒญ ์ฒ˜๋ฆฌํ•  ์‚ฌ์ด๋“œ์นด๊ฐ€ ์žˆ๊ณ , Control Plane์— ์›๊ฒฉ ์ธก์ •(telemetry) ๋ฐ์ดํ„ฐ๋ฅผ ์ „์†ก

๐Ÿ“ K8S๊ณผ ๊ด€๊ณ„

์„œ๋น„์Šค ๋ฉ”์‹œ๊ฐ€ ํ•ด ์ฃผ๋Š” ์ฑ…์ž„๋“คโ€ฆ

  • ์ธ์ฆ์„œ rotation ๋ฐ ๊ด€๋ฆฌ
  • ์„œ๋น„์Šค ๊ฐ„ ์•”ํ˜ธํ™”
  • Ingress์™€ ์„œ๋น„์Šคโ†”์„œ๋น„์Šค ๋ผ์šฐํŒ…์œผ๋กœ ์„ธ๋ถ„ํ™”๋œ ํŠธ๋ž˜ํ”ฝ ๋ผ์šฐํŒ…
  • ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ์ƒํƒœ์˜ ๊ฐ€์‹œ์„ฑ/๋ฉ”ํŠธ๋ฆญ

๐Ÿ“ ์„œ๋น„์Šค ๋ฉ”์‹œ ์ œํ’ˆ

  • Istio : Google, IBM, Lyft๊ฐ€ ๋งŒ๋“ค์–ด์„œ Solo.io์—์„œ ์œ ์ง€์ค‘ โœ…
 

Istio

A service mesh for observability, security in depth, and management that speeds deployment cycles.

istio.io


  • AppMesh : ECS, EKS, EC2 ๊ฐ™์€ AWS ์„œ๋น„์Šค์— ์ ์šฉ

etc-image-1

์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ๋„คํŠธ์›Œํ‚น ์„œ๋น„์Šค - AWS App Mesh - Amazon Web Services

 

์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ๋„คํŠธ์›Œํ‚น ์„œ๋น„์Šค - AWS App Mesh - Amazon Web Services

AWS App Mesh๋Š” ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ์ˆ˜์ค€ ๋„คํŠธ์›Œํ‚น์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ ์—ฌ๋Ÿฌ ์œ ํ˜•์˜ ์ปดํ“จํŒ… ์ธํ”„๋ผ์— ๊ฑธ์นœ ์„œ๋น„์Šค ๊ฐ„ ํ†ต์‹ ์„ ์ง€์›ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

aws.amazon.com

AWS App Mesh๋ž€? - AWS App Mesh

 

AWS App Mesh๋ž€? - AWS App Mesh

์ด ํŽ˜์ด์ง€์— ์ž‘์—…์ด ํ•„์š”ํ•˜๋‹ค๋Š” ์ ์„ ์•Œ๋ ค ์ฃผ์…”์„œ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค. ์‹ค๋ง์‹œ์ผœ ๋“œ๋ ค ์ฃ„์†กํ•ฉ๋‹ˆ๋‹ค. ์ž ๊น ์‹œ๊ฐ„์„ ๋‚ด์–ด ์„ค๋ช…์„œ๋ฅผ ํ–ฅ์ƒ์‹œํ‚ฌ ์ˆ˜ ์žˆ๋Š” ๋ฐฉ๋ฒ•์— ๋Œ€ํ•ด ๋ง์”€ํ•ด ์ฃผ์‹ญ์‹œ์˜ค.

docs.aws.amazon.com


  • Consul : Hashicorp์—์„œ ๋งŒ๋“  ๊ฒƒ

Consul by HashiCorp

 

Consul by HashiCorp

Consul is a service networking solution to automate network configurations, discover services, and enable secure connectivity across any cloud or runtime.

www.consul.io

Consul Documentation | Consul | HashiCorp Developer

 

Consul Documentation | Consul | HashiCorp Developer

Consul documentation provides reference material for all features and options available in Consul.

developer.hashicorp.com


  • Linkerd : Istio์˜ ๊ฐ€๋ฒผ์šด ๋ฒ„์ „ โœ…

etc-image-2

Overview

 

Overview

Linkerd is a service mesh for Kubernetes. It makes running services easier and safer by giving you runtime debugging, observability, reliability, and securityโ€”all without requiring any changes to your code. For a brief introduction to the service mesh mo

linkerd.io

The world's most advanced service mesh.

 

The world's most advanced service mesh.

Linkerd adds critical security, observability, and reliability to your Kubernetes stack, without any code changes.

linkerd.io


  • Cilium : eBPF๋ฅผ ํ™œ์šฉํ•˜์—ฌ Linux ์ปค๋„์„ ์‚ฌ์šฉํ•˜์—ฌ ํŒจํ‚ท ์ฒ˜๋ฆฌ๋ฅผ ์ตœ์ ํ™”ํ•˜๋Š” ์ปจํ…Œ์ด๋„ˆ ๋„คํŠธ์›Œํ‚น ์ธํ„ฐํŽ˜์ด์Šค

Cilium - Cloud Native, eBPF-based Networking, Observability, and Security

 

Cilium - Cloud Native, eBPF-based Networking, Observability, and Security

Cloud Native, eBPF-based Networking, Observability, and Security

cilium.io

Cilium Service Mesh

 

Cilium Service Mesh

Revolutionizing networking and simplify operations

cilium.io


Day 79. Comparing Different Service Meshes

๐Ÿ“ ์„œ๋น„์Šค ๋ฉ”์‹œ ์ข…๋ฅ˜๊ฐ€ ๋„ˆ๋ฌด ๋งŽ์•„์š”

Service Mesh Open Source or Proprietary Notes
Istio Open Source Widely adopted and abstracted
Linkerd Open Source Built by Buoyant
Consul Open Source Owned by Hashcorp, Cloud offering available
Kuma Open Source Maintained by Kong
Traefik Mesh Open Source Specialized Proxy
Open Service Mesh Open Source By Microsoft
Gloo Mesh Proprietary Built by http://solo.io/ ontop of Istio
AWS App Mesh Proprietary AWS specific services
OpenShift Service Mesh Proprietary Built by Redhad, based on Istio
Tanzu Service Mesh Proprietary SaaS based on Istio, built by VMware
Anthos Service Mesh Proprietary SaaS based on Istio, built by Google
Bouyant Cloud Proprietary SaaS based on Linkerd
Cilium Service Mesh Open Source Originally a CNI

๐Ÿ“ Istio vs Linkerd vs AppMesh vs Consul vs Cilium

Feature Istio Linkerd AppMesh Consul Cilium
Project Creators Google, Lyft, IBM, Solo Buoyant AWS Hashicorp Isovalent
Service Proxy Envoy, Rust-Proxy (experimental) Linkerd2-proxy Envoy Interchangeable, Envoy default Per-node Envoy
Ingress Capabilities Yes via the Istio Ingress-Gateway No; BYO Yes via AWS Envoy Cilium-Based Ingress
Traffic Management (Load Balancing, Traffic Split) Yes Yes Yes Yes Yes, but manual Envoy config required for traffic splits
Resiliency Capabilities (Circuit Breaking, Retries/Timeouts, Faults, Delays) Yes Yes, no Circuit Breaking or Delays Yes, No Fault or Delays Yes, No Fault or Delays Circuit Breaking, Retries and Timeouts require manual Envoy configuration, no other resiliency capabilities
Monitoring Access Logs, Kiali, Jaegar/Zikin, Grafana, Prometheus, LETS, OTEL LETS, Prometheus, Grafana, OTEL AWS X-RAY, and Cloud Watch provides these Datadog, Jaegar, Zipkin, OpenTracing, OTEL, Honeycomb Hubble, OTEL, Prometheus, Grafana
Security Capabilities (mTLS, External CA) Yes Yes Yes Yes Yes, with Wireguard
Getting Started Yes Yes Yes Yes Yes
Production Ready Yes Yes Yes Yes Yes
Key Features Sidecar and Sidecar-less, Wasm Extensibility, VM support, Multi-cloud Support, Data Plane extensions Simplistic and non-invasive Highly focused and tight integration into AWS Ecosystem Tight integration into Nomad and Hashicorp Ecosystem Usage of eBPF for enhanced packet processing, Cilium Control Plane used to manage Service Mesh, No sidecars
Limitations Complex, learning curve Strictly K8s, additional config for BYO Ingress Limited to just AWS services Storage tied to Consul and not K8s Not a complete Service Mesh, requires manual configuration
Protocol Support (TCP, HTTP 1.1 & 2, gRPC) Yes Yes Yes Yes Yes
Sidecar Modes Sidecar and Sidecar-less Sidecar Sidecar Sidecar No sidecar
CNI Redirection Istio CNI Plugin linkerd-cni ProxyConfiguration Required Consul CNI eBPF Kernel processing
Platform Support K8s and VMs K8s EC2, EKS, ECS, Fargate, K8s on EC2 K8s, Nomad, ECS, Lambda, VMs K8s, VMs, Nomad
Multi-cluster Mesh Yes Yes Yes, only AWS Yes Yes
Governance and Oversight Istio Community Linkered Community AWS Hashicorp Cilium Community

๐Ÿ“ ๊ฒฐ๋ก 

  • Istio : ํ”Œ๋žซํผ ์ง€์›, ์‚ฌ์šฉ์ž ์ •์˜ ๊ฐ€๋Šฅ์„ฑ, ํ™•์žฅ์„ฑ, ๋Œ€๋ถ€๋ถ„์˜ ํ”„๋กœ๋•์…˜ ์ง€์› โ†’ ์ตœ๊ณ ๋‹ค~
    • Linkerd : ๋” ๊ฐ€๋ฒผ์šด ๋ฒ„์ „
  • AppMesh : ๊ธฐ๋Šฅ์ด ๋งŽ์ง€๋งŒ AWS ์ƒํƒœ๊ณ„์—๋งŒ ์ ์šฉ
  • Consul : ๋‚ซ๋ฐท
  • Cilium CNI : eBPF ์‚ฌ์šฉํ•˜๊ณ  ๋„คํŠธ์›Œํ‚น ์Šคํƒ ํ™•์žฅโ€ฆ ๋ฒ‹ ์•„์ง ๊ฐˆ ๊ธธ ๋ฉ€์—ˆ๋‹ค

'๐Ÿ DevOps & Cloud > 90DaysOfDevOps' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

Service Mesh (6) - Ambient Mesh  (1) 2024.04.27
Service Mesh (5) - Security  (1) 2024.04.27
Service Mesh (4) - Observability  (0) 2024.04.26
Service Mesh (3) - Traffic Engineering  (0) 2024.04.26
Service Mesh (2) - Istio Getting-started  (0) 2024.04.26