SlideShare uma empresa Scribd logo
1 de 47
Baixar para ler offline
Make Java Microservices Resilient with Istio
IBM Code Patterns:
http://developer.ibm.com/code
Mangesh Patankar
- Developer Advocate
mapatank@in.ibm.com
@MangeshPatank
Agenda
• Evolution Of Microservice
• Relation of Micro services with Container
Orchestrator (K8s)
• Why Service Mesh (Istio)?
• Features of Istio
• Demo
Evolution of Microservices
Monolithic
Application
to
Microservices
Application
Microservices
Application
Scaling
Microservices
Application
Update
Typically microservices are encapsulated inside containers…
One:One relationship between a microservice and a container
Everyone’s container journey starts with one container….
IBM Cloud - Container Service
At first the growth is easy to handle….
IBM Cloud - Container Service
Microservices
Application
Interactions
- Simple
But soon it is overwhelming…we need container
and microservices management
IBM Cloud - Container Service
Enter Container Orchestrator
IBM Cloud Container Service
Slide Title Goes Here
Container Stack
Physical InfrastructureLayer 1
Virtual InfrastructureLayer 2
Operating SystemLayer 3
Container EngineLayer 4
Orchestration/Scheduling
Service Model
Layer 5
Development Workflow
Opinionated Containers
Layer 6
Kubernetes
Slide Title Goes Here
What is Kubernetes?
• Container orchestrator
• Runs and manages containers
• Supports multiple cloud and bare-metal environments
• Inspired and informed by Google's experiences and internal
systems(Borg, Omega)
• 100% Open source, written in Go
• Manage applications, not machines
• Rich ecosystem of plug-ins for scheduling, storage, networking
Intelligent Scheduling Self-healing Horizontal scaling
Service discovery & load balancing Automated rollouts and rollbacks Secret and configuration management
IBM Cloud- Container Service
Slide Title Goes Here
Kubernetes Architecture
API
UI
CLI
Kubernetes
Master
Worker Node 1
Worker Node 2
Worker Node 3
Worker Node n
Registry
• Etcd
• API Server
• Controller Manager
Server
• Scheduler Server
Slide Title Goes Here
Simplified Kubernetes Cluster
Kubernetes is great for
Microservices…
Why do we need a Service
mesh and what is it?
Kubernetes Service Vs Service Mesh
What	a	k8s	Service	component	cannot	do
• To	get	more	control	of	the	traffic	that	goes	to	this	API
• To	support	many	API	versions
• Do	canary	deployments
• Watch	and	keep	track	of	each	request	that	comes	in
• L7	metrics
• Traffic	Control	- Splitting
• Rate	limiting
• Resiliency	&	Efficiency	- Circuit	breaking
• Visibility
• Security
• Policy	Enforcement	…….
• Lightweight sidecars
to manage traffic
between services
• Sidecars can do
much more
than just load
balancing!
How to build a
‘Service Mesh’ ?
Service Mesh
• Linkerd
• Conduit
• Istio
• ….
Istio
Istio
Concepts
• Pilot - Configures Istio deployments
and propagate configuration to the
other components of the system.
Routing and resiliency rules go here
• Mixer - Responsible for policy
decisions and aggregating telemetry
data from the other components in the
system using a flexible plugin
architecture
• Proxy – Based on Envoy, mediates
inbound and outbound traffic for all
Istio-managed services. It enforces
access control and usage policies, and
provides rich routing, load balancing,
and protocol conversion.
Istio
Concepts
Istio
Concepts
Istio
Architecture
What is a ‘Service Mesh’ ?
A network for services, not bytes
" Resiliecny and efficiency
● Traffic Control
● Visibility
● Security
● Policy Enforcement
• 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
Resiliency
Code Pattern
- Kubernetes,
Microservices
and Istio
Slide Title Goes Here
IBM Cloud Kubernetes Container Service - IKS
IBM Code Pattern
http://developer.ibm.com/code
DEMO
Slide Title Goes Here
Twelve-factor apps make a strong case for designing and implementing your microservices for failure. What that means is with the
proliferation of microservices, failure is inevitable, and applications should be fault-tolerant. Istio, a service mesh, can help make your
microservices resilient without changing application code.
Developer Works Code: https://developer.ibm.com/code/patterns/make-java-microservices-resilient-with-istio/
Github: https://github.com/IBM/resilient-java-microservices-with-istio
IBM	Code
Leverage Istio to create resilient and fault tolerant Microservices
MS-A
Istio Ingress
Envoy
User Input
EnvoyIstio Pilot
Circuit Breaker (
X Max Conn,
Y Max Pending)
Administrator
Set Destination Policy
N requests N requests
Reached maximum connec2ons –
put the incoming requests in pending state
Reached maximum pending
requests - eject all the incoming
requests.
MS-B
MS-AEnvoy
MS-B Pod 2
(Broken)
Istio Pilot
Circuit BreakerAdministrator
Set Destination Policy 503
Load Balancing Pool for MS-B
MS-B Pod 1
(Working)
Eject X minutes
1 2 3
MS-BEnvoy
Istio Ingress
User Input
N requests N requests
Envoy MS-B
MS-B Pod
Istio Pilot
Timeout
X seconds delay
Fault Injection
504 error
Administrator
Set Route Rule
MS-AEnvoy
Envoy MS-B
Istio Ingress N requests
User Input
N requests
What is a ‘Service Mesh’ ?
A network for services, not bytes
● Resiliency & Efficiency
● Traffic Control
● Visibility
● Security
● Policy Enforcement
• // 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
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-
staging
serviceB.example.cluster.loc
Traffic routing
rules
99%
1%
Rules API
Istio-Manager
Traffic Splitting
© IBM Corporation / ConfidentialIBM Cloud I Internal Usage Only
svcA
Service A
svcB
Service B
version: v1
Pod 1
Pod 2
Pod 3
Content-based traffic steering
svcA
Service A
svcB
Service B
version: v1
Pod 1
Pod 2
Pod 3
svcB’
version: canary
Pod 4
• // Content-based traffic steering rule
• destination: serviceB.example.cluster.local
match:
httpHeaders:
user-agent:
regex: ^(.*?;)?(iPhone)(;.*)?$
precedence: 2
route:
- tags:
version: canary
Traffic Steering
• 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
Visibility
• Mixer collects metrics emitted by Envoys
• Adapters in the Mixer normalize and
forward to monitoring backends
• Metrics backend can be swapped at
runtime
Pod
Service
A
svcB
Envoy
Service
B
API: /svcB
Latency: 10ms
Status Code: 503
Src: 10.0.0.1
Dst: 10.0.0.2
…...
Prometheu
s
InfluxDB
Prometheus
Adapter
InfluxDB
Adapter
Custom
Adapter
Mixer
Prometheu
ss
InfluxDB
InfluxDB Custom
backend
Metric Flow
Envoy
svcA
• 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 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
Span
s
Span
s
Prometheu
s
InfluxDB
Zipkin
Adapter
Stackdriver
Adapter
Custom
Adapter
Mixer
Prometheu
sZipkin
InfluxDB
Stackdriver Custom
backend
Visibility : Tracing
Slide Title Goes Here
Microservices and containers have changed application design and deployment patterns. They have also introduced new challenges, such as
service discovery, routing, failure handling, and visibility to microservices. Kubernetes can handle multiple container-based workloads, including
microservices, but when it comes to more sophisticated features like traffic management, failure handling, and resiliency, a microservices mesh
like Istio is required.
Developer Works Code: https://developer.ibm.com/code/patterns/manage-microservices-traffic-using-istio/
Github: https://github.com/IBM/microservices-traffic-management-using-istio
IBM Code:
Manage micro services traffic using Istio on Kubernetes
Slide Title Goes Here
Microservices and containers have changed application design and deployment patterns. They have also introduced new challenges, such as
service discovery, routing, failure handling, and visibility to microservices. Kubernetes can handle multiple container-based workloads, including
microservices, but when it comes to more sophisticated features like traffic management, failure handling, and resiliency, a microservices mesh
like Istio is required.
Developer Works Code: https://developer.ibm.com/code/journey/manage-microservices-traffic-using-istio/
Github: https://github.com/IBM/microservices-traffic-management-using-istio
IBM Code
Manage micro services traffic using Istio on Kubernetes
Summary
• Micro-service	– Evolution	and	need
• Framework	supporting	micro-service	deployment
• Scaling
• Service	Mesh
• Frameworks	for	Service	Mesh
Thank you!

