Kubernetes sidecar pattern as a swiss-army knife for microservices.pptx

Abhishek Tiwari
Abhishek TiwariSenior Software Development Manager em Amazon
@abhishektiwari
Kubernetes sidecar
pattern as a swiss-army
knife for microservices
Abhishek Tiwari
https://www.abhishek-tiwari.com
@abhishektiwari
A bit about me
● Director of Engineering at HelloFresh
● An early adopter of K8S ~ Dec 2015
● Ran large K8s clusters in AWS and GCP
● A range of mission critical stateles workloads
@abhishektiwari
scaling microservices require excellence in devops
Amazon Twitter
@abhishektiwari
J-CURVE OF DevOPs Excellence
Credits: Accelerate: State of DevOps 2018: Strategies for a New Economy | Does DevOps Matter?
7% Elite
@abhishektiwari
Common DevOps Concerns
A
B
C
Service-to-service
communication
A
B
C
Securing services and
communication
A
B
C
Control and enforce
policies
@abhishektiwari
Common DevOps Concerns
A
B
C
Service observability
and telemetry
A
B
C
Fault tolerance and
circuit breakers
A
B
C
Deployments and
service topologies
@abhishektiwari
Old Approach
fault tolerance libraries
Implementation specific to
- Languages (Java/Scala) or
- Frameworks or
- Server (Tomcat/Jetty)or
- Protocols (Thrift/RPC)
@abhishektiwari
Kubernetes
Kubernetes has now become the de facto standard
for deploying containerized applications at scale
in private, public and hybrid cloud.
@abhishektiwari
High-level architecture
Kubernetes
Master
Node Node Node
Pod Pod
Pod Pod
Pod
Pod
Pod
Pod
Pod
Pod
Pod Pod
Pods are scheduled and packed dynamically on Kubernetes nodes
Docker Kubelet Kube Proxy Docker Kubelet Kube Proxy Docker Kubelet Kube Proxy
@abhishektiwari
PODS
A pod can co-schedule multiple containers as an atomic unit.
MySQL
Django
Nginx
MySQL
Django
Nginx
Co-scheduled multiple
containers as pod
Scheduled independently as
containers
@abhishektiwari
Design patterns for
container-based
distributed systems
@abhishektiwari
Design patterns for
container-based
distributed systems
3 Essential
Patterns
● Single-pod single-container patterns
● Single-pod multiple-container patterns
● multi-pod patterns
@abhishektiwari
MySQL
Django
Nginx
MySQL
Django
Nginx
Single-pod, multiple-
containers pattern
Single-pod, single-
container pattern
PODS
MySQL
Django
Nginx
1 2
3
Combination of 1 & 2
@abhishektiwari
MySQL
3
Combination of 1 & 2
Django
Nginx
Django
Nginx
Stateless Autoscaling of PODS
Django
Nginx
@abhishektiwari
Main container
Sidecar container
Sidecar pattern
A sidecar is a utility container
in the Pod and its whole purpose
is to support the main container
Fluentd
Python App
error.log
@abhishektiwari
● Independent resource
● Completely reusable
● Graceful degradation
● Seperate life cycle
● Runtime injection
● Multiple per main
● Peripheral tasks
Benefits of
Sidecar
@abhishektiwari
Envoy Linkerd
Sidecar proxy (aka data plane)
traefik
Intelligent service proxy which mediate
and/or control all network communication
Nginx
HAProxy
@abhishektiwari
Nginx Sidecar proxy
MySQL
Django
Nginx
Sidecar Nginx proxy mediates
all traffic to and from main
Django container
Python App
@abhishektiwari
Service to service communication
Service-A
Envoy
Service-B
Envoy
Service-C
Envoy
Envoy.yaml: Routing
virtual_hosts:
- name: backend
domains:
- "*"
routes:
- match:
prefix: "/service/a"
route:
cluster: service_a
- match:
prefix: "/service/b"
route:
cluster: service_b
- match:
prefix: "/service/c"
route:
cluster: service_c
@abhishektiwari
Service to service communication
Service-A
Envoy
Service-B
Envoy
Service-C
Envoy
Envoy.yaml: Load Balancing
clusters:
- name: service_a
connect_timeout: 0.25s
type: strict_dns
lb_policy: round_robin
http2_protocol_options: {}
hosts:
- socket_address:
address: service_a
port_value: 443
- name: service_b
connect_timeout: 0.25s
type: strict_dns
lb_policy: round_robin
http2_protocol_options: {}
hosts:
- socket_address:
address: service_b
port_value: 443
@abhishektiwari
Securing services and communication
Service-A
Envoy
Service-B
Envoy
Service-C
Envoy
Envoy.yaml: JWT Authentication
providers:
jwt_provider1:
issuer: https://auth0.com
audiences:
audience1
local_jwks:
inline_string: PUBLIC-KEY
rules:
- match:
prefix: /health
- match:
prefix: /api
requires:
provider_and_audiences:
provider_name: jwt_provider1
audiences:
api_audience
- match:
prefix: /
requires:
provider_name: jwt_provider1
@abhishektiwari
Fault tolerance and circuit breakers
Service-A
Envoy
Service-B
Envoy
Service-C
Envoy
Envoy.yaml: Circuit Breakers
circuit_breakers:
thresholds:
max_connections: 1
max_pending_requests: 1
max_requests: 1
@abhishektiwari
Fault tolerance and circuit breakers
Service-A
Envoy
Service-B
Envoy
Service-C
Envoy
Envoy.yaml: Retry/Timeout
retry_policy:
retry_on: 5xx
num_retries: 3
per_try_timeout: 5s
@abhishektiwari
Fault tolerance and circuit breakers
Service-A
Envoy
Service-B
Envoy
Service-C
Envoy
Envoy.yaml: Fault/Delay
http_filters:
- name: envoy.fault
config:
delay:
type: fixed
fixed_delay: 10s
percentage:
numerator: 50
denominator: HUNDRED
@abhishektiwari
Service observability and telemetry
Service-A
Envoy
Service-B
Envoy
Service-C
Envoy
Envoy.yaml: Zipkin Tracing
tracing:
http:
name: zipkin
typed_config:
type: zipkin
collector_cluster: zipkin
collector_endpoint: "/zipc"
@abhishektiwari
Configuration hell
Static
configs
Envoy
Envoy
Envoy
@abhishektiwari
We need a control plane
Control Plane
Manages and configures the proxies, enforce policies and collect telemetry
Service-A
Envoy
Service-B
Envoy
Service-C
Envoy
Data Plane
@abhishektiwari
Control plane + Data Plane = Service mesh
@abhishektiwari
Lastly
What microservices are part of my
service mesh and how are
they connected?
@abhishektiwari
THanks
Q&A
1 de 30

