SlideShare a Scribd company logo
1 of 32
istio.io
service mesh for all
Mandar Jog
● What is a Service Mesh
● How we got here: A story
● Architecture and details
● Q & A
Agenda
What is a ‘Service Mesh’ ?
A network for services, not bytes
●Traffic Control
●Visibility
●Resiliency & Efficiency
●Security
●Policy Enforcement
Remember the Monolith?
Module
B
Module
A
Module
D
Module
C
ModuleE Module
F
Module
G
Micro Services
B
Service
A
D
C
E F
G
1. Gained development velocity !
2. Easy testing because of abstractions.
3. Scale services independently.
Problem Solved!
Micro Services FTW
Yay !
1. Gained development velocity !
2. Easy testing because of abstractions.
3. Scale services independently.
Problem Solved!
I am so
bloody
magical !
What have we lost?
1. I replaced a reliable in-process call with an unreliable rpc.
2. Trivial single stepping replaced by … ?
3. Secure in-process communication is replaced by insecure network.
4. Access control within process was a NOOP
5. Latency went up
That abstraction was leaky ...
Can we fix it?
1. Add retry logic to the application code.
2. Add entry-exit traces.
3. Secure inter service connections with strong authentication.
Now that we are adding code … choose the rpc endpoint intelligently
a. Endpoints with low latency.
b. Endpoints with warm caches.
Service Mesh
● Address service level concerns.
● Unlock the full power of microservices.
Weaving the mesh
svcA
sidecaringress
Service A
svcB
sidecar
Service B
External
Services
HTTP/1.1, HTTP/2,
gRPC, TCP with or
without TLS
HTTP/1.1, HTTP/2,
gRPC, TCP with or
without TLS
Intern
et
Outbound features:
❖ Service authentication
❖ Load balancing
❖ Retry and circuit breaker
❖ Fine-grained routing
❖ Telemetry
❖ Request Tracing
❖ Fault Injection
Inbound features:
❖ Service authentication
❖ Authorization
❖ Rate limits
❖ Load shedding
❖ Telemetry
❖ Request Tracing
❖ Fault Injection
Architecture
svcA
Envoy
Pod
Service A
svcB
Envoy
Service B
Pilot
Control Plane API
Mixer
Control flow during
request processing
Istio-Auth
Traffic is transparently
intercepted and proxied. App is
unaware of Envoy’s presence
cache cache
istio Service Mesh
A network for services, not bytes
● Traffic Control
● Visibility
● Resiliency & Efficiency
● Security
● Policy Enforcement
Application Rollout
svcA
Envoy
Pod
Service A
svcB
Envoy
ServiceB
http://serviceB.example
Pod Labels:
version: v1.5
env: us-prod
svcB
Envoy
Pod Labels:
version: v2.0-
alpha, env:us-
serviceB.example.cluster.local
Traffic routing
rules
99%
1%
Rules
API
Pilot
Traffic control is decoupled from infrastructure scaling
// A simple traffic splitting rule
destination: serviceB.example.cluster.local
match:
source: serviceA.example.cluster.local
route:
- tags:
version: v1.5
env: us-prod
weight: 99
- tags:
version: v2.0-alpha
env: us-staging
weight: 1
svcA
Service A
svcB
Service B
version: v1
Pod 3
Pod 2
Pod 1
Content-based traffic steering
svcA
Service A
svcB
Service B
version: v1
Pod 3
Pod 2
Pod 1
svcB’
version: canary
Pod 4
Traffic Steering
// Content-based traffic steering rule
destination: serviceB.example.cluster.local
match:
httpHeaders:
user-agent:
regex: ^(.*?;)?(iPhone)(;.*)?$
precedence: 2
route:
- tags:
version: canary
Istio Service Mesh
A network for services, not bytes
● Traffic Control
● Visibility
● Resiliency & Efficiency
● Security
● Policy Enforcement
Visibility
Monitoring & tracing should not be an
afterthought in the infrastructure
Goals
● Metrics without instrumenting apps
● Consistent metrics across fleet
● Trace flow of requests across services
● Portable across metric backend
providers
Istio Zipkin tracing dashboard
Istio - Grafana dashboard w/ Prometheus backend
Metrics flow
svcA
Envoy
Pod
Service A
svcB
Envoy
Service B
API: /svcB
Latency: 10ms
Status Code: 503
Src: 10.0.0.1
Dst: 10.0.0.2
…...
InfluxDB
Promethe
usAdapter
InfluxDB
Adapter
Custom
Adapter
Mixer
● Mixer collects metrics emitted
by Envoys
● Adapters in the Mixer normalize
and forward to monitoring
backends
● Metrics backend can be
swapped at runtime
Prometheus
InfluxDB
InfluxDB Custom
backend
Prometheus
Prometheus
Visibility: Tracing
svcA
Envoy
Pod
Service A
svcB
Envoy
Service B
Trace Headers
X-B3-TraceId
X-B3-SpanId
X-B3-ParentSpanId
X-B3-Sampled
X-B3-Flags
svcC
Envoy
Service C
Spa
ns
Spa
ns
Promethe
us
InfluxDB
Zipkin
Adapter
Stackdriv
erAdapter
Custom
Adapter
Mixer
Promethe
us
Zipkin
InfluxDB
Stackdriv
er
Custom
backend
● Application do not have to deal with
generating spans or correlating
causality
● Envoys generate spans
○ Applications need to *forward* context
headers on outbound calls
● Envoys send traces to Mixer
● Adapters at Mixer send traces to respective
backends
Istio Service Mesh
A network for services, not bytes
● Traffic Control
● Visibility
● Resiliency & Efficiency
● Security
● Control
Resiliency
Istio adds fault tolerance to your application without any changes to code
Resilience features
❖ Timeouts
❖ Retries with timeout budget
❖ Circuit breakers
❖ Health checks
❖ AZ-aware load balancing w/ automatic failover
❖ Control connection pool size and request load
❖ Systematic fault injection
// Circuit breakers
destination: serviceB.example.cluster.local
policy:
- tags:
version: v1
circuitBreaker:
simpleCb:
httpConsecutiveErrors: 7
sleepWindow: 5m
httpDetectionInterval: 1m
Resiliency Testing
Systematic fault injection to identify
weaknesses in failure recovery
policies
○ HTTP/gRPC error codes
○ Delay injection
svcA
Envoy
Service A
svcB
Envoy
Service B
svcC
Envoy
Service C
Timeout: 100ms
Retries: 3
300ms
Timeout: 200ms
Retries: 2
400ms
Efficiency
● L7 load balancing
○ Passive/Active health checks, circuit breaks
○ Backend subsets
○ Affinity
● TLS offload
○ No more JSSE or stale SSL versions.
● HTTP/2 and gRPC proxying
Istio Service Mesh
A network for services, not bytes
● Traffic Control
● Visibility
● Resiliency & Efficiency
● Security
● Policy Enforcement
Securing Microservices
● Verifiable identity
● Secure naming / addressing
● Traffic encryption
● Revocation
Istio - Security at Scale
spiffe.io
Istio Service Mesh
A network for services, not bytes
● Traffic Control
● Visibility
● Resiliency & Efficiency
● Security
● Policy Enforcement
Putting it all together
svcA
Envoy
Pod
Service A
svcB
Envoy
Service B
Pilot
Control Plane API
Mixer
Control flow during
request processing
Istio-Auth
What does Mixer do?
● Check()
○ Precondition checking
○ Quotas & Rate Limiting
● Report()
○ telemetry reporting
● Primary point of extensibility
● Enabler for platform mobility
● Operator-focused configuration model
Mixer - Proxy Filter Extension
Mixer Metrics
kind: metrics
metadata:
name: requestcount
spec:
value: “1”
dimensions:
Destination_service: destination.service
Source_service: source.service
Response_code: response.code
kind: rule
metadata:
name: prometheus
spec:
match: request.headers[“x-user”] != “admin”
actions:
- handler: handler.prometheus
instances:
- requestcount.metric
istio.io
@mandarjog