Mais conteúdo relacionado

Mais procurados

DockerCon SF 2015: Resilient Routing and Discovery
DockerCon SF 2015: Resilient Routing and DiscoveryDockerCon SF 2015: Resilient Routing and Discovery
DockerCon SF 2015: Resilient Routing and Discovery
Docker, Inc.
 

Mais procurados (20)

Istio on Kubernetes
Istio on KubernetesIstio on Kubernetes
Istio on Kubernetes
 
Building Cloud Native Applications Using Spring Boot and Spring Cloud
Building Cloud Native Applications Using Spring Boot and Spring CloudBuilding Cloud Native Applications Using Spring Boot and Spring Cloud
Building Cloud Native Applications Using Spring Boot and Spring Cloud
 
Multitenancy on EKS
Multitenancy on EKSMultitenancy on EKS
Multitenancy on EKS
 
Evolve or Fall Behind: Driving Transformation with Containers - Sai Vennam - ...
Evolve or Fall Behind: Driving Transformation with Containers - Sai Vennam - ...Evolve or Fall Behind: Driving Transformation with Containers - Sai Vennam - ...
Evolve or Fall Behind: Driving Transformation with Containers - Sai Vennam - ...
 
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
 The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ... The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
 
Moving Applications into Azure Kubernetes
Moving Applications into Azure KubernetesMoving Applications into Azure Kubernetes
Moving Applications into Azure Kubernetes
 
