Introduction

๋Œ€ํ‘œ์  Service Mesh ์ œํ’ˆ์ธ Istio์— ๋Œ€ํ•œ overview๋กœ Kubernetes๋ฅผ ๋ฐฐ๊ฒฝ์œผ๋กœ ์„ค๋ช…ํ•œ๋‹ค.

Istio overview: Architecture, Traffic Management, Istio overview: Observability ๋ฐ Istio overview: Security ์— ์ด์–ด, ๋งˆ์ง€๋ง‰์œผ๋กœ Istio์˜ ํ™•์žฅ์„ฑ๊ณผ ํƒ€ Service Mesh ์ œํ’ˆ์— ๋Œ€ํ•ด ๋…ผํ•œ๋‹ค.

์ฐธ์กฐํ•œ ๋ฌธ์„œ๋Š” ๊ธ€ ๋‚ด๋ถ€ ๋ฐ References ์— ๋‹ฌ์•˜๋‹ค.

Summary

  • Istio/Envoy์—๋Š” ๋‹ค์ˆ˜์˜ filter์˜ ์—ฐ๊ฒฐ๋กœ ์ด๋ฃจ์–ด์ง„ Filter chain์ด ์žˆ์–ด, ๊ฐ filter๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ request / response์— ๋Œ€ํ•œ ๋‹ค์–‘ํ•œ ๋ถ€๊ฐ€์  action์„ ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ๋‹ค.
  • Envoy์—๋Š” ๋‹ค์ˆ˜์˜ configurable Built-In filters๊ฐ€ ์žˆ์–ด ๋ณ„๋„ ํ”„๋กœ๊ทธ๋ž˜๋ฐ ์—†์ด๋„ ๋‹ค์–‘ํ•œ ์š”๊ตฌ์— ๋Œ€์‘์ด ๊ฐ€๋Šฅํ•˜๋‹ค.
  • Lua์™€ WebAssembly(WASM)์„ ์‚ฌ์šฉํ•˜์—ฌ Built-In filters ์ด์™ธ์˜ ์‚ฌ์šฉ์ž ์ •์˜ ๊ธฐ๋Šฅ์„ ์‚ฝ์ž… ๊ฐ€๋Šฅํ•˜๋‹ค.
  • Istio ์ด์™ธ์—๋„ Cilium, Linkerd, Kuma, Consul ๋“ฑ Service Mesh ์ œํ’ˆ์€ ๋‹ค์–‘ํ•˜๋‹ค.

Istio์˜ ํ™•์žฅ์„ฑ์— ๊ด€ํ•˜์—ฌ

Istio์—์„œ์˜ ํ™•์žฅ์€ Istio Proxy์— ๋Œ€ํ•œ ํ™•์žฅ์„ ์˜๋ฏธํ•˜๋Š”๋ฐ, ๋Œ€๋ถ€๋ถ„์˜ Istio proxy ํƒ€ ๊ธฐ๋Šฅ๊ณผ ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ Envoy์— ํฌ๊ฒŒ ์˜์กดํ•œ๋‹ค. Istio์˜ ์—ญํ• ์€ ์‚ฌ์‹ค ์ƒ Envoy ๊ธฐ๋Šฅ์— ๋Œ€ํ•œ interfaces ์ œ๊ณต์œผ๋กœ, EnvoyFilter ๋ฐ WasmPlugin Istio resource๊ฐ€ ์ด๋“ค interface์— ํ•ด๋‹นํ•œ๋‹ค.

Envoy FilterCustomizing Envoy configuration generated by Istio.
https://istio.io/latest/docs/reference/config/networking/envoy-filter/

Envoy filter chain

Life of a Request โ€” envoy 1.31.0-dev-b8d86c documentationBelow we describe the events in the life of a request passing through an Envoy proxy. We first describe how Envoy fits into the request path for a request and then the internal events that take place following the arrival of a request at the Envoy proxy from downstream. We follow the request until the corresponding dispatch upstream and the response path.
https://www.envoyproxy.io/docs/envoy/latest/intro/life_of_a_request

Istio์˜ feature ํ™•์žฅ์€ Envoy filter๋ฅผ ํ†ตํ•ด ์ด๋ฃจ์–ด์ง„๋‹ค. Envoy์—๋Š” ๋‹ค์ˆ˜์˜ filter์˜ ์—ฐ๊ฒฐ๋กœ ์ด๋ฃจ์–ด์ง„ Filter chain์ด ์žˆ์–ด, ๊ฐ filter๋Š” request / response์— ๋Œ€ํ•œ ๋ณ€ํ™˜์„ ๋‹ด๋‹นํ•œ๋‹ค.

TLS traffic์— ๋Œ€ํ•œ Envoy filter chain์˜ ๊ตฌ์กฐ. Envoy filter chain ์—์„œ ์ž์„ธํžˆ ๋…ผํ•œ๋‹ค.