Recomendados

[DW Webinar] Effective Management of APIs and the Edge when Adopting Kubernetes por
[DW Webinar] Effective Management of APIs and the Edge when Adopting Kubernetes[DW Webinar] Effective Management of APIs and the Edge when Adopting Kubernetes
[DW Webinar] Effective Management of APIs and the Edge when Adopting KubernetesDaniel Bryant
232 visualizações28 slides
Webinar: Effective Management of APIs and the Edge when Adopting Kubernetes por
Webinar: Effective Management of APIs and the Edge when Adopting Kubernetes Webinar: Effective Management of APIs and the Edge when Adopting Kubernetes
Webinar: Effective Management of APIs and the Edge when Adopting Kubernetes Ambassador Labs
132 visualizações29 slides
Openshift serverless Solution por
Openshift serverless SolutionOpenshift serverless Solution
Openshift serverless SolutionRyan ZhangCheng
124 visualizações46 slides
All About Microservices and OpenSource Microservice Frameworks por
All About Microservices and OpenSource Microservice FrameworksAll About Microservices and OpenSource Microservice Frameworks
All About Microservices and OpenSource Microservice FrameworksMohammad Asif Siddiqui
331 visualizações62 slides
Developing reliable applications with .net core and AKS por
Developing reliable applications with .net core and AKSDeveloping reliable applications with .net core and AKS
Developing reliable applications with .net core and AKSAlessandro Melchiori
271 visualizações32 slides
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz) por
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)QAware GmbH
501 visualizações121 slides

Mais conteúdo relacionado

Similar a Kubernetes sidecar pattern as a swiss-army knife for microservices.pptx