More Related Content

What's hot

CloudNativeLondon 2017: "What is a Service Mesh, and Do I Need One when Devel...
CloudNativeLondon 2017: "What is a Service Mesh, and Do I Need One when Devel...CloudNativeLondon 2017: "What is a Service Mesh, and Do I Need One when Devel...
CloudNativeLondon 2017: "What is a Service Mesh, and Do I Need One when Devel...
Daniel Bryant
 

What's hot (20)

NYC Kubernetes Meetup: Ambassador and Istio - Flynn, Datawire
NYC Kubernetes Meetup: Ambassador and Istio - Flynn, DatawireNYC Kubernetes Meetup: Ambassador and Istio - Flynn, Datawire
NYC Kubernetes Meetup: Ambassador and Istio - Flynn, Datawire
 
Introduction to Istio Service Mesh
Introduction to Istio Service MeshIntroduction to Istio Service Mesh
Introduction to Istio Service Mesh
 
Cloud Solution Day 2016: Service Mesh for Kubernetes
Cloud Solution Day 2016: Service Mesh for KubernetesCloud Solution Day 2016: Service Mesh for Kubernetes
Cloud Solution Day 2016: Service Mesh for Kubernetes
 
O'Reilly 2017: "Introduction to Service Meshes"
O'Reilly 2017: "Introduction to Service Meshes"O'Reilly 2017: "Introduction to Service Meshes"
O'Reilly 2017: "Introduction to Service Meshes"
 