Introduction to container mangement
Introduction to container mangementIntroduction to container mangement
Introduction to container mangement
 
JCConf.tw 2020 - Building cloud-native applications with Quarkus
JCConf.tw 2020 - Building cloud-native applications with QuarkusJCConf.tw 2020 - Building cloud-native applications with Quarkus
JCConf.tw 2020 - Building cloud-native applications with Quarkus
 
Best Practices with Azure Kubernetes Services
Best Practices with Azure Kubernetes ServicesBest Practices with Azure Kubernetes Services
Best Practices with Azure Kubernetes Services
 
Developing reliable applications with .net core and AKS
Developing reliable applications with .net core and AKSDeveloping reliable applications with .net core and AKS
Developing reliable applications with .net core and AKS
 
Making sense of containers, docker and Kubernetes on Azure.
Making sense of containers, docker and Kubernetes on Azure.Making sense of containers, docker and Kubernetes on Azure.
Making sense of containers, docker and Kubernetes on Azure.
 
Spring Cloud Netflix OSS
Spring Cloud Netflix OSSSpring Cloud Netflix OSS
Spring Cloud Netflix OSS
 
.NET microservices with Azure Service Fabric
.NET microservices with Azure Service Fabric.NET microservices with Azure Service Fabric
.NET microservices with Azure Service Fabric
 
A quick introduction to AKS
A quick introduction to AKSA quick introduction to AKS
A quick introduction to AKS
 
Kubernetes on OpenStack @eBay
Kubernetes on OpenStack @eBayKubernetes on OpenStack @eBay
Kubernetes on OpenStack @eBay
 
DockerCon SF 2015: Resilient Routing and Discovery
DockerCon SF 2015: Resilient Routing and DiscoveryDockerCon SF 2015: Resilient Routing and Discovery
DockerCon SF 2015: Resilient Routing and Discovery
 