TLS traffic์— ๋Œ€ํ•œ Envoy filter chain์˜ ๊ตฌ์กฐ. Envoy filter chain ์—์„œ ์ž์„ธํžˆ ๋…ผํ•œ๋‹ค.

์œ„ ๊ทธ๋ฆผ์€ ์ƒ๊ธฐ ๋งํฌ - Life of a Request์— ๋‹ด๊ธด ๋‹ค์ˆ˜์˜ ๊ทธ๋ฆผ ์ค‘ filter chain ๋ถ€๋ถ„์„ ์••์ถ•ํ•œ ๊ฒƒ์œผ๋กœ, ๊ฐ connection ๋ณ„ filter chain์ด ์ฃผ์–ด์ ธ request/response (์ข…๋ฅ˜) ๋ณ„๋กœ ์„œ๋กœ ๋…๋ฆฝ์ ์ธ ์ฒ˜๋ฆฌ๊ฐ€ ์ด๋ฃจ์–ด์ง„๋‹ค.

Envoy filter๋Š” ํฌ๊ฒŒ Listener Filter, Network Filter๋กœ ๋‚˜๋‰˜๊ณ , Network Filter ์ค‘ ํ•˜๋‚˜์ธ HCM(HTTP Connection Manager)๋Š” filter chain ๋งˆ์ง€๋ง‰์— ์œ„์น˜ํ•˜์—ฌ, ์ž์ฒด์ ์œผ๋กœ ๋‹ค์ˆ˜์˜ sub-filter, ์ฆ‰ HTTP filter chain์„ ๊ฐ€์ง„๋‹ค. ๊ทธ๋ฆฌ๊ณ  HTTP filter chain์˜ ๋งˆ์ง€๋ง‰์€ Router Filter ๋กœ ๋๋‚œ๋‹ค.

Built-In filters

Envoy๊ฐ€ ์ž์ฒด์ ์œผ๋กœ ์ œ๊ณตํ•˜๋Š” filter๋Š” ๋‹ค์–‘ํ•œ ์ˆ˜์ค€์—์„œ filter ์ข…๋ฅ˜ ๋ณ„๋กœ ๋งค์šฐ ๋งŽ๋‹ค.

Listener filter ์˜ˆ๋กœ๋Š” (Global rate limiting๊ณผ๋„ ํ•จ๊ป˜ ์‚ฌ์šฉ๋˜๋Š”) Local rate limiting์ด๋‚˜ UDP Listener filters๊ฐ€ ์žˆ๊ณ , Network filter์—๋Š” Redis๋‚˜ Kafka์™€ ๊ฐ™์€ 3rd party ์ œํ’ˆ ํ”„๋กœํ† ์ฝœ์— ๋Œ€ํ•œ ์ง€์›๋งˆ์ € ๋ณด์ด๋ฉฐ, HTTP filter๋Š” ๋ณ„๋„๋กœ ๋…ผํ•  Lua, WASM filter ๋ฅผ ํฌํ•จํ•˜์—ฌ ์‚ฌ์‹ค ์ƒ Built-in filter์ด ์ง‘์ค‘๋œ ๋ถ€๋ถ„์ด๋‹ค.

์•„๋ž˜๋Š” ์ด๋“ค(๋งํฌ) ์ค‘ ํŠนํžˆ ๋ˆˆ์— ๋ˆ HTTP filter ์˜ˆ์ด๋‹ค.

HTTP filters โ€” envoy 1.31.0-dev-39093b documentation
https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/http_filters
  • ๋ฒ”์šฉ: Cache, Echo, Header Mutation, Kill Request, Rate Limit, Stateful session, Tap
  • ๋ณด์•ˆ: Basic Auth, CORS, CSRF, Credential Injector, RBAC
  • gRPC: Field Extraction, HTTP/1.1 bridge, gRPC-JSON transcoder
  • AWS/GCP: AWS Lambda, AWS Request Signing, DynamoDB, GCP Authentication

Lua filter

Lua โ€” envoy 1.31.0-dev-d19462 documentationThe HTTP Lua filter allows Lua scripts to be run during both the request and response flows. LuaJIT is used as the runtime. Because of this, the supported Lua version is mostly 5.1 with some 5.2 features. See the LuaJIT documentation for more details.
https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/lua_filter

Built-In filter๋งŒ์œผ๋กœ๋Š” ํ•ด๊ฒฐ์ด ์•ˆ๋˜๋Š” ์š”๊ตฌ์— ๋Œ€ํ•œ ๋‘ ๊ฐ€์ง€ ํ•ด๊ฒฐ์•ˆ ์ค‘ ๊ฐ„ํŽธํ•œ ๋ฐฉ๋ฒ•์œผ๋กœ, Envoy๋Š” Lua script๋ฅผ ์ง€์›ํ•˜์—ฌ custom ๋กœ์ง ์ถ”๊ฐ€๋ฅผ ๊ฐ€๋Šฅํ•˜๊ฒŒ ํ•œ๋‹ค. HTTP filter ์ค‘ ํ•˜๋‚˜๋กœ LuaJIT ์ƒ์—์„œ ๋™์ž‘ํ•œ๋‹ค.

