SlideShare a Scribd company logo
1 of 17
Download to read offline
Way to solve
Microservice
problems with
a Service Mesh
Linkerd 1.x implementation chosen for the purpose of a Demo
Andrii Minchekov
Software Architect
TOC
● Microservices challenges
● Service Mesh
○ Why
○ Overview
○ Features
○ Pros/cons
○ Frameworks comparison
○ Linkerd Demo
● Questions
Microservice challenges
1. Infrastructure is not reliable and sometimes slow,
partial failures possible
2. Request routing and load balancing is hard under scaling
3. It’s difficult to understand what’s happening in real time.
4. Secure communication between services
5. Dev team requires experience with specific microservice libraries,
technology diversity
6. Ops team need to manage and monitor lots of services, which are
being redeployed regularly.
Why Service Mesh (Linkerd)?
Stakeholder Concerns Benefits
Management Why do we need it?
What is the cost?
What are the risks? Is it mature
technology?
What dependencies are we introducing
to our business?
● We have fewer outages
● Our services are resilient
● We receive unified visibility
across all services
● Business services are not
touched at all
● We receive much faster pace of
development
● Cost: ~ 2 month to be integrated
against 10 months by integrating
dedicated libs into business apps
1 node needs up to 200mb of
memory, can serve 10k req/sec
● Only 2 years on the market but
based on mature RPC
framework from Twitter (Finagle).
Member of CNCF
● We introduce 1 more technical
service (possibly multiple nodes)
what is the good design principle
to solve complex problems by
introducing layer of indirection
Stakeholder Concerns Benefits
Developers
Operations
What do I have to change?
Do I have to learn a new technology?
How to test it?
Is it reliable?
Will it introduce complexity?
Is it secure?
● Get rid of the complex
communication logic from your
code
● Yes, but it’s only declarative
YAML configuration mostly done
by Senior Engineers or even
Operations team
● System tests should be in place.
It’s just 1 more technical service
to dev infrastructure but allows
easily run parallel versions of a
service, do dynamic routing
per-request
● All service communication metrics
will be at your hand with possible
alerting in case of a problem
No cascading failures, they will
be isolated
● Just 1 more service to deploy and
configure but it allows to do easily
staging, blue/green, canary
deployment
● Yes, consistent TLS across all
services supported
Service Mesh Overview
It’s a dedicated infrastructure layer to manage service to service
communication in a fast and resilient manner for microservices. It abstracts
the mechanics of reliably delivering requests between services.
Service Mesh is typically implemented as an array of lightweight network
proxies that are deployed alongside app code, without the app needing to be
aware.
Features
PROS CONS
● It provides Service Metrics such as success rates,
request volumes, latencies, etc without requiring
changes to application code.
● Easy and quick to adopt Load Balancing, Circuit
Breaker, Timeouts/Retries, Dynamic Routing,
Distributed Tracing, Security for an
existing/legacy applications. Good coordinating
of retries and timeouts across multiple services.
Some Estimates just to implement Discovery
client:
Linkerd setup: ~ 10 days
Add lib per srv: 1 day * 60 services ~ 60 days
● Service developers can focus more on the
business logic while most of service-to-service
communication related functionality is offloaded
to Service Mesh.
● Possibility to easily do Staging, Blue/Green,
Canary, Continuous Deployment, A/B testing
without needing to restart
● Immature
● Only Internal traffic can be handled. No single
entry point is exposed to external clients.
● Resource intensive that increase the number of
runtime instances that you have in a given
microservice implementation.
Up to 200mb of memory required to operate for
1 node, 10k req/sec per node
● Extra hops will be added. Each service call has
to go through an extra hops, xx ms (through
Service Mesh sidecar proxy)
Frameworks Comparison
Demo time
1. Demo project architecture.
Docker-compose configuration.
2. Linkerd Integration.
Business services are free of code changes.
Only Proxy address as a System property should be provided to service
deployment.
3. Linkerd configuration.
Basic concepts.
Load balancing, Circuit Breaker, Timeouts/Retry, Observability,
Dynamic Routing
1. Demo project Architecture
LINKERD
Order-Service
User-Service
API-Gateway
Service Registry
(Consul)
Zipkin
Prometheus
Grafana
2. Linkerd Integration
● HTTP Proxy.
Use JVM flags
-Dhttp.proxyHost=linkerd-host -Dhttp.proxyPort=4141
● Send traffic directly to Linkerd
Use Http Headers.
3. Linkerd Configuration
1. Routers
a. Servers
b. Protocols (HTTP/1.1, HTTP/2, TCP, gRPC, Thrift, Mux)
c. Delegation tables (dtab)
d. Identifiers
e. Service, prefixes
f. Client, prefixes
2. Namers
3. Telemetry
Consists of 4 steps:
identification, binding, resolution, load balancing.
Routing
Dynamic request routing and traffic shifting
Use HTTP header “l5d-dtab” as a dtab rule to be used for routing a particular request
Use namerd service to enable the ability to make dtab changes at runtime, without
needing to restart Linkerd.
Observability
Grafana Dashboards with success rate, latency, throughput, etc
Thank you!
Questions?
POC Source Code
https://github.com/menya84/servicemesh