[Confoo Montreal 2020] Build Your Own Serverless with Knative - Alex Gervais por
[Confoo Montreal 2020] Build Your Own Serverless with Knative - Alex Gervais[Confoo Montreal 2020] Build Your Own Serverless with Knative - Alex Gervais
[Confoo Montreal 2020] Build Your Own Serverless with Knative - Alex GervaisAmbassador Labs
292 visualizações40 slides
Jakarta Tech Talk: How to develop your first cloud-native Application with Java por
Jakarta Tech Talk: How to develop your first cloud-native Application with JavaJakarta Tech Talk: How to develop your first cloud-native Application with Java
Jakarta Tech Talk: How to develop your first cloud-native Application with JavaNiklas Heidloff
793 visualizações59 slides
PlatformCon 23: "The Busy Platform Engineers Guide to API Gateways" por
PlatformCon 23: "The Busy Platform Engineers Guide to API Gateways"PlatformCon 23: "The Busy Platform Engineers Guide to API Gateways"
PlatformCon 23: "The Busy Platform Engineers Guide to API Gateways"Daniel Bryant
13 visualizações22 slides
Introduction to kubernetes por
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetesGabriel Carro
228 visualizações182 slides
TechTalk: Extend Existing Architectures to Digital Endpoints with CA API Mana... por
TechTalk: Extend Existing Architectures to Digital Endpoints with CA API Mana...TechTalk: Extend Existing Architectures to Digital Endpoints with CA API Mana...
TechTalk: Extend Existing Architectures to Digital Endpoints with CA API Mana...CA Technologies
1K visualizações20 slides
Designing API: REST | gRPC | GraphQL, which one should you pick? - Cedrick Lu... por
Designing API: REST | gRPC | GraphQL, which one should you pick? - Cedrick Lu...Designing API: REST | gRPC | GraphQL, which one should you pick? - Cedrick Lu...
Designing API: REST | gRPC | GraphQL, which one should you pick? - Cedrick Lu...Shift Conference
104 visualizações36 slides

Similar a Kubernetes sidecar pattern as a swiss-army knife for microservices.pptx(20)

[Confoo Montreal 2020] Build Your Own Serverless with Knative - Alex Gervais por Ambassador Labs
[Confoo Montreal 2020] Build Your Own Serverless with Knative - Alex Gervais[Confoo Montreal 2020] Build Your Own Serverless with Knative - Alex Gervais
[Confoo Montreal 2020] Build Your Own Serverless with Knative - Alex Gervais
Ambassador Labs292 visualizações
Jakarta Tech Talk: How to develop your first cloud-native Application with Java por Niklas Heidloff
Jakarta Tech Talk: How to develop your first cloud-native Application with JavaJakarta Tech Talk: How to develop your first cloud-native Application with Java
Jakarta Tech Talk: How to develop your first cloud-native Application with Java
Niklas Heidloff793 visualizações
PlatformCon 23: "The Busy Platform Engineers Guide to API Gateways" por Daniel Bryant
PlatformCon 23: "The Busy Platform Engineers Guide to API Gateways"PlatformCon 23: "The Busy Platform Engineers Guide to API Gateways"
PlatformCon 23: "The Busy Platform Engineers Guide to API Gateways"
Daniel Bryant13 visualizações
Introduction to kubernetes por Gabriel Carro
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
Gabriel Carro228 visualizações
TechTalk: Extend Existing Architectures to Digital Endpoints with CA API Mana... por CA Technologies
TechTalk: Extend Existing Architectures to Digital Endpoints with CA API Mana...TechTalk: Extend Existing Architectures to Digital Endpoints with CA API Mana...
TechTalk: Extend Existing Architectures to Digital Endpoints with CA API Mana...
CA Technologies1K visualizações
Designing API: REST | gRPC | GraphQL, which one should you pick? - Cedrick Lu... por Shift Conference
Designing API: REST | gRPC | GraphQL, which one should you pick? - Cedrick Lu...Designing API: REST | gRPC | GraphQL, which one should you pick? - Cedrick Lu...
Designing API: REST | gRPC | GraphQL, which one should you pick? - Cedrick Lu...
Shift Conference104 visualizações
PortoTechHub - Hail Hydrate! From Stream to Lake with Apache Pulsar and Friends por Timothy Spann
PortoTechHub  - Hail Hydrate! From Stream to Lake with Apache Pulsar and FriendsPortoTechHub  - Hail Hydrate! From Stream to Lake with Apache Pulsar and Friends
PortoTechHub - Hail Hydrate! From Stream to Lake with Apache Pulsar and Friends
Timothy Spann986 visualizações
Intro to GitOps with Weave GitOps, Flagger and Linkerd por Weaveworks
Intro to GitOps with Weave GitOps, Flagger and LinkerdIntro to GitOps with Weave GitOps, Flagger and Linkerd
Intro to GitOps with Weave GitOps, Flagger and Linkerd
Weaveworks85 visualizações
GlueCon 2018: Are REST APIs Still Relevant Today? por LaunchAny
GlueCon 2018: Are REST APIs Still Relevant Today?GlueCon 2018: Are REST APIs Still Relevant Today?
GlueCon 2018: Are REST APIs Still Relevant Today?
LaunchAny1.9K visualizações
Resilient Microservices with Spring Cloud por VMware Tanzu
Resilient Microservices with Spring CloudResilient Microservices with Spring Cloud
Resilient Microservices with Spring Cloud
VMware Tanzu1.6K visualizações
I Love APIs 2015 : Zero to Thousands TPS Private Cloud Operations Workshop por Apigee | Google Cloud
I Love APIs 2015 : Zero to Thousands TPS Private Cloud Operations WorkshopI Love APIs 2015 : Zero to Thousands TPS Private Cloud Operations Workshop
I Love APIs 2015 : Zero to Thousands TPS Private Cloud Operations Workshop
Apigee | Google Cloud6.7K visualizações
DevOpsCon 2020: The Past, Present, and Future of Cloud Native API Gateways por Daniel Bryant
DevOpsCon 2020: The Past, Present, and Future of Cloud Native API GatewaysDevOpsCon 2020: The Past, Present, and Future of Cloud Native API Gateways
DevOpsCon 2020: The Past, Present, and Future of Cloud Native API Gateways
Daniel Bryant259 visualizações
End to end Machine Learning using Kubeflow - Build, Train, Deploy and Manage por Animesh Singh
End to end Machine Learning using Kubeflow - Build, Train, Deploy and ManageEnd to end Machine Learning using Kubeflow - Build, Train, Deploy and Manage
End to end Machine Learning using Kubeflow - Build, Train, Deploy and Manage
Animesh Singh1.9K visualizações
Shift Dev Conf API por Cédrick Lunven
Shift Dev Conf APIShift Dev Conf API
Shift Dev Conf API
Cédrick Lunven49 visualizações
Pros and Cons of a MicroServices Architecture talk at AWS ReInvent por Sudhir Tonse
Pros and Cons of a MicroServices Architecture talk at AWS ReInventPros and Cons of a MicroServices Architecture talk at AWS ReInvent
Pros and Cons of a MicroServices Architecture talk at AWS ReInvent
Sudhir Tonse18.7K visualizações
SpringOne Platform 2018 Recap in 5 minutes por Rohit Kelapure
SpringOne Platform 2018 Recap in 5 minutesSpringOne Platform 2018 Recap in 5 minutes
SpringOne Platform 2018 Recap in 5 minutes
Rohit Kelapure165 visualizações
Integration Microservices por Kasun Indrasiri
Integration MicroservicesIntegration Microservices
Integration Microservices
Kasun Indrasiri7.1K visualizações
Building a scalable microservice architecture with envoy, kubernetes and istio por SAMIR BEHARA
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
SAMIR BEHARA1.1K visualizações
Microservices with Spring Cloud and Netflix OSS por Denis Danov
Microservices with Spring Cloud and Netflix OSSMicroservices with Spring Cloud and Netflix OSS
Microservices with Spring Cloud and Netflix OSS
Denis Danov2.1K visualizações
AllTheTalks 2020: "The Past, Present, and Future of Cloud Native API Gateways" por Daniel Bryant
AllTheTalks 2020: "The Past, Present, and Future of Cloud Native API Gateways"AllTheTalks 2020: "The Past, Present, and Future of Cloud Native API Gateways"
AllTheTalks 2020: "The Past, Present, and Future of Cloud Native API Gateways"
Daniel Bryant560 visualizações

