Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Istio and the Service Mesh Architecture
Search
Manatsawin Hanmongkolchai
September 08, 2018
Programming
3
1k
Istio and the Service Mesh Architecture
DevOps BKK 2018
Manatsawin Hanmongkolchai
September 08, 2018
Tweet
Share
More Decks by Manatsawin Hanmongkolchai
See All by Manatsawin Hanmongkolchai
Nix: Declarative OS
whs
0
50
gRPC load balancing with xDS
whs
0
850
ArgoCD
whs
0
380
Writing Babel Plugin
whs
0
170
What's new in Cloud Next 2019
whs
0
280
A Date with gRPC
whs
1
1.3k
ตีแผ่ Microservice ด้วย Tracing
whs
0
330
Next Generation Smart Home
whs
0
920
State Management with MobX
whs
2
320
Other Decks in Programming
See All in Programming
ESLintプラグインを使用してCDKのセオリーを適用する
yamanashi_ren01
2
450
CloudNativePGがCNCF Sandboxプロジェクトになったぞ! 〜CloudNativePGの仕組みの紹介〜
nnaka2992
0
200
Spring gRPC について / About Spring gRPC
mackey0225
0
180
SRE、開発、QAが協業して挑んだリリースプロセス改革@SRE Kaigi 2025
nealle
3
3.5k
富山発の個人開発サービスで日本中の学校の業務を改善した話
krpk1900
4
330
Kubernetes History Inspector(KHI)を触ってみた
bells17
0
160
テストをしないQAエンジニアは何をしているか?
nealle
0
110
[JAWS-UG横浜 #79] re:Invent 2024 の DB アップデートは Multi-Region!
maroon1st
1
130
法律の脱レガシーに学ぶフロントエンド刷新
oguemon
5
660
2,500万ユーザーを支えるSREチームの6年間のスクラムのカイゼン
honmarkhunt
6
4.6k
watsonx.ai Dojo #6 継続的なAIアプリ開発と展開
oniak3ibm
PRO
0
270
Kanzawa.rbのLT大会を支える技術の裏側を変更する Ruby on Rails + Litestream 編
muryoimpl
0
140
Featured
See All Featured
Building Better People: How to give real-time feedback that sticks.
wjessup
366
19k
How STYLIGHT went responsive
nonsquared
98
5.3k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
175
51k
How to Think Like a Performance Engineer
csswizardry
22
1.3k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
193
16k
Code Review Best Practice
trishagee
65
17k
What's in a price? How to price your products and services
michaelherold
244
12k
Designing for Performance
lara
604
68k
Why Our Code Smells
bkeepers
PRO
335
57k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.2k
Building Adaptive Systems
keathley
39
2.4k
The Language of Interfaces
destraynor
156
24k
Transcript
Istio and the Service Mesh Architecture DevOps BKK 2018
About me • Manatsawin Hanmongkolchai • Junior Architect at Wongnai
How I sold Istio to my team
How Wongnai monitor microservices
Microservice monitoring • In-service metrics eg. controller time
Microservice monitoring • AWS X-Ray SDK
Microservice monitoring • Sentry
Microservice monitoring • ELB Error Rate
Microservice monitoring These must be integrated into your service AWS
X-Ray
Microservice monitoring The problem in microservice world • Service can
be written in many languages. Not all tools support every languages
Microservice monitoring The problem in microservice world • People in
a rush skip implementing proper monitoring
Meet Istio
Service mesh Istio handle interservice connection Sidecar
How Istio sidecar work? Istio use admission controller to install
2 containers in your pod
How Istio sidecar work? 1. Init container to setup transparent
proxy iptables rule (as root) 2. Envoy running alongside your app as the transparent proxy
What Istio can do for you Monitoring • Network calls
• Tracing
Network monitoring Istio provide insight into your network in layer
7
Total requests 4xx 5xx
Request count of service Response time
Service network monitoring Measured client side Request count Success rate
Resp. time Speed (for TCP) Measured server side
Who call me?
Distributed Tracing • All incoming/outgoing HTTP calls are traced to
Jaeger • Needs to propagate OpenTracing headers from incoming call to outgoing call to track calls correctly
Distributed Tracing • Easiest way is to just integrate Zipkin
OpenTracing into your app
Distributed Tracing
Distributed Tracing
What Istio can do for you • Traffic Management ◦
Routing ▪ Traffic Shifting ▪ Mirror ◦ Fault Injection ◦ Circuit Breaker
Routing • Kubernetes service operates in Layer 4 Cluster IP
Backend Backend Backend Req Req Req Req Req Req
Routing • Istio operate in layer 7 and can do
per-call load balancing Envoy Req Req Req Req Req Req Backend Backend Backend
Split traffic • Split traffic between service (eg. 1% to
new version)
Mirror traffic • Test in production by cloning traffic Envoy
Live version Test version Req
Fault Injection • Intentionally making service worse • Why? Let’s
hear a story
Fault Injection Site Reliability Engineering How Google runs production systems
landing.google.com /sre/book/
#WongnaiIsHiring • Wongnai is looking for our first Site Reliability
Engineer • careers.wongnai.com
Chubby
Fault Injection Over time, we found that the failures of
the global instance of Chubby consistently generated service outages.
Fault Injection As it turns out, true global Chubby outages
are so infrequent that service owners began to add dependencies to Chubby assuming that it would never go down.
Fault Injection The solution to this Chubby scenario is interesting:
SRE makes sure that global Chubby meets, but does not significantly exceed, its service level objective.
Fault Injection In any given quarter, if a true failure
has not dropped availability below the target, a controlled outage will be synthesized by intentionally taking down the system.
Fault Injection • Slow down services ◦ Delay 80% of
requests for 5 seconds • Make errors ◦ Return 500 error code for 80% of requests
Circuit Breaker Remove a backend from service if it return
too many errors in a row Frontend Backend Work Queue 503 Timeout F5
Summary Istio provide visibility and configurability to your network. This
is traditionally done by adding library, but in a microservice world you need a cross language solution
The catch Here’s what we found while moving to Istio
• While requiring zero code changes, your service must already be well behaved cloud application
The catch • Do not connect directly to pod IP
(eg. no service discovery - just use cluster IP and avoid headless service)
The catch • Do not mix port type in the
cluster (eg. don’t run HTTP server on port 6379 with another pod running TCP service at the same port)
The catch • Set the Host header to the destination.
Don’t connect to gateway and set Host header to cooking. ◦ This case is really hard to debug...
The catch • External services (ie. outside Kubernetes) but in
the capturing IP range must have ServiceEntry defined ◦ ServiceEntry is cluster-wide
Slides on speakerdeck.com/whs