Hybris install telco accelerators on aws-ec2
Hybris   install telco accelerators on aws-ec2Hybris   install telco accelerators on aws-ec2
Hybris install telco accelerators on aws-ec2
 
The container ecosystem @ Microsoft A story of developer productivity
The container ecosystem @ MicrosoftA story of developer productivityThe container ecosystem @ MicrosoftA story of developer productivity
The container ecosystem @ Microsoft A story of developer productivity
 
Container DevOps in Azure
Container DevOps in AzureContainer DevOps in Azure
Container DevOps in Azure
 
Sf bay area Kubernetes meetup dec8 2016 - deployment models
Sf bay area Kubernetes meetup dec8 2016 - deployment modelsSf bay area Kubernetes meetup dec8 2016 - deployment models
Sf bay area Kubernetes meetup dec8 2016 - deployment models
 

Semelhante a Make Java Microservices Resilient with Istio - Mangesh - IBM - CC18

Service Mesh on Kubernetes with Istio
Service Mesh on Kubernetes with IstioService Mesh on Kubernetes with Istio
Service Mesh on Kubernetes with Istio
Michelle Holley
 

Semelhante a Make Java Microservices Resilient with Istio - Mangesh - IBM - CC18 (20)

Managing microservices with Istio Service Mesh
Managing microservices with Istio Service MeshManaging microservices with Istio Service Mesh
Managing microservices with Istio Service Mesh
 
ISTIO Deep Dive
ISTIO Deep DiveISTIO Deep Dive
ISTIO Deep Dive
 
Istio Triangle Kubernetes Meetup Aug 2019
Istio Triangle Kubernetes Meetup Aug 2019Istio Triangle Kubernetes Meetup Aug 2019
Istio Triangle Kubernetes Meetup Aug 2019
 
Service mesh in action with onap
Service mesh in action with onapService mesh in action with onap
Service mesh in action with onap
 
Building a scalable microservice architecture with envoy, kubernetes and istio
Building a scalable microservice architecture with envoy, kubernetes and istioBuilding a scalable microservice architecture with envoy, kubernetes and istio
Building a scalable microservice architecture with envoy, kubernetes and istio
 
Service Mesh on Kubernetes with Istio
Service Mesh on Kubernetes with IstioService Mesh on Kubernetes with Istio
Service Mesh on Kubernetes with Istio
 
[APIdays Paris 2019] API Management in Service Mesh Using Istio and WSO2 API ...
[APIdays Paris 2019] API Management in Service Mesh Using Istio and WSO2 API ...[APIdays Paris 2019] API Management in Service Mesh Using Istio and WSO2 API ...
[APIdays Paris 2019] API Management in Service Mesh Using Istio and WSO2 API ...
 
Api service mesh and microservice tooling
Api service mesh and microservice toolingApi service mesh and microservice tooling
Api service mesh and microservice tooling
 
Istio presentation jhug
Istio presentation jhugIstio presentation jhug
Istio presentation jhug
 
APIdays Paris 2019 - Cloud native API Management for Microservices on a Servi...
APIdays Paris 2019 - Cloud native API Management for Microservices on a Servi...APIdays Paris 2019 - Cloud native API Management for Microservices on a Servi...
APIdays Paris 2019 - Cloud native API Management for Microservices on a Servi...
 
Cloud native microservices for systems and applications ieee rev2
Cloud native microservices for systems and applications ieee rev2Cloud native microservices for systems and applications ieee rev2
Cloud native microservices for systems and applications ieee rev2
 
Do You Need A Service Mesh?
Do You Need A Service Mesh?Do You Need A Service Mesh?
Do You Need A Service Mesh?
 
Comparison of Current Service Mesh Architectures
Comparison of Current Service Mesh ArchitecturesComparison of Current Service Mesh Architectures
Comparison of Current Service Mesh Architectures
 