Istio EnvoyFilter via mockserver ์—์„œ ์˜ˆ์ œ๋ฅผ ํ†ตํ•ด ์ข€๋” ์ƒ์„ธํžˆ ๋‹ค๋ฃฌ๋‹ค.

์ฐธ๊ณ ๋กœ ๋ฐ”๋กœ ์•„๋ž˜์—์„œ ๋…ผํ•  WASM(WebAssembly)์€ ์ผ๋ฐ˜์ ์œผ๋กœ ์„ฑ๋Šฅ๊ณผ ๋ณด์•ˆ์„ ์œ„ํ•ด (๋ถˆํŽธํ•จ์„ ๊ฐ์ˆ˜ํ•˜๋”๋ผ๋„) ์‚ฌ์šฉ๋˜๋Š”๋ฐ, LuaJIT ์„ฑ๋Šฅ ์—ญ์‹œ ๊ทธ๋ฆฌ ๋ฌด์‹œํ•  ์ƒํ™ฉ์€ ์•„๋‹Œ ๋“ฏ ํ•˜๋‹ค(ํ•˜๊ธฐ ๋งํฌ ์ฐธ๊ณ ).

So, Envoy will be embedding WebAssembly alongside (or instead of) Lua? Are other... | Hacker NewsAre other projects moving from Lua (or other embedded scripting languages) to WebAssembly? What are the benefits of compiling an extension to WASM rather than writing it in Lua?
https://news.ycombinator.com/item?id=22582600

WASM vs Lua: Lua with JIT is very fast even compared to statically typed, compiled languages.

WASM(WebAssembly) filter

custom logic ์ถ”๊ฐ€๋ฅผ ์œ„ํ•œ ๋‘ ๋ฒˆ์งธ ๋ฐฉ๋ฒ•์œผ๋กœ, Envoy๋Š” WebAssembly๋ฅผ L4 ๋Œ€์‘์˜ Network filter์™€ HTTP filter๋กœ ์ง€์›ํ•˜๋ฉฐ, Istio๋Š” WasmPlugn ์„ ํ†ตํ•ด ์ด๋“ค์„ ๊ฐ๊ฐ ์ง€์›ํ•œ๋‹ค(PluginType ์ฐธ์กฐ).

Wasm PluginExtend the functionality provided by the Istio proxy through WebAssembly filters.
https://istio.io/latest/docs/reference/config/proxy_extensions/wasm-plugin/

WebAssembly ํŠน์„ฑ ์ƒ ๋‹ค์ˆ˜์˜ ์–ธ์–ด(C++, Rust, Go, TypeScript)๋ฅผ ์ง€์›ํ•˜๊ณ  binary image๋Š” OCI(Open Container Initiative) ํ˜ธํ™˜ ๊ฐ€๋Šฅํ•˜๊ธฐ์— ์ผ๋ฐ˜์ ์ธ Container registry์— ๋“ฑ๋ก ์—ญ์‹œ ๊ฐ€๋Šฅํ•˜๋‹ค. WasmPlugin ์€ Kubernetes์ฒ˜๋Ÿผ container registry์—์„œ wasm image๋ฅผ ๋ฐ›๋„๋ก ๊ณ ์•ˆ๋˜์–ด ์žˆ๋‹ค.

Proxy-Wasm overview ์—์„œ ์ƒ์„ธํžˆ ๋…ผํ•œ๋‹ค.

๊ธฐํƒ€ ํ™•์žฅ ๋ฐฉ๋ฒ•

์ด์™ธ์—๋„ Envoy filter๋Š” Network filter, HTTP filter ๋ชจ๋‘์— ๋Œ€ํ•ด golang filter๋ฅผ ์ง€์›ํ•˜์—ฌ, golang์œผ๋กœ custom filter ๊ตฌํ˜„ ๊ฐ€๋Šฅํ•จ๊ณผ ๋™์‹œ์—, Envoy๊ฐ€ C++๋กœ ์ž‘์„ฑ๋œ open-source์ธ ํŠน์„ฑ ์ƒ C++๋กœ๋„ ๊ตฌํ˜„์ด ๊ฐ€๋Šฅํ•˜๋‹ค. ์˜ˆ์ œ๋ฅผ ๋ณด๋ฉด ๊ทธ๋ฆฌ ์–ด๋ ค์›Œ ๋ณด์ด์ง€๋„ ์•Š๋Š”๋‹ค.