The Service Mesh: It's about Traffic
The Service Mesh: It's about TrafficThe Service Mesh: It's about Traffic
The Service Mesh: It's about Traffic
 
Microservices with Spring Cloud and Netflix OSS
Microservices with Spring Cloud and Netflix OSSMicroservices with Spring Cloud and Netflix OSS
Microservices with Spring Cloud and Netflix OSS
 
Microservices with Spring
Microservices with SpringMicroservices with Spring
Microservices with Spring
 
Service mesh with istio
Service mesh with istioService mesh with istio
Service mesh with istio
 
Service mesh
Service meshService mesh
Service mesh
 
Stop reinventing the wheel with Istio by Mete Atamel (Google)
Stop reinventing the wheel with Istio by Mete Atamel (Google)Stop reinventing the wheel with Istio by Mete Atamel (Google)
Stop reinventing the wheel with Istio by Mete Atamel (Google)
 
Building microservices web application using scala & akka
Building microservices web application using scala & akkaBuilding microservices web application using scala & akka
Building microservices web application using scala & akka
 
Managing traffic routing with istio and envoy workshop
Managing traffic routing with istio and envoy workshopManaging traffic routing with istio and envoy workshop
Managing traffic routing with istio and envoy workshop
 
Microservices on kubernetes
Microservices on kubernetesMicroservices on kubernetes
Microservices on kubernetes
 
Kubernetes + netflix oss
Kubernetes + netflix ossKubernetes + netflix oss
Kubernetes + netflix oss
 
Microservices with Spring Boot
Microservices with Spring BootMicroservices with Spring Boot
Microservices with Spring Boot
 
Tech Talks Microservices
Tech Talks MicroservicesTech Talks Microservices
Tech Talks Microservices
 
The service mesh: resilient communication for microservice applications
The service mesh: resilient communication for microservice applicationsThe service mesh: resilient communication for microservice applications
The service mesh: resilient communication for microservice applications
 
CloudNativeLondon 2017: "What is a Service Mesh, and Do I Need One when Devel...
CloudNativeLondon 2017: "What is a Service Mesh, and Do I Need One when Devel...CloudNativeLondon 2017: "What is a Service Mesh, and Do I Need One when Devel...
CloudNativeLondon 2017: "What is a Service Mesh, and Do I Need One when Devel...
 
Service mesh on Kubernetes - Istio 101
Service mesh on Kubernetes - Istio 101Service mesh on Kubernetes - Istio 101
Service mesh on Kubernetes - Istio 101
 
Microservice 4.0 Journey - From Spring NetFlix OSS to Istio Service Mesh and ...
Microservice 4.0 Journey - From Spring NetFlix OSS to Istio Service Mesh and ...Microservice 4.0 Journey - From Spring NetFlix OSS to Istio Service Mesh and ...
Microservice 4.0 Journey - From Spring NetFlix OSS to Istio Service Mesh and ...
 