Introduction to Istio Service Mesh
Introduction to Istio Service MeshIntroduction to Istio Service Mesh
Introduction to Istio Service Mesh
 
3298 microservices and how they relate to esb api and messaging - inter con...
3298   microservices and how they relate to esb api and messaging - inter con...3298   microservices and how they relate to esb api and messaging - inter con...
3298 microservices and how they relate to esb api and messaging - inter con...
 
Introduction to Istio for APIs and Microservices meetup
Introduction to Istio for APIs and Microservices meetupIntroduction to Istio for APIs and Microservices meetup
Introduction to Istio for APIs and Microservices meetup
 
APIdays Helsinki 2019 - Impact of Microservices Architecture on API Managemen...
APIdays Helsinki 2019 - Impact of Microservices Architecture on API Managemen...APIdays Helsinki 2019 - Impact of Microservices Architecture on API Managemen...
APIdays Helsinki 2019 - Impact of Microservices Architecture on API Managemen...
 
Reference architectures shows a microservices deployed to Kubernetes
Reference architectures shows a microservices deployed to KubernetesReference architectures shows a microservices deployed to Kubernetes
Reference architectures shows a microservices deployed to Kubernetes
 
Microservice Powered Orchestration
Microservice Powered OrchestrationMicroservice Powered Orchestration
Microservice Powered Orchestration
 
Deep Dive on Microservices
Deep Dive on MicroservicesDeep Dive on Microservices
Deep Dive on Microservices
 

Mais de CodeOps Technologies LLP

Mais de CodeOps Technologies LLP (20)

AWS Serverless Event-driven Architecture - in lastminute.com meetup
AWS Serverless Event-driven Architecture - in lastminute.com meetupAWS Serverless Event-driven Architecture - in lastminute.com meetup
AWS Serverless Event-driven Architecture - in lastminute.com meetup
 
Understanding azure batch service
Understanding azure batch serviceUnderstanding azure batch service
Understanding azure batch service
 
DEVOPS AND MACHINE LEARNING
DEVOPS AND MACHINE LEARNINGDEVOPS AND MACHINE LEARNING
DEVOPS AND MACHINE LEARNING
 
SERVERLESS MIDDLEWARE IN AZURE FUNCTIONS
SERVERLESS MIDDLEWARE IN AZURE FUNCTIONSSERVERLESS MIDDLEWARE IN AZURE FUNCTIONS
SERVERLESS MIDDLEWARE IN AZURE FUNCTIONS
 
BUILDING SERVERLESS SOLUTIONS WITH AZURE FUNCTIONS
BUILDING SERVERLESS SOLUTIONS WITH AZURE FUNCTIONSBUILDING SERVERLESS SOLUTIONS WITH AZURE FUNCTIONS
BUILDING SERVERLESS SOLUTIONS WITH AZURE FUNCTIONS
 
APPLYING DEVOPS STRATEGIES ON SCALE USING AZURE DEVOPS SERVICES
APPLYING DEVOPS STRATEGIES ON SCALE USING AZURE DEVOPS SERVICESAPPLYING DEVOPS STRATEGIES ON SCALE USING AZURE DEVOPS SERVICES
APPLYING DEVOPS STRATEGIES ON SCALE USING AZURE DEVOPS SERVICES
 
BUILD, TEST & DEPLOY .NET CORE APPS IN AZURE DEVOPS
BUILD, TEST & DEPLOY .NET CORE APPS IN AZURE DEVOPSBUILD, TEST & DEPLOY .NET CORE APPS IN AZURE DEVOPS
BUILD, TEST & DEPLOY .NET CORE APPS IN AZURE DEVOPS
 
CREATE RELIABLE AND LOW-CODE APPLICATION IN SERVERLESS MANNER
CREATE RELIABLE AND LOW-CODE APPLICATION IN SERVERLESS MANNERCREATE RELIABLE AND LOW-CODE APPLICATION IN SERVERLESS MANNER
CREATE RELIABLE AND LOW-CODE APPLICATION IN SERVERLESS MANNER
 