More Related Content

Similar to Service-Mesh-Presentation.pdf

Application Modernisation through Event-Driven Microservices
Application Modernisation through Event-Driven Microservices Application Modernisation through Event-Driven Microservices
Application Modernisation through Event-Driven Microservices confluent
 
Yotpo microservices
Yotpo microservicesYotpo microservices
Yotpo microservicesRon Barabash
 
JS Fest 2019/Autumn. Anton Cherednikov. Choreographic or orchestral architect...
JS Fest 2019/Autumn. Anton Cherednikov. Choreographic or orchestral architect...JS Fest 2019/Autumn. Anton Cherednikov. Choreographic or orchestral architect...
JS Fest 2019/Autumn. Anton Cherednikov. Choreographic or orchestral architect...JSFestUA
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservicesAnil Allewar
 
Anuta NCX Platform Overview - Agile Network Services with Orchestration
Anuta NCX Platform Overview - Agile Network Services with OrchestrationAnuta NCX Platform Overview - Agile Network Services with Orchestration
Anuta NCX Platform Overview - Agile Network Services with OrchestrationKiran Sirupa
 
[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 ...WSO2
 
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...apidays
 
Unit 1.2 move to cloud computing
Unit 1.2   move to cloud computingUnit 1.2   move to cloud computing
Unit 1.2 move to cloud computingeShikshak
 
Microservices for Application Modernisation
Microservices for Application ModernisationMicroservices for Application Modernisation
Microservices for Application ModernisationAjay Kumar Uppal
 
[WSO2 API Day Dallas 2019] Extending Service Mesh with API Management
[WSO2 API Day Dallas 2019] Extending Service Mesh with API Management[WSO2 API Day Dallas 2019] Extending Service Mesh with API Management
[WSO2 API Day Dallas 2019] Extending Service Mesh with API ManagementWSO2
 
MicroserviceArchitecture in detail over Monolith.
MicroserviceArchitecture in detail over Monolith.MicroserviceArchitecture in detail over Monolith.
MicroserviceArchitecture in detail over Monolith.PLovababu
 
Service Mesh CTO Forum (Draft 3)
Service Mesh CTO Forum (Draft 3)Service Mesh CTO Forum (Draft 3)
Service Mesh CTO Forum (Draft 3)Rick Hightower
 
Consumer-Driven Contract Testing With Postman
Consumer-Driven Contract Testing With PostmanConsumer-Driven Contract Testing With Postman
Consumer-Driven Contract Testing With PostmanPostman
 
MuleSoft Manchester Meetup #4 slides 11th February 2021
MuleSoft Manchester Meetup #4 slides 11th February 2021MuleSoft Manchester Meetup #4 slides 11th February 2021
MuleSoft Manchester Meetup #4 slides 11th February 2021Ieva Navickaite
 

Similar to Service-Mesh-Presentation.pdf (20)

Application Modernisation through Event-Driven Microservices
Application Modernisation through Event-Driven Microservices Application Modernisation through Event-Driven Microservices
Application Modernisation through Event-Driven Microservices
 
Microservices-101
Microservices-101Microservices-101
Microservices-101
 
Surviving microservices
Surviving microservicesSurviving microservices
Surviving microservices
 
Microservice architecture
Microservice architectureMicroservice architecture
Microservice architecture
 
Yotpo microservices
Yotpo microservicesYotpo microservices
Yotpo microservices
 
JS Fest 2019/Autumn. Anton Cherednikov. Choreographic or orchestral architect...
JS Fest 2019/Autumn. Anton Cherednikov. Choreographic or orchestral architect...JS Fest 2019/Autumn. Anton Cherednikov. Choreographic or orchestral architect...
JS Fest 2019/Autumn. Anton Cherednikov. Choreographic or orchestral architect...
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservices
 
Anuta NCX Platform Overview - Agile Network Services with Orchestration
Anuta NCX Platform Overview - Agile Network Services with OrchestrationAnuta NCX Platform Overview - Agile Network Services with Orchestration
Anuta NCX Platform Overview - Agile Network Services with Orchestration
 
Service mesh
Service meshService mesh
Service mesh
 
Atrinet - Lifecycle Service Manager
Atrinet - Lifecycle  Service  Manager                              Atrinet - Lifecycle  Service  Manager
Atrinet - Lifecycle Service Manager
 
[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 ...
 
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...
 
Unit 1.2 move to cloud computing
Unit 1.2   move to cloud computingUnit 1.2   move to cloud computing
Unit 1.2 move to cloud computing
 
Microservices for Application Modernisation
Microservices for Application ModernisationMicroservices for Application Modernisation
Microservices for Application Modernisation
 
[WSO2 API Day Dallas 2019] Extending Service Mesh with API Management
[WSO2 API Day Dallas 2019] Extending Service Mesh with API Management[WSO2 API Day Dallas 2019] Extending Service Mesh with API Management
[WSO2 API Day Dallas 2019] Extending Service Mesh with API Management
 
Microservice
MicroserviceMicroservice
Microservice
 
MicroserviceArchitecture in detail over Monolith.
MicroserviceArchitecture in detail over Monolith.MicroserviceArchitecture in detail over Monolith.
MicroserviceArchitecture in detail over Monolith.
 
Service Mesh CTO Forum (Draft 3)
Service Mesh CTO Forum (Draft 3)Service Mesh CTO Forum (Draft 3)
Service Mesh CTO Forum (Draft 3)
 
Consumer-Driven Contract Testing With Postman
Consumer-Driven Contract Testing With PostmanConsumer-Driven Contract Testing With Postman
Consumer-Driven Contract Testing With Postman
 
MuleSoft Manchester Meetup #4 slides 11th February 2021
MuleSoft Manchester Meetup #4 slides 11th February 2021MuleSoft Manchester Meetup #4 slides 11th February 2021
MuleSoft Manchester Meetup #4 slides 11th February 2021
 

Recently uploaded

Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 

Recently uploaded (20)

Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 

Service-Mesh-Presentation.pdf

  • 1. Way to solve Microservice problems with a Service Mesh Linkerd 1.x implementation chosen for the purpose of a Demo Andrii Minchekov Software Architect
  • 2. TOC ● Microservices challenges ● Service Mesh ○ Why ○ Overview ○ Features ○ Pros/cons ○ Frameworks comparison ○ Linkerd Demo ● Questions
  • 3. Microservice challenges 1. Infrastructure is not reliable and sometimes slow, partial failures possible 2. Request routing and load balancing is hard under scaling 3. It’s difficult to understand what’s happening in real time. 4. Secure communication between services 5. Dev team requires experience with specific microservice libraries, technology diversity 6. Ops team need to manage and monitor lots of services, which are being redeployed regularly.
  • 4. Why Service Mesh (Linkerd)? Stakeholder Concerns Benefits Management Why do we need it? What is the cost? What are the risks? Is it mature technology? What dependencies are we introducing to our business? ● We have fewer outages ● Our services are resilient ● We receive unified visibility across all services ● Business services are not touched at all ● We receive much faster pace of development ● Cost: ~ 2 month to be integrated against 10 months by integrating dedicated libs into business apps 1 node needs up to 200mb of memory, can serve 10k req/sec ● Only 2 years on the market but based on mature RPC framework from Twitter (Finagle). Member of CNCF ● We introduce 1 more technical service (possibly multiple nodes) what is the good design principle to solve complex problems by introducing layer of indirection
  • 5. Stakeholder Concerns Benefits Developers Operations What do I have to change? Do I have to learn a new technology? How to test it? Is it reliable? Will it introduce complexity? Is it secure? ● Get rid of the complex communication logic from your code ● Yes, but it’s only declarative YAML configuration mostly done by Senior Engineers or even Operations team ● System tests should be in place. It’s just 1 more technical service to dev infrastructure but allows easily run parallel versions of a service, do dynamic routing per-request ● All service communication metrics will be at your hand with possible alerting in case of a problem No cascading failures, they will be isolated ● Just 1 more service to deploy and configure but it allows to do easily staging, blue/green, canary deployment ● Yes, consistent TLS across all services supported
  • 6. Service Mesh Overview It’s a dedicated infrastructure layer to manage service to service communication in a fast and resilient manner for microservices. It abstracts the mechanics of reliably delivering requests between services. Service Mesh is typically implemented as an array of lightweight network proxies that are deployed alongside app code, without the app needing to be aware.
  • 8. PROS CONS ● It provides Service Metrics such as success rates, request volumes, latencies, etc without requiring changes to application code. ● Easy and quick to adopt Load Balancing, Circuit Breaker, Timeouts/Retries, Dynamic Routing, Distributed Tracing, Security for an existing/legacy applications. Good coordinating of retries and timeouts across multiple services. Some Estimates just to implement Discovery client: Linkerd setup: ~ 10 days Add lib per srv: 1 day * 60 services ~ 60 days ● Service developers can focus more on the business logic while most of service-to-service communication related functionality is offloaded to Service Mesh. ● Possibility to easily do Staging, Blue/Green, Canary, Continuous Deployment, A/B testing without needing to restart ● Immature ● Only Internal traffic can be handled. No single entry point is exposed to external clients. ● Resource intensive that increase the number of runtime instances that you have in a given microservice implementation. Up to 200mb of memory required to operate for 1 node, 10k req/sec per node ● Extra hops will be added. Each service call has to go through an extra hops, xx ms (through Service Mesh sidecar proxy)
  • 10. Demo time 1. Demo project architecture. Docker-compose configuration. 2. Linkerd Integration. Business services are free of code changes. Only Proxy address as a System property should be provided to service deployment. 3. Linkerd configuration. Basic concepts. Load balancing, Circuit Breaker, Timeouts/Retry, Observability, Dynamic Routing
  • 11. 1. Demo project Architecture LINKERD Order-Service User-Service API-Gateway Service Registry (Consul) Zipkin Prometheus Grafana
  • 12. 2. Linkerd Integration ● HTTP Proxy. Use JVM flags -Dhttp.proxyHost=linkerd-host -Dhttp.proxyPort=4141 ● Send traffic directly to Linkerd Use Http Headers.
  • 13. 3. Linkerd Configuration 1. Routers a. Servers b. Protocols (HTTP/1.1, HTTP/2, TCP, gRPC, Thrift, Mux) c. Delegation tables (dtab) d. Identifiers e. Service, prefixes f. Client, prefixes 2. Namers 3. Telemetry
  • 14. Consists of 4 steps: identification, binding, resolution, load balancing. Routing
  • 15. Dynamic request routing and traffic shifting Use HTTP header “l5d-dtab” as a dtab rule to be used for routing a particular request Use namerd service to enable the ability to make dtab changes at runtime, without needing to restart Linkerd.
  • 16. Observability Grafana Dashboards with success rate, latency, throughput, etc
  • 17. Thank you! Questions? POC Source Code https://github.com/menya84/servicemesh