Professional Documents
Culture Documents
Service Mesh
benevides@redhat.com
@rafabene
Link http://bit.ly/istio-kubernetes
@rafabene 1
Rafael Benevides
Director of Developer Experience at Red Hat
benevides@redhat.com
@rafabene
Java Certifications:
SCJA / SCJP / SCWCD / SCBCD / SCEA
JBoss Certifications:
JBCD / JBCAA
Red Hat Certifications:
OpenShift / Containers / Ansible
Other Certifications:
SAP Netweaver / ITIL / IBM Software Quality
@rafabene - http://bit.ly/istio-kubernetes
bit.ly/mono2microdb
@rafabene - http://bit.ly/istio-kubernetes
bit.ly/istio-book
@rafabene - http://bit.ly/istio-kubernetes
http://bit.ly/javamsabook
@rafabene
https://quarkus.io/
Your Journey to Awesomeness
@rafabene - http://bit.ly/istio-kubernetes
Monolith
MyApp
@rafabene - http://bit.ly/istio-kubernetes
Modules
@rafabene - http://bit.ly/istio-kubernetes
Microservices
@rafabene - http://bit.ly/istio-kubernetes
Microservices
@rafabene - http://bit.ly/istio-kubernetes
Microservices
@rafabene - http://bit.ly/istio-kubernetes
Microservices
@rafabene - http://bit.ly/istio-kubernetes
Microservices
@rafabene - http://bit.ly/istio-kubernetes
Network of Services - Mesh
@rafabene - http://bit.ly/istio-kubernetes
Microservices own their Data
@rafabene - http://bit.ly/istio-kubernetes
Multiple Points of Entry
@rafabene - http://bit.ly/istio-kubernetes
Multiple Pipelines
@rafabene - http://bit.ly/istio-kubernetes
Microservices Principles
1. Deployment Independence - updates to an individual microservice have no negative
impact to any other component of the system. Optimized for Replacement
2. Organized around business capabilities
3. Products not Projects
4. API Focused
5. Smart endpoints and dumb pipes
6. Decentralized Governance
7. Decentralized Data Management
8. Infrastructure Automation (infrastructure as code)
9. Design for failure 2 Pizza Team
10. Evolutionary Design
@rafabene - http://bit.ly/istio-kubernetes
Old School New School
@rafabene - http://bit.ly/istio-kubernetes
Microservices == Distributed Computing
OS OS
JVM JVM
Service A Service C
OS
JVM
Service B
@rafabene - http://bit.ly/istio-kubernetes
Fallacies of Distributed Computing
@rafabene - http://bit.ly/istio-kubernetes
Failure of a Service
@rafabene - http://bit.ly/istio-kubernetes
Cascading Failure
X X
X X
X X
X
@rafabene - http://bit.ly/istio-kubernetes
Microservices embedding Capabilities
Container Container
JVM JVM
Service A Service C
Discovery Discovery
Load-balancer Load-balancer
Resiliency Resiliency
Metrics Metrics
Tracing Tracing
Container
JVM
Service B
Discovery
Load-balancer
Resiliency
Metrics
Tracing
@rafabene - http://bit.ly/istio-kubernetes
History of Microservices
AWS EC2 Java EE6 DropWizard Hystrix Eureka Spring Boot Kubernetes
2006 2009 May 2011 March 2012 July 2012 Sept 2013 June 2014 2
0
1
Continuous Agile DevOps NETFLIX Vert.x Ribbon Microservices Docker Microservices 5
Integration Manifesto 2009 to AWS June March Assess March Defined
via XP Feb 2010 2011 2012 Thoughtworks 2013 Thoughtworks
1999 2001 Radar Fowler, Lewis
March 2012 March 2014
@rafabene - http://bit.ly/istio-kubernetes
The Cloud is Born
AWS EC2 Java EE6 DropWizard Hystrix Eureka Spring Boot Kubernetes
2006 2009 May 2011 March 2012 July 2012 Sept 2013 June 2014 2
0
1
Continuous Agile DevOps NETFLIX Vert.x Ribbon Microservices Docker Microservices 5
Integration Manifesto 2009 to AWS June March Assess March Defined
via XP Feb 2010 2011 2012 Thoughtworks 2013 Thoughtworks
1999 2001 Radar Fowler, Lewis
March 2012 March 2014
@rafabene - http://bit.ly/istio-kubernetes
Fat Jars
AWS EC2 Java EE6 DropWizard Hystrix Eureka Spring Boot Kubernetes
2006 2009 May 2011 March 2012 July 2012 Sept 2013 June 2014 2
0
1
Continuous Agile DevOps NETFLIX Vert.x Ribbon Microservices Docker Microservices 5
Integration Manifesto 2009 to AWS June March Assess March Defined
via XP Feb 2010 2011 2012 Thoughtworks 2013 Thoughtworks
1999 2001 Radar Fowler, Lewis
March 2012 March 2014
@rafabene - http://bit.ly/istio-kubernetes
Netflix goes Open Source
AWS EC2 Java EE6 DropWizard Hystrix Eureka Spring Boot Kubernetes
2006 2009 May 2011 March 2012 July 2012 Sept 2013 June 2014 2
0
1
Continuous Agile DevOps NETFLIX Vert.x Ribbon Microservices Docker Microservices 5
Integration Manifesto 2009 to AWS June March Assess March Defined
via XP Feb 2010 2011 2012 Thoughtworks 2013 Thoughtworks
1999 2001 Radar Fowler, Lewis
March 2012 March 2014
@rafabene - http://bit.ly/istio-kubernetes
Perfect Storm for Microservices
AWS EC2 Java EE6 DropWizard Hystrix Eureka Spring Boot Kubernetes
2006 2009 May 2011 March 2012 July 2012 Sept 2013 June 2014 2
0
1
Continuous Agile DevOps NETFLIX Vert.x Ribbon Microservices Docker Microservices 5
Integration Manifesto 2009 to AWS June March Assess March Defined
via XP Feb 2010 2011 2012 Thoughtworks 2013 Thoughtworks
1999 2001 Radar Fowler, Lewis
March 2012 March 2014
@rafabene - http://bit.ly/istio-kubernetes
What's Wrong with Netflix OSS?
Java Only
@rafabene - http://bit.ly/istio-kubernetes
Microservices'ilities
API
Tracing Discovery
Monitoring Invocation
MyService
Logging Elasticity
Authentication Resilience
Pipeline
@rafabene - http://bit.ly/istio-kubernetes
@rafabene - http://bit.ly/istio-kubernetes
Microservices'ilities + Kubernetes
API
Tracing Discovery
Monitoring Invocation
MyService
Logging Elasticity
Authentication Resilience
Pipeline
@rafabene - http://bit.ly/istio-kubernetes
Microservices'ilities + OpenShift
API
Tracing Discovery
Monitoring Invocation
MyService
Logging Elasticity
Authentication Resilience
Pipeline
@rafabene - http://bit.ly/istio-kubernetes
Istio - Sail
(Kubernetes - Helmsman or ship’s pilot)
@rafabene - http://bit.ly/istio-kubernetes
Service Mesh Defined
@rafabene - http://bit.ly/istio-kubernetes
Microservices'ilities + Istio
API
Tracing Discovery
Monitoring Invocation
MyService
Logging Elasticity
Authentication Resilience
Pipeline
@rafabene - http://bit.ly/istio-kubernetes
Microservices embedding Capabilities
Container Container
JVM JVM
Service A
Discovery Before Istio Service C
Discovery
Load-balancer Load-balancer
Resiliency Resiliency
Metrics Metrics
Tracing Tracing
Container
JVM
Service B
Discovery
Load-balancer
Resiliency
Metrics
Tracing
@rafabene - http://bit.ly/istio-kubernetes
Microservices externalizing Capabilities
Pod Pod
Container Container
JVM JVM
Service A
After Istio Service C
Pod
Container
JVM
Service B
Sidecar Container
@rafabene - http://bit.ly/istio-kubernetes
Microservices externalizing Capabilities
Pod Pod
Container Container
JVM JVM
Service A
After Istio
The sidecar intercepts all network traffic
Service C
Pod
Sidecar Container
Container
JVM
Service B
@rafabene - http://bit.ly/istio-kubernetes
Envoy is the current sidecar
Pod Pod
Container Container
JVM JVM
Service A Service C
Pod
Sidecar Container
Container
JVM
Service B
@rafabene - http://bit.ly/istio-kubernetes
Sidecar
https://www.imz-ural.com/blog/waffles-the-sidecar-dog
@rafabene - http://bit.ly/istio-kubernetes
Next Generation Microservices - Service Mesh
@rafabene - http://bit.ly/istio-kubernetes
Istio Data Plane vs Control Plane
Control
Plane Istio Pilot Istio Mixer Istio Galey Istio Citadel
@rafabene - http://bit.ly/istio-kubernetes
Polyglot Microservices Platform circa 2019
NETFLIX Ribbon
@rafabene - http://bit.ly/istio-kubernetes
Observability
@rafabene - http://bit.ly/istio-kubernetes
@rafabene - http://bit.ly/istio-kubernetes
Kiali.io
New Service Graph
@rafabene - http://bit.ly/istio-kubernetes
@rafabene - http://bit.ly/istio-kubernetes
Prometheus
@rafabene - http://bit.ly/istio-kubernetes
How to add an Istio-Proxy (sidecar)?
@rafabene - http://bit.ly/istio-kubernetes
Traffic Control
@rafabene - http://bit.ly/istio-kubernetes
Blue/Green
Deployment
@rafabene - http://bit.ly/istio-kubernetes
Blue/Green Deployment
BUILD
SCM
@rafabene - http://bit.ly/istio-kubernetes
Blue/Green Deployment
BUILD
SCM
@rafabene - http://bit.ly/istio-kubernetes
Blue/Green Deployment
BUILD
SCM
@rafabene - http://bit.ly/istio-kubernetes
Blue/Green Deployment
BUILD
SCM
@rafabene - http://bit.ly/istio-kubernetes
Blue/Green Deployment
SCM BUILD
@rafabene - http://bit.ly/istio-kubernetes
Blue/Green Deployment
SCM
@rafabene - http://bit.ly/istio-kubernetes
Blue/Green Deployment
SCM
x
@rafabene - http://bit.ly/istio-kubernetes
Blue/Green Deployment
SCM
@rafabene - http://bit.ly/istio-kubernetes
Demo Blue/Green
- Only Recommendation-v2
- Only Recommendation-v1
- Both (Delete Rule)
@rafabene - http://bit.ly/istio-kubernetes
Canary
Deployment
@rafabene - http://bit.ly/istio-kubernetes
@rafabene - http://bit.ly/istio-kubernetes
Canary Resuscitator
http://www.openculture.com/2018/05/the-device-invented-to-resuscitate-canaries-in-coal-mines-circa-1896.html
Thanks to Paolo Antinori!
@rafabene - http://bit.ly/istio-kubernetes
Canary Deployment
SCM
@rafabene - http://bit.ly/istio-kubernetes
Canary Deployment
SCM
@rafabene - http://bit.ly/istio-kubernetes
Canary Deployment
SCM
@rafabene - http://bit.ly/istio-kubernetes
Canary Deployment
SCM
@rafabene - http://bit.ly/istio-kubernetes
Canary Deployment
SCM
@rafabene - http://bit.ly/istio-kubernetes
Canary Deployment
SCM
@rafabene - http://bit.ly/istio-kubernetes
Canary Deployment
SCM
@rafabene - http://bit.ly/istio-kubernetes
Canary Deployment
SCM
@rafabene - http://bit.ly/istio-kubernetes
Canary Deployment
SCM
@rafabene - http://bit.ly/istio-kubernetes
Canary Deployment
SCM
@rafabene - http://bit.ly/istio-kubernetes
Canaries with Kubernetes
Pod
Container
JVM
50%
Service A
v1
Route/
Service
Ingress Pod
Container
JVM
Service A 50%
v2
@rafabene - http://bit.ly/istio-kubernetes
Canaries with Istio
Pod
Container
JVM
90%
Service A
v1
Route/
Service
Ingress Pod
Container
JVM
Service A 10%
v2
@rafabene - http://bit.ly/istio-kubernetes
Demo Canary
- 90/10
- 75/25
- Based on User-Agent
@rafabene - http://bit.ly/istio-kubernetes
Dark
Launch
@rafabene - http://bit.ly/istio-kubernetes
Dark Launches with Istio
Pod
Container
JVM
100%
Service A
v1
Mirror
requests
Route/
Service
Ingress
Pod
Container
JVM
Service A 100%
v2
@rafabene
Demo Dark
Launch
@rafabene - http://bit.ly/istio-kubernetes
Service Resiliency
• Retry
• Kiali
X X
X X
X X
X
@rafabene - http://bit.ly/istio-kubernetes
Chaos Testing
@rafabene - http://bit.ly/istio-kubernetes
By Netflix - https://github.com/Netflix/SimianArmy/blob/master/assets/SimianArmy.png, Apache License 2.0,
https://commons.wikimedia.org/w/index.php?curid=63503083
@rafabene - http://bit.ly/istio-kubernetes
Demo Caos
- 503
- Delay
@rafabene - http://bit.ly/istio-kubernetes
Access Control
@rafabene - http://bit.ly/istio-kubernetes
Most Communication Inbound & Internal
@rafabene - http://bit.ly/istio-kubernetes
Outbound/Egress Blocked By Default
✓
@rafabene - http://bit.ly/istio-kubernetes
Demo Egress
- Access http://worldclockapi.com
@rafabene - http://bit.ly/istio-kubernetes
bit.ly/istio-book
@rafabene - http://bit.ly/istio-kubernetes
https://learn.openshift.com/servicemesh
@rafabene - http://bit.ly/istio-kubernetes
Demo
bit.ly/istio-tutorial
@rafabene - http://bit.ly/istio-kubernetes
The End
(but Serverless is coming)
@rafabene - http://bit.ly/istio-kubernetes
@RAFABENE
@rafabene