CREATING REAL TIME DASHBOARD WITH BLAZOR, AZURE FUNCTION COSMOS DB AN AZURE S...
CREATING REAL TIME DASHBOARD WITH BLAZOR, AZURE FUNCTION COSMOS DB AN AZURE S...CREATING REAL TIME DASHBOARD WITH BLAZOR, AZURE FUNCTION COSMOS DB AN AZURE S...
CREATING REAL TIME DASHBOARD WITH BLAZOR, AZURE FUNCTION COSMOS DB AN AZURE S...
 
WRITE SCALABLE COMMUNICATION APPLICATION WITH POWER OF SERVERLESS
WRITE SCALABLE COMMUNICATION APPLICATION WITH POWER OF SERVERLESSWRITE SCALABLE COMMUNICATION APPLICATION WITH POWER OF SERVERLESS
WRITE SCALABLE COMMUNICATION APPLICATION WITH POWER OF SERVERLESS
 
Training And Serving ML Model Using Kubeflow by Jayesh Sharma
Training And Serving ML Model Using Kubeflow by Jayesh SharmaTraining And Serving ML Model Using Kubeflow by Jayesh Sharma
Training And Serving ML Model Using Kubeflow by Jayesh Sharma
 
Deploy Microservices To Kubernetes Without Secrets by Reenu Saluja
Deploy Microservices To Kubernetes Without Secrets by Reenu SalujaDeploy Microservices To Kubernetes Without Secrets by Reenu Saluja
Deploy Microservices To Kubernetes Without Secrets by Reenu Saluja
 
Leverage Azure Tech stack for any Kubernetes cluster via Azure Arc by Saiyam ...
Leverage Azure Tech stack for any Kubernetes cluster via Azure Arc by Saiyam ...Leverage Azure Tech stack for any Kubernetes cluster via Azure Arc by Saiyam ...
Leverage Azure Tech stack for any Kubernetes cluster via Azure Arc by Saiyam ...
 
YAML Tips For Kubernetes by Neependra Khare
YAML Tips For Kubernetes by Neependra KhareYAML Tips For Kubernetes by Neependra Khare
YAML Tips For Kubernetes by Neependra Khare
 
Must Know Azure Kubernetes Best Practices And Features For Better Resiliency ...
Must Know Azure Kubernetes Best Practices And Features For Better Resiliency ...Must Know Azure Kubernetes Best Practices And Features For Better Resiliency ...
Must Know Azure Kubernetes Best Practices And Features For Better Resiliency ...
 
Monitor Azure Kubernetes Cluster With Prometheus by Mamta Jha
Monitor Azure Kubernetes Cluster With Prometheus by Mamta JhaMonitor Azure Kubernetes Cluster With Prometheus by Mamta Jha
Monitor Azure Kubernetes Cluster With Prometheus by Mamta Jha
 
Jet brains space intro presentation
Jet brains space intro presentationJet brains space intro presentation
Jet brains space intro presentation
 
Functional Programming in Java 8 - Lambdas and Streams
Functional Programming in Java 8 - Lambdas and StreamsFunctional Programming in Java 8 - Lambdas and Streams
Functional Programming in Java 8 - Lambdas and Streams
 
Distributed Tracing: New DevOps Foundation
Distributed Tracing: New DevOps FoundationDistributed Tracing: New DevOps Foundation
Distributed Tracing: New DevOps Foundation
 
"Distributed Tracing: New DevOps Foundation" by Jayesh Ahire
"Distributed Tracing: New DevOps Foundation" by Jayesh Ahire  "Distributed Tracing: New DevOps Foundation" by Jayesh Ahire
"Distributed Tracing: New DevOps Foundation" by Jayesh Ahire
 

