Alibaba Cloud Service Mesh (ASM) mendukung dua mode bidang data: Sidecar mode dan Ambient mode. Keduanya menyediakan seluruh fitur Istio untuk manajemen traffic, keamanan, dan observabilitas, tetapi berbeda dalam arsitektur, overhead sumber daya, dan model operasional.
Sidecar mode
Dalam Sidecar mode, sidecar Envoy proxy disuntikkan ke setiap Pod dan mengintersepsi seluruh traffic inbound dan outbound.
ASM telah mendukung Sidecar mode sejak rilis pertamanya. Setelah melalui beberapa iterasi dan penggunaan ekstensif di lingkungan produksi, mode ini merupakan opsi yang paling matang dan stabil.
Traffic path
Gambar berikut menunjukkan jalur traffic khas dalam Sidecar mode.
Ambient mode
Komunitas Istio memperkenalkan Ambient mode pada tahun 2022 untuk mengatasi keterbatasan inheren dari Sidecar mode. Alih-alih menyuntikkan proxy ke setiap Pod, Ambient mode memisahkan pemrosesan Lapisan 4 (L4) dan Lapisan 7 (L7) menjadi dua komponen independen:
-
ztunnel — Proxy L3/L4 berbasis Rust yang dideploy sebagai DaemonSet. Pod pada node yang sama berbagi satu instans ztunnel. Komponen ini menangani enkripsi mTLS, verifikasi identitas, otorisasi L4, dan observabilitas L4 untuk seluruh traffic yang masuk dan keluar dari Pod tersebut.
-
Waypoint proxy — Proxy L7 berbasis Envoy yang dideploy sebagai Deployment, sepenuhnya terpisah dari Pod aplikasi. Peningkatan atau instalasi Waypoint proxy tidak memerlukan perubahan apa pun pada Pod aplikasi.
Mulai dari ASM 1.25, Ambient mode siap produksi untuk skenario kluster tunggal.
Memulai dengan Ambient mode
-
Tambahkan label yang mengaktifkan ambient ke namespace untuk langsung mendapatkan mTLS dan observabilitas L4—tanpa injeksi sidecar dan tanpa restart Pod.
-
Untuk kemampuan L7 seperti routing berbasis HTTP, otorisasi L7, atau distributed tracing, deploy Waypoint proxy untuk layanan, Pod, atau seluruh namespace tertentu.
Beberapa layanan atau Pod dapat berbagi Waypoint proxy yang sama. Semua permintaan ke layanan tersebut dialihkan melalui Waypoint sebelum mencapai aplikasi.
Traffic path
Gambar berikut menunjukkan jalur traffic dalam Ambient mode.
Perbandingan fitur
|
Fitur |
Sidecar mode |
Ambient mode |
|
Traffic management |
Complete Istio feature set |
Complete Istio feature set (requires Waypoint) |
|
Security |
Complete Istio feature set |
Complete Istio feature set: mTLS dan keamanan L4 secara default; otorisasi L7 memerlukan Waypoint |
|
Observability |
Complete Istio feature set |
Complete Istio feature set: observabilitas L4 secara default; observabilitas L7 memerlukan Waypoint |
|
Onboarding |
Add an auto-injection label to the namespace and restart all pods |
Add a label to the namespace; no pod restart needed |
|
Upgrades |
In-place and canary upgrade; requires restarting all pods to inject the new sidecar version |
In-place upgrade; data plane components upgrade with the control plane; no pod restart needed |
|
Lifecycle management |
Application developers manage the proxy |
Platform administrators manage the proxy; transparent to application developers |
|
Resource utilization |
Each pod runs an L7 proxy, making high utilization difficult |
Waypoint proxies scale independently; an entire namespace or cluster can share a single Waypoint |
|
Average resource cost |
High |
Low |
|
Average latency (Istio community data) |
0,63 ms – 0,88 ms |
Without Waypoint: 0,16 ms – 0,20 ms; with Waypoint: 0,40 ms – 0,50 ms |
|
L7 parsing |
Twice (client sidecar + server sidecar) |
Without Waypoint: 0; with Waypoint: 1 |
|
Large-scale support |
Requires fine-tuning the configuration scope of each sidecar to reduce config volume |
No tuning required; only necessary configurations are delivered by default |
|
Server-first protocol support |
Requires explicit configuration |
Supported by default |
|
Kubernetes Job support |
Complex, because the sidecar is bound to the pod lifecycle |
Transparent support |
|
Security model |
Strongest: each workload holds its own key |
Strong: each ztunnel holds keys only for workloads on its node |
|
Can compromised pods access mesh keys? |
Yes |
No |
-
Pemisahan L4/L7 dalam Ambient mode memungkinkan Anda melewati overhead pemrosesan L7 sepenuhnya jika kemampuan L7 tidak diperlukan.
-
Penggabungan Sidecar mode dan Ambient mode dalam mesh yang sama belum siap produksi. Pod dalam mode berbeda tidak dapat saling berkomunikasi.
-
Ambient mode saat ini tidak mendukung manajemen multi-kluster.
Kemampuan L4 dan L7 dalam Ambient mode
Pemrosesan traffic L7 memiliki overhead yang jauh lebih tinggi dibandingkan L4. Jika suatu layanan hanya memerlukan kemampuan L4, lewati Waypoint proxy untuk layanan tersebut guna mengurangi konsumsi sumber daya dan meningkatkan performa.
|
Dimensi |
Kemampuan L4 (ztunnel) |
Kemampuan L7 (Waypoint) |
|
Security |
mTLS encryption, ServiceAccount-based authorization, IP-based authorization |
HTTP metadata-based authorization (method, path), JWT authentication, JWT-based authorization, OPA-based authorization |
|
Observability |
Source/destination IP and port, bytes sent/received |
Tracing Analysis, full HTTP request recording (method, path, host, status code) |
|
Routing |
TCP connection-level load balancing, circuit breaking, rate limiting, timeout, retry |
HTTP request-level load balancing, circuit breaking, rate limiting, timeout, retry, fault injection, traffic mirroring |
|
Extensibility |
N/A |
WasmPlugin |