Último

2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx por
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptxanimuscrm
13 visualizações19 slides
HarshithAkkapelli_Presentation.pdf por
HarshithAkkapelli_Presentation.pdfHarshithAkkapelli_Presentation.pdf
HarshithAkkapelli_Presentation.pdfharshithakkapelli
11 visualizações16 slides
SAP FOR TYRE INDUSTRY.pdf por
SAP FOR TYRE INDUSTRY.pdfSAP FOR TYRE INDUSTRY.pdf
SAP FOR TYRE INDUSTRY.pdfVirendra Rai, PMP
23 visualizações3 slides
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J... por
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...Deltares
9 visualizações24 slides
SAP FOR CONTRACT MANUFACTURING.pdf por
SAP FOR CONTRACT MANUFACTURING.pdfSAP FOR CONTRACT MANUFACTURING.pdf
SAP FOR CONTRACT MANUFACTURING.pdfVirendra Rai, PMP
11 visualizações2 slides
What Can Employee Monitoring Software Do?​ por
What Can Employee Monitoring Software Do?​What Can Employee Monitoring Software Do?​
What Can Employee Monitoring Software Do?​wAnywhere
21 visualizações11 slides

Último(20)

2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx por animuscrm
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
animuscrm13 visualizações
HarshithAkkapelli_Presentation.pdf por harshithakkapelli
HarshithAkkapelli_Presentation.pdfHarshithAkkapelli_Presentation.pdf
HarshithAkkapelli_Presentation.pdf
harshithakkapelli11 visualizações
SAP FOR TYRE INDUSTRY.pdf por Virendra Rai, PMP
SAP FOR TYRE INDUSTRY.pdfSAP FOR TYRE INDUSTRY.pdf
SAP FOR TYRE INDUSTRY.pdf
Virendra Rai, PMP23 visualizações
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J... por Deltares
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...
Deltares9 visualizações
SAP FOR CONTRACT MANUFACTURING.pdf por Virendra Rai, PMP
SAP FOR CONTRACT MANUFACTURING.pdfSAP FOR CONTRACT MANUFACTURING.pdf
SAP FOR CONTRACT MANUFACTURING.pdf
Virendra Rai, PMP11 visualizações
What Can Employee Monitoring Software Do?​ por wAnywhere
What Can Employee Monitoring Software Do?​What Can Employee Monitoring Software Do?​
What Can Employee Monitoring Software Do?​
wAnywhere21 visualizações
Fleet Management Software in India por Fleetable
Fleet Management Software in India Fleet Management Software in India
Fleet Management Software in India
Fleetable11 visualizações
DSD-INT 2023 European Digital Twin Ocean and Delft3D FM - Dols por Deltares
DSD-INT 2023 European Digital Twin Ocean and Delft3D FM - DolsDSD-INT 2023 European Digital Twin Ocean and Delft3D FM - Dols
DSD-INT 2023 European Digital Twin Ocean and Delft3D FM - Dols
Deltares7 visualizações
DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge... por Deltares
DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge...DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge...
DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge...
Deltares16 visualizações
Roadmap y Novedades de producto por Neo4j
Roadmap y Novedades de productoRoadmap y Novedades de producto
Roadmap y Novedades de producto
Neo4j50 visualizações
Tridens DevOps por Tridens
Tridens DevOpsTridens DevOps
Tridens DevOps
Tridens9 visualizações
A first look at MariaDB 11.x features and ideas on how to use them por Federico Razzoli
A first look at MariaDB 11.x features and ideas on how to use themA first look at MariaDB 11.x features and ideas on how to use them
A first look at MariaDB 11.x features and ideas on how to use them
Federico Razzoli45 visualizações
DSD-INT 2023 Machine learning in hydraulic engineering - Exploring unseen fut... por Deltares
DSD-INT 2023 Machine learning in hydraulic engineering - Exploring unseen fut...DSD-INT 2023 Machine learning in hydraulic engineering - Exploring unseen fut...
DSD-INT 2023 Machine learning in hydraulic engineering - Exploring unseen fut...
Deltares6 visualizações
DevsRank por devsrank786
DevsRankDevsRank
DevsRank
devsrank78611 visualizações
El Arte de lo Possible por Neo4j
El Arte de lo PossibleEl Arte de lo Possible
El Arte de lo Possible
Neo4j38 visualizações
Neo4j y GenAI por Neo4j
Neo4j y GenAI Neo4j y GenAI
Neo4j y GenAI
Neo4j42 visualizações
DSD-INT 2023 Modelling litter in the Yarra and Maribyrnong Rivers (Australia)... por Deltares
DSD-INT 2023 Modelling litter in the Yarra and Maribyrnong Rivers (Australia)...DSD-INT 2023 Modelling litter in the Yarra and Maribyrnong Rivers (Australia)...
DSD-INT 2023 Modelling litter in the Yarra and Maribyrnong Rivers (Australia)...
Deltares9 visualizações
Software evolution understanding: Automatic extraction of software identifier... por Ra'Fat Al-Msie'deen
Software evolution understanding: Automatic extraction of software identifier...Software evolution understanding: Automatic extraction of software identifier...
Software evolution understanding: Automatic extraction of software identifier...
Ra'Fat Al-Msie'deen7 visualizações
.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra... por Marc Müller
.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra....NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra...
.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra...
Marc Müller38 visualizações
WebAssembly por Jens Siebert
WebAssemblyWebAssembly
WebAssembly
Jens Siebert33 visualizações

Kubernetes sidecar pattern as a swiss-army knife for microservices.pptx

Notas do Editor

  1. How many of you are developing microservices as part of your tech footprint? How many of you have more than 20 microservices in your tech ecosystem? How many of you are running microservice on top Kubernetes or in containers? Challenges faced when scaling microservices How Kubernetes and sidecar pattern help to
  2. Datadog. Stackdriver SumoLogic
  3. Independent resource accounting and allocation Sidecar can be paired with numerous different "main" containers Containing failure boundary, making it a graceful degradation Independent testing, packaging, upgrade, deployment, & rollback Runtime injection of sidecar i.e. no change in legacy pods/containers