Último

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Último (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 

Make Java Microservices Resilient with Istio - Mangesh - IBM - CC18

  • 1. Make Java Microservices Resilient with Istio IBM Code Patterns: http://developer.ibm.com/code Mangesh Patankar - Developer Advocate mapatank@in.ibm.com @MangeshPatank
  • 2. Agenda • Evolution Of Microservice • Relation of Micro services with Container Orchestrator (K8s) • Why Service Mesh (Istio)? • Features of Istio • Demo
  • 7. Typically microservices are encapsulated inside containers… One:One relationship between a microservice and a container Everyone’s container journey starts with one container…. IBM Cloud - Container Service
  • 8. At first the growth is easy to handle…. IBM Cloud - Container Service
  • 10. But soon it is overwhelming…we need container and microservices management IBM Cloud - Container Service
  • 11. Enter Container Orchestrator IBM Cloud Container Service
  • 12. Slide Title Goes Here Container Stack Physical InfrastructureLayer 1 Virtual InfrastructureLayer 2 Operating SystemLayer 3 Container EngineLayer 4 Orchestration/Scheduling Service Model Layer 5 Development Workflow Opinionated Containers Layer 6
  • 14. Slide Title Goes Here What is Kubernetes? • Container orchestrator • Runs and manages containers • Supports multiple cloud and bare-metal environments • Inspired and informed by Google's experiences and internal systems(Borg, Omega) • 100% Open source, written in Go • Manage applications, not machines • Rich ecosystem of plug-ins for scheduling, storage, networking
  • 15. Intelligent Scheduling Self-healing Horizontal scaling Service discovery & load balancing Automated rollouts and rollbacks Secret and configuration management IBM Cloud- Container Service
  • 16. Slide Title Goes Here Kubernetes Architecture API UI CLI Kubernetes Master Worker Node 1 Worker Node 2 Worker Node 3 Worker Node n Registry • Etcd • API Server • Controller Manager Server • Scheduler Server
  • 17. Slide Title Goes Here Simplified Kubernetes Cluster
  • 18. Kubernetes is great for Microservices… Why do we need a Service mesh and what is it?
  • 19. Kubernetes Service Vs Service Mesh What a k8s Service component cannot do • To get more control of the traffic that goes to this API • To support many API versions • Do canary deployments • Watch and keep track of each request that comes in • L7 metrics • Traffic Control - Splitting • Rate limiting • Resiliency & Efficiency - Circuit breaking • Visibility • Security • Policy Enforcement …….
  • 20. • Lightweight sidecars to manage traffic between services • Sidecars can do much more than just load balancing! How to build a ‘Service Mesh’ ?
  • 21. Service Mesh • Linkerd • Conduit • Istio • ….
  • 22. Istio
  • 23. Istio Concepts • Pilot - Configures Istio deployments and propagate configuration to the other components of the system. Routing and resiliency rules go here • Mixer - Responsible for policy decisions and aggregating telemetry data from the other components in the system using a flexible plugin architecture • Proxy – Based on Envoy, mediates inbound and outbound traffic for all Istio-managed services. It enforces access control and usage policies, and provides rich routing, load balancing, and protocol conversion.
  • 27. What is a ‘Service Mesh’ ? A network for services, not bytes " Resiliecny and efficiency ● Traffic Control ● Visibility ● Security ● Policy Enforcement
  • 28. • 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 Resiliency
  • 30. Slide Title Goes Here IBM Cloud Kubernetes Container Service - IKS
  • 32. Slide Title Goes Here Twelve-factor apps make a strong case for designing and implementing your microservices for failure. What that means is with the proliferation of microservices, failure is inevitable, and applications should be fault-tolerant. Istio, a service mesh, can help make your microservices resilient without changing application code. Developer Works Code: https://developer.ibm.com/code/patterns/make-java-microservices-resilient-with-istio/ Github: https://github.com/IBM/resilient-java-microservices-with-istio IBM Code Leverage Istio to create resilient and fault tolerant Microservices
  • 33.
  • 34. MS-A Istio Ingress Envoy User Input EnvoyIstio Pilot Circuit Breaker ( X Max Conn, Y Max Pending) Administrator Set Destination Policy N requests N requests Reached maximum connec2ons – put the incoming requests in pending state Reached maximum pending requests - eject all the incoming requests. MS-B
  • 35. MS-AEnvoy MS-B Pod 2 (Broken) Istio Pilot Circuit BreakerAdministrator Set Destination Policy 503 Load Balancing Pool for MS-B MS-B Pod 1 (Working) Eject X minutes 1 2 3 MS-BEnvoy Istio Ingress User Input N requests N requests Envoy MS-B
  • 36. MS-B Pod Istio Pilot Timeout X seconds delay Fault Injection 504 error Administrator Set Route Rule MS-AEnvoy Envoy MS-B Istio Ingress N requests User Input N requests
  • 37. What is a ‘Service Mesh’ ? A network for services, not bytes ● Resiliency & Efficiency ● Traffic Control ● Visibility ● Security ● Policy Enforcement
  • 38. • // 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 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- staging serviceB.example.cluster.loc Traffic routing rules 99% 1% Rules API Istio-Manager Traffic Splitting
  • 39. © IBM Corporation / ConfidentialIBM Cloud I Internal Usage Only svcA Service A svcB Service B version: v1 Pod 1 Pod 2 Pod 3 Content-based traffic steering svcA Service A svcB Service B version: v1 Pod 1 Pod 2 Pod 3 svcB’ version: canary Pod 4 • // Content-based traffic steering rule • destination: serviceB.example.cluster.local match: httpHeaders: user-agent: regex: ^(.*?;)?(iPhone)(;.*)?$ precedence: 2 route: - tags: version: canary Traffic Steering
  • 40. • 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 Visibility
  • 41. • Mixer collects metrics emitted by Envoys • Adapters in the Mixer normalize and forward to monitoring backends • Metrics backend can be swapped at runtime Pod Service A svcB Envoy Service B API: /svcB Latency: 10ms Status Code: 503 Src: 10.0.0.1 Dst: 10.0.0.2 …... Prometheu s InfluxDB Prometheus Adapter InfluxDB Adapter Custom Adapter Mixer Prometheu ss InfluxDB InfluxDB Custom backend Metric Flow Envoy svcA
  • 42. • 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 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 Span s Span s Prometheu s InfluxDB Zipkin Adapter Stackdriver Adapter Custom Adapter Mixer Prometheu sZipkin InfluxDB Stackdriver Custom backend Visibility : Tracing
  • 43. Slide Title Goes Here Microservices and containers have changed application design and deployment patterns. They have also introduced new challenges, such as service discovery, routing, failure handling, and visibility to microservices. Kubernetes can handle multiple container-based workloads, including microservices, but when it comes to more sophisticated features like traffic management, failure handling, and resiliency, a microservices mesh like Istio is required. Developer Works Code: https://developer.ibm.com/code/patterns/manage-microservices-traffic-using-istio/ Github: https://github.com/IBM/microservices-traffic-management-using-istio IBM Code: Manage micro services traffic using Istio on Kubernetes
  • 44.
  • 45. Slide Title Goes Here Microservices and containers have changed application design and deployment patterns. They have also introduced new challenges, such as service discovery, routing, failure handling, and visibility to microservices. Kubernetes can handle multiple container-based workloads, including microservices, but when it comes to more sophisticated features like traffic management, failure handling, and resiliency, a microservices mesh like Istio is required. Developer Works Code: https://developer.ibm.com/code/journey/manage-microservices-traffic-using-istio/ Github: https://github.com/IBM/microservices-traffic-management-using-istio IBM Code Manage micro services traffic using Istio on Kubernetes
  • 46. Summary • Micro-service – Evolution and need • Framework supporting micro-service deployment • Scaling • Service Mesh • Frameworks for Service Mesh