Similar to istio: service mesh for all

Similar to istio: service mesh for all (20)

What is a Service Mesh and what can it do for your Microservices
What is a Service Mesh and what can it do for your MicroservicesWhat is a Service Mesh and what can it do for your Microservices
What is a Service Mesh and what can it do for your Microservices
 
Api observability
Api observability Api observability
Api observability
 
Managing microservices with Istio Service Mesh
Managing microservices with Istio Service MeshManaging microservices with Istio Service Mesh
Managing microservices with Istio Service Mesh
 
Microservice Powered Orchestration
Microservice Powered OrchestrationMicroservice Powered Orchestration
Microservice Powered Orchestration
 
Istio Triangle Kubernetes Meetup Aug 2019
Istio Triangle Kubernetes Meetup Aug 2019Istio Triangle Kubernetes Meetup Aug 2019
Istio Triangle Kubernetes Meetup Aug 2019
 
Istio presentation jhug
Istio presentation jhugIstio presentation jhug
Istio presentation jhug
 
Make Java Microservices Resilient with Istio - Mangesh - IBM - CC18
Make Java Microservices Resilient with Istio - Mangesh - IBM - CC18Make Java Microservices Resilient with Istio - Mangesh - IBM - CC18
Make Java Microservices Resilient with Istio - Mangesh - IBM - CC18
 
Hello istio
Hello istioHello istio
Hello istio
 
Service Mesh - kilometer 30 in a microservice marathon
Service Mesh - kilometer 30 in a microservice marathonService Mesh - kilometer 30 in a microservice marathon
Service Mesh - kilometer 30 in a microservice marathon
 
API Gateway How-To: The Many Ways to Apply the Gateway Pattern
API Gateway How-To: The Many Ways to Apply the Gateway PatternAPI Gateway How-To: The Many Ways to Apply the Gateway Pattern
API Gateway How-To: The Many Ways to Apply the Gateway Pattern
 
2017 Microservices Practitioner Virtual Summit: Microservices at Squarespace ...
2017 Microservices Practitioner Virtual Summit: Microservices at Squarespace ...2017 Microservices Practitioner Virtual Summit: Microservices at Squarespace ...
2017 Microservices Practitioner Virtual Summit: Microservices at Squarespace ...
 
Open Source Networking Days- Service Mesh
Open Source Networking Days- Service MeshOpen Source Networking Days- Service Mesh
Open Source Networking Days- Service Mesh
 
21st Docker Switzerland Meetup - ISTIO
21st Docker Switzerland Meetup - ISTIO21st Docker Switzerland Meetup - ISTIO
21st Docker Switzerland Meetup - ISTIO
 
Understanding network and service virtualization
Understanding network and service virtualizationUnderstanding network and service virtualization
Understanding network and service virtualization
 
Semantic Validation: Enforcing Kafka Data Quality Through Schema-Driven Verif...
Semantic Validation: Enforcing Kafka Data Quality Through Schema-Driven Verif...Semantic Validation: Enforcing Kafka Data Quality Through Schema-Driven Verif...
Semantic Validation: Enforcing Kafka Data Quality Through Schema-Driven Verif...
 
Service mesh from linkerd to conduit (cloud native taiwan meetup)
Service mesh from linkerd to conduit (cloud native taiwan meetup)Service mesh from linkerd to conduit (cloud native taiwan meetup)
Service mesh from linkerd to conduit (cloud native taiwan meetup)
 
Monoliths to Microservices: App Transformation - Jacksonville Workshop Slides
Monoliths to Microservices: App Transformation - Jacksonville Workshop SlidesMonoliths to Microservices: App Transformation - Jacksonville Workshop Slides
Monoliths to Microservices: App Transformation - Jacksonville Workshop Slides
 
App resiliency detecting and preventing issues in distributed apps
 App resiliency  detecting and preventing issues in distributed apps  App resiliency  detecting and preventing issues in distributed apps
App resiliency detecting and preventing issues in distributed apps
 
