When You Need a Service Mesh
Once you have more than 10 microservices, managing communication between services gets complicated. Implementing retries, circuit breakers, mTLS, and tracing in every service's code is redundant and inefficient.
Core Features
| Feature | Description |
|---|---|
| mTLS | Automatic encryption + authentication between services |
| Traffic management | Canary deployments, A/B testing |
| Observability | Distributed tracing, service dependency maps |
| Policy | Inter-service access control |
Installing Istio and Canary Deployments
istioctl install --set profile=production -y
kubectl label namespace my-app istio-injection=enabledapiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: my-app
spec:
http:
- route:
- destination:
host: my-app
subset: v1
weight: 90
- destination:
host: my-app
subset: v2
weight: 10Enforce mTLS everywhere
apiVersion: security.istio.io/v1beta1
kind: PeerAuthentication
metadata:
name: default
namespace: istio-system
spec:
mtls:
mode: STRICTLinkerd — Lightweight
linkerd install --crds | kubectl apply -f -
linkerd install | kubectl apply -f -
kubectl annotate namespace my-app linkerd.io/inject=enabledIstio vs Linkerd
| Istio | Linkerd | |
|---|---|---|
| Control plane memory | ~500MB | ~50MB |
| Sidecar memory | ~50MB/Pod | ~10MB/Pod |
| Added latency | ~1-2ms | <0.5ms |
| Learning curve | High | Low |
Cilium — eBPF-Based (No Sidecar)
helm repo add cilium https://helm.cilium.io/
helm install cilium cilium/cilium \
--namespace kube-system \
--set kubeProxyReplacement=true# L7 HTTP policy
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
spec:
ingress:
- fromEndpoints:
- matchLabels:
app: frontend
toPorts:
- ports:
- port: "8080"
rules:
http:
- method: GET
path: "/api/.*"Selection Guide
| Situation | Recommendation |
|---|---|
| Advanced traffic management | Istio |
| Simple, fast mTLS | Linkerd |
| CNI and mesh in one, max performance | Cilium |
| Small scale (under 10 services) | None |
A service mesh adds complexity. Prove you need it before you adopt it.
Decision Table by Scale and Requirements
| Situation | Recommendation | Rationale |
|---|---|---|
| Fewer than 30 services, only mTLS and retries needed | Linkerd | Lowest learning and ops cost, smallest resource overhead |
| Traffic policy, multi-cluster, complex routing | Istio | Widest feature set — but you need dedicated operational capacity |
| Already on Cilium CNI, L7 observability is the goal | Cilium Service Mesh | Start sidecarless — but check the docs for mesh feature maturity |
| Still asking whether you can live without a mesh | Hold off | A gateway plus library-based retries is often enough |
Pre-Adoption Checklist
- State the goal in one sentence — is it "mandatory mTLS," "canary deploys," or "observability"? (the minimum tool differs by goal)
- Sidecar resource budget — extra CPU/memory per pod × pod count, calculated up front
- Upgrade path — rehearse the data-plane restart procedure when upgrading the control plane
- Failure isolation plan — confirm the blast radius if the mesh control plane fails (fail-open or not)
- Removal scenario — could you tear the mesh out in six months if needed?
Reference: Official Docs
The primary sources for the behavior, configuration, and errors covered in this post are the official docs below. Check them for version-specific options and exact behavior.
FAQ
Q. What's the difference between Cilium and Istio? A. Istio is a sidecar (Envoy)-based L7 service mesh with rich traffic management, mTLS, and observability, but it comes with sidecar overhead. Cilium uses eBPF to handle networking and security at the kernel level with lower overhead, and Cilium Service Mesh supports a sidecarless mode. Choose Cilium if performance and low latency come first; choose Istio if mature L7 traffic control and ecosystem matter more.
Q. Can I use Cilium and Istio together? A. Yes. A common pattern is Cilium as the CNI (high-performance networking and NetworkPolicy) with Istio for L7 service mesh features. Because mTLS and traffic management overlap, you need to split responsibilities clearly.
Nodelog는 모든 콘텐츠의 내용과 출처를 공개 전에 검토합니다. 환경(OS·버전)에 따라 결과가 달라질 수 있는 기술 정보는 공식 문서와 함께 확인하며, 검토 기준과 정정 원칙은 편집 정책에서 안내합니다. 오류를 발견하시면 이메일로 제보해 주세요 — 확인 후 신속히 정정합니다.
Comments
Be the first to comment.