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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Manatsawin Hanmongkolchai
September 08, 2018
Programming
1.1k
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Istio and the Service Mesh Architecture
DevOps BKK 2018
Manatsawin Hanmongkolchai
September 08, 2018
More Decks by Manatsawin Hanmongkolchai
See All by Manatsawin Hanmongkolchai
Nix: Declarative OS
whs
0
130
gRPC load balancing with xDS
whs
0
1.1k
ArgoCD
whs
0
480
Writing Babel Plugin
whs
0
230
What's new in Cloud Next 2019
whs
0
330
A Date with gRPC
whs
1
1.5k
ตีแผ่ Microservice ด้วย Tracing
whs
0
410
Next Generation Smart Home
whs
0
1k
State Management with MobX
whs
2
410
Other Decks in Programming
See All in Programming
LLMによるContent Moderationの本番運用の裏側と品質担保への挑戦
suikabar
1
230
New "Type" system on PicoRuby
pocke
1
780
LLM Plugin for Node-REDの利用方法と開発について
404background
0
170
3Dシーンの圧縮
fadis
1
680
タクシーアプリ『GO』の バックエンド開発のおける AI利活用と若者のすべて
pyama86
3
1.9k
運用エージェントは "作る" から "育てる" へ - 記憶と自己進化の3層設計パターン / self-evolving-agents-three-layer-agent-design
gawa
12
3.6k
ローカルLLMを使ってB2Bサービスを作っていての学び
yaotti
0
150
作って学ぶ、 JSX (TSX) ランタイムの基本
syumai
7
1.6k
CSC307 Lecture 17
javiergs
PRO
0
320
生成AI時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
8
3.2k
Skillsは効率化、Agentsは"自分の拡張"——Builder時代のエージェント編成(CC Night 2026)
wemra
1
120
Old Dog, New Tricks: The Java 25 Reinvention - JNation
bazlur_rahman
0
150
Featured
See All Featured
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
330
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
71
40k
Optimising Largest Contentful Paint
csswizardry
37
3.7k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.5k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.1k
エンジニアに許された特別な時間の終わり
watany
107
250k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
430
Ethics towards AI in product and experience design
skipperchong
2
310
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
420
How to Think Like a Performance Engineer
csswizardry
28
2.6k
A Modern Web Designer's Workflow
chriscoyier
698
190k
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