Building a Service Mesh with NGINX Owen Garrett.pptx
Building a Service Mesh with NGINX Owen Garrett.pptxBuilding a Service Mesh with NGINX Owen Garrett.pptx
Building a Service Mesh with NGINX Owen Garrett.pptx
 
2019 devoxx - apis, microservices, et le service mesh
2019 devoxx - apis, microservices, et le service mesh2019 devoxx - apis, microservices, et le service mesh
2019 devoxx - apis, microservices, et le service mesh
 

Recently uploaded

Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Christo Ananth
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
rknatarajan
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Christo Ananth
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 

Recently uploaded (20)

Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
Vivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design SpainVivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design Spain
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 

istio: service mesh for all

  • 1. istio.io service mesh for all Mandar Jog
  • 2. ● What is a Service Mesh ● How we got here: A story ● Architecture and details ● Q & A Agenda
  • 3. What is a ‘Service Mesh’ ? A network for services, not bytes ●Traffic Control ●Visibility ●Resiliency & Efficiency ●Security ●Policy Enforcement
  • 6. 1. Gained development velocity ! 2. Easy testing because of abstractions. 3. Scale services independently. Problem Solved! Micro Services FTW
  • 7. Yay ! 1. Gained development velocity ! 2. Easy testing because of abstractions. 3. Scale services independently. Problem Solved! I am so bloody magical !
  • 8. What have we lost? 1. I replaced a reliable in-process call with an unreliable rpc. 2. Trivial single stepping replaced by … ? 3. Secure in-process communication is replaced by insecure network. 4. Access control within process was a NOOP 5. Latency went up That abstraction was leaky ...
  • 9. Can we fix it? 1. Add retry logic to the application code. 2. Add entry-exit traces. 3. Secure inter service connections with strong authentication. Now that we are adding code … choose the rpc endpoint intelligently a. Endpoints with low latency. b. Endpoints with warm caches.
  • 10. Service Mesh ● Address service level concerns. ● Unlock the full power of microservices.
  • 11. Weaving the mesh svcA sidecaringress Service A svcB sidecar Service B External Services HTTP/1.1, HTTP/2, gRPC, TCP with or without TLS HTTP/1.1, HTTP/2, gRPC, TCP with or without TLS Intern et Outbound features: ❖ Service authentication ❖ Load balancing ❖ Retry and circuit breaker ❖ Fine-grained routing ❖ Telemetry ❖ Request Tracing ❖ Fault Injection Inbound features: ❖ Service authentication ❖ Authorization ❖ Rate limits ❖ Load shedding ❖ Telemetry ❖ Request Tracing ❖ Fault Injection
  • 12. Architecture svcA Envoy Pod Service A svcB Envoy Service B Pilot Control Plane API Mixer Control flow during request processing Istio-Auth Traffic is transparently intercepted and proxied. App is unaware of Envoy’s presence cache cache
  • 13. istio Service Mesh A network for services, not bytes ● Traffic Control ● Visibility ● Resiliency & Efficiency ● Security ● Policy Enforcement
  • 14. Application Rollout svcA Envoy Pod Service A svcB Envoy ServiceB http://serviceB.example Pod Labels: version: v1.5 env: us-prod svcB Envoy Pod Labels: version: v2.0- alpha, env:us- serviceB.example.cluster.local Traffic routing rules 99% 1% Rules API Pilot Traffic control is decoupled from infrastructure scaling // A simple traffic splitting rule destination: serviceB.example.cluster.local match: source: serviceA.example.cluster.local route: - tags: version: v1.5 env: us-prod weight: 99 - tags: version: v2.0-alpha env: us-staging weight: 1
  • 15. svcA Service A svcB Service B version: v1 Pod 3 Pod 2 Pod 1 Content-based traffic steering svcA Service A svcB Service B version: v1 Pod 3 Pod 2 Pod 1 svcB’ version: canary Pod 4 Traffic Steering // Content-based traffic steering rule destination: serviceB.example.cluster.local match: httpHeaders: user-agent: regex: ^(.*?;)?(iPhone)(;.*)?$ precedence: 2 route: - tags: version: canary
  • 16. Istio Service Mesh A network for services, not bytes ● Traffic Control ● Visibility ● Resiliency & Efficiency ● Security ● Policy Enforcement
  • 17. Visibility Monitoring & tracing should not be an afterthought in the infrastructure Goals ● Metrics without instrumenting apps ● Consistent metrics across fleet ● Trace flow of requests across services ● Portable across metric backend providers Istio Zipkin tracing dashboard Istio - Grafana dashboard w/ Prometheus backend
  • 18. Metrics flow svcA Envoy Pod Service A svcB Envoy Service B API: /svcB Latency: 10ms Status Code: 503 Src: 10.0.0.1 Dst: 10.0.0.2 …... InfluxDB Promethe usAdapter InfluxDB Adapter Custom Adapter Mixer ● Mixer collects metrics emitted by Envoys ● Adapters in the Mixer normalize and forward to monitoring backends ● Metrics backend can be swapped at runtime Prometheus InfluxDB InfluxDB Custom backend Prometheus Prometheus
  • 19. Visibility: Tracing svcA Envoy Pod Service A svcB Envoy Service B Trace Headers X-B3-TraceId X-B3-SpanId X-B3-ParentSpanId X-B3-Sampled X-B3-Flags svcC Envoy Service C Spa ns Spa ns Promethe us InfluxDB Zipkin Adapter Stackdriv erAdapter Custom Adapter Mixer Promethe us Zipkin InfluxDB Stackdriv er Custom backend ● Application do not have to deal with generating spans or correlating causality ● Envoys generate spans ○ Applications need to *forward* context headers on outbound calls ● Envoys send traces to Mixer ● Adapters at Mixer send traces to respective backends
  • 20. Istio Service Mesh A network for services, not bytes ● Traffic Control ● Visibility ● Resiliency & Efficiency ● Security ● Control
  • 21. Resiliency Istio adds fault tolerance to your application without any changes to code Resilience features ❖ Timeouts ❖ Retries with timeout budget ❖ Circuit breakers ❖ Health checks ❖ AZ-aware load balancing w/ automatic failover ❖ Control connection pool size and request load ❖ Systematic fault injection // Circuit breakers destination: serviceB.example.cluster.local policy: - tags: version: v1 circuitBreaker: simpleCb: httpConsecutiveErrors: 7 sleepWindow: 5m httpDetectionInterval: 1m
  • 22. Resiliency Testing Systematic fault injection to identify weaknesses in failure recovery policies ○ HTTP/gRPC error codes ○ Delay injection svcA Envoy Service A svcB Envoy Service B svcC Envoy Service C Timeout: 100ms Retries: 3 300ms Timeout: 200ms Retries: 2 400ms
  • 23. Efficiency ● L7 load balancing ○ Passive/Active health checks, circuit breaks ○ Backend subsets ○ Affinity ● TLS offload ○ No more JSSE or stale SSL versions. ● HTTP/2 and gRPC proxying
  • 24. Istio Service Mesh A network for services, not bytes ● Traffic Control ● Visibility ● Resiliency & Efficiency ● Security ● Policy Enforcement
  • 25. Securing Microservices ● Verifiable identity ● Secure naming / addressing ● Traffic encryption ● Revocation
  • 26. Istio - Security at Scale spiffe.io
  • 27. Istio Service Mesh A network for services, not bytes ● Traffic Control ● Visibility ● Resiliency & Efficiency ● Security ● Policy Enforcement
  • 28. Putting it all together svcA Envoy Pod Service A svcB Envoy Service B Pilot Control Plane API Mixer Control flow during request processing Istio-Auth
  • 29. What does Mixer do? ● Check() ○ Precondition checking ○ Quotas & Rate Limiting ● Report() ○ telemetry reporting ● Primary point of extensibility ● Enabler for platform mobility ● Operator-focused configuration model
  • 30. Mixer - Proxy Filter Extension
  • 31. Mixer Metrics kind: metrics metadata: name: requestcount spec: value: “1” dimensions: Destination_service: destination.service Source_service: source.service Response_code: response.code kind: rule metadata: name: prometheus spec: match: request.headers[“x-user”] != “admin” actions: - handler: handler.prometheus instances: - requestcount.metric