ํ•˜์ง€๋งŒ ๋ฌธ์ œ๋Š” ๋ฐฐํฌ๋กœ ๋งŒ๋“  binary๋ฅผ Istio์— ์ ์šฉํ•˜๋ ค๋ฉด, ์•„๋ž˜ ๋งํฌ์˜ Istio proxy source code์— ๋„ฃ์–ด Istio proxy ์ž์ฒด๋ฅผ buildํ•˜๊ณ , ๊ธฐ์กด Istio proxy๋ฅผ ๊ต์ฒดํ•ด์•ผ ํ•œ๋‹ค๋Š” ์ ์ด๋‹ค. ๋ฌผ๋ก  Istio ๋ฒ„์ „์ด ๋ฐ”๋€” ๋•Œ๋งˆ๋‹ค ํ•จ๊ป˜ ๊ด€๋ฆฌํ•ด์•ผํ•œ๋‹ค๋Š” ์ ์€ ๋ค์ด๋‹ค.

proxyistio ยท 2026-10-17 ์—…๋ฐ์ดํŠธ

Istio ์ด์™ธ์˜ Service Mesh ์ œํ’ˆ์— ๋Œ€ํ•ด

Istio ์ด์™ธ์— Cilium, Linkerd, Kuma, Consul ๋“ฑ Service Mesh ์ œํ’ˆ์€ ๋‹ค์–‘ํ•˜๋‹ค. ์ด์ค‘ Cilium์€ ๋†’์€ ์„ฑ๋Šฅ์˜ eBPF CNI๋กœ ํŠนํžˆ ์œ ๋ช…ํ•œ๋ฐ, CNI ๋‚ด์— Service Mesh ๊ธฐ๋Šฅ์„ ํฌํ•จํ•œ sidecar-less Service Mesh์ž„๊ณผ ๋™์‹œ์— Istio๋ฅผ ํฌํ•จํ•œ ๋‹ค์ˆ˜์˜ Control Plane์„ ์ง€์›ํ•œ๋‹ค. ๋˜ํ•œ Linkerd๋Š” ํƒ€ Service Mesh ์ œํ’ˆ๊ณผ๋Š” ๋‹ฌ๋ฆฌ Envoy๊ฐ€ ์•„๋‹Œ ์ž์ฒด proxy๋ฅผ ์‚ฌ์šฉํ•จ๊ณผ ๋™์‹œ์— ๋†’์€ ์„ฑ๋Šฅ์œผ๋กœ ์œ ๋ช…ํ•˜๋‹ค.

LiveWyer | Service Meshes Decoded: a performance comparison of Istio vs Linkerd vs CiliumA performance comparison of three prominent Open Source service meshes Istio, Linkerd, and Cilium | Discovering the fastest service mesh and sharing our comparison experience
https://livewyer.io/blog/2024/05/08/comparison-of-service-meshes/

Cilium vs Linkerd vs Istio ์„ฑ๋Šฅ ๋น„๊ต. ํฐ ์ฐจ์ด๋Š” ์—†์œผ๋‚˜ ์–ด์จŒ๊ฑด Istio๊ฐ€ ๊ฐ€์žฅ ์„ฑ๋Šฅ์ด ๋–จ์–ด์ง„๋‹ค. ๋‹ค๋งŒ Istio Sidecar mode์—์„œ์˜ ๋น„๊ต๋ผ Ambient mode ์‚ฌ์šฉ ์‹œ์—๋Š” ์ข€๋” ๋‚˜์„ ๋“ฏ ํ•˜๋‹ค.

์ด์™€ ๊ฐ™์€ ์ƒํ™ฉ์ž„์—๋„ Istio๋ฅผ ์ค‘์‹ฌ์œผ๋กœ Service Mesh๋ฅผ ๋ถ„์„ํ•œ ์ด์œ ๋Š”, ๋ ˆํผ๋Ÿฐ์Šค, ์ปค๋ฎค๋‹ˆํ‹ฐ ๋ฐ Istio Internals: Ambient mode ๋ฅผ ๊ณ ๋ คํ–ˆ์„ ๋•Œ, ์—ฌ์ „ํžˆ Istio๊ฐ€ Service Mesh์˜ ์„ ๋‘ ์ฃผ์ž๋กœ ํŒŒ์•…๋˜์—ˆ๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค.

References

๋ณธ ๊ธ€ ์ž‘์„ฑ์— ์ฃผ๋กœ ์ฐธ์กฐํ•œ ๋ฌธ์„œ์ด๋‹ค.

Istio in ActionSolve service-to-service communication challenges with an Istio-based service mesh! This practical guide helps you reduce the operational complexity of your microservices.
https://www.manning.com/books/istio-in-action
DocumentationLearn how to deploy, use, and operate Istio.
https://istio.io/latest/docs/

Comments