SlideShare une entreprise Scribd logo
1  sur  46
Debugging Microservices
IDIT LEVINE
FOUNDER & CEO, SOLO.IO
InfoQ.com: News & Community Site
Watch the video with slide
synchronization on InfoQ.com!
https://www.infoq.com/presentations/
microservices-debugging-service-mesh
• Over 1,000,000 software developers, architects and CTOs read the site world-
wide every month
• 250,000 senior developers subscribe to our weekly newsletter
• Published in 4 languages (English, Chinese, Japanese and Brazilian
Portuguese)
• Post content from our QCon conferences
• 2 dedicated podcast channels: The InfoQ Podcast, with a focus on
Architecture and The Engineering Culture Podcast, with a focus on building
• 96 deep dives on innovative topics packed as downloadable emags and
minibooks
• Over 40 new content items per week
Purpose of QCon
- to empower software development by facilitating the spread of
knowledge and innovation
Strategy
- practitioner-driven conference designed for YOU: influencers of
change and innovation in your teams
- speakers and topics driving the evolution and innovation
- connecting and catalyzing the influencers and innovators
Highlights
- attended by more than 12,000 delegates since 2007
- held in 9 cities worldwide
Presented at QCon London
www.qconlondon.com
Debugging microservices applications is hard
The problem:
THE PROBLEM
A monolithic application
consists of a single process
An attached debugger allows
viewing the complete state of
the application during runtime
A microservices application
consists of potentially hundreds
of processes
Is it possible to get a complete
view of the state of a such
application?!
THE PROBLEM
THE PROBLEM
OpenTracing
Solution I
OPENTRACING
A
B
E
D
C
Edge service
Unique ID → {context}
{context}
{context}
{context}
{context}
1. assign a unique identifier to each
request at the edge service
2. store it in a context object, along with
other metadata
3. propagate the context across process
boundaries (in-band)
4. baggage is arbitrary K/V
5. capture timing, events, tags and collect
them out of band (async)
6.re-assemble the call tree from the
storage for the UI
A
B
E
D
C
Edge service
Unique ID → {context}
{context}
{context}
{context}
{context}
A
B
E
C
D
TRACE
SPANS
OPENTRACING
OPENTRACING ARCHITECTURE
spans - basic unit of timing and causality. can be tagged with key/value pairs. logs -
structured data recorded on a span.
span context - serializable format for linking spans across network boundaries.
carries baggage, such as a request and client IDs.
tracers - anything that plugs into the OpenTracing API to record information. zipKin,
jaeger & lightstep. but also metrics (Prometheus) and logging.
OPENTRACING
OpenTracing is a consistent, expressive, vendor-neutral APIs for popular platforms,
OpenTracing makes it easy for developers to add (or switch) tracing
implementations with an O(1) configuration change.
OpenTracing
Demo
OPENTRACING USES
logging - easy to output to any logging tool, even from OSS components.
metrics/alerting - measure based on tags, span timing, log data.
context propagation - use baggage to carry request and user ID’s, etc.
critical path analysis - drill down into request latency in very high fidelity.
system topology analysis - identify bottlenecks due to shared resources.
OPENTRACING USES
openTracing does not provide run-time debugging
openTracing requires wrapping and changing the code
no holistic view of the application state – can only see what was printed
the process (repeatedly modify the application and test) is expansive
Impossible to change variable values in runtime
logging and printing results in performances overhead
Squash
Solution II
SQUASH
Squash brings the power of modern popular debuggers to developers of
microservices apps that run on container orchestration platforms.
Squash bridges between the orchestration platform (without changing it) and IDE.
With Squash, you can:
• Live debugging cross multi microservices
• Debug container in a pod
• Debug a service
• Set breakpoints
• Step through the code
• View and modify values of variables
• and more ...
Squash
Demo
SQUASH ARCHITECTURE
Squash server: holds the information about the breakpoints for each application,
orchestrates and controls the squash clients. Squash server deploys and runs on
Kubernetes
Squash client: deploys as daemon set on Kubernetes node. The client wraps as
docker container, and also contains the binary of the debuggers.
Squash User Interface: squash uses IDEs as its user interface. After installing the
Squash extension, Squash commands are available in the IDE command palette.
What vegetable scares all the
bugs? Squash!”
(one of my 8-year old daughter's
favorite riddles)
SQUASH ARCHITECTURE: VS CODE EXTENSION
vs code extension ➜ kubectl to present
the user pod/container/debugger
options
vs code extension ➜ Squash server
with debug config
(pod/container/debugger /breakpoint)
➜ waits for debug session
vs code extension ➜ connects to the
debug server & transfers control to the
native debug extension.
SQUASH ARCHITECTURE: SQUASH SERVER
vs code extension ➜ Squash server
Squash server ➜ relevant Squash client with
debug config (pod/container/debugger
/breakpoint)
Squash server ➜ waits for debug session
SQUASH ARCHITECTURE: SQUASH CLIENT
Squash server ➜ Squash client
Squash client ➜ container runtime interface (to
obtain the container host pid)
Squash client ➜ runs the debugger, attaches it to the
process in the container, and sets the application
breakpoints
Squash client ➜ return debug session.
SQUASH HIGH LEVEL ARCHITECTURE
Platforms IDEs Debuggers
GDB
The GNU Project
Debugger
IP [y]:
I P y t h o n
SQUASH HIGH LEVEL ARCHITECTURE
Platforms IDEs Debuggers
GDB
The GNU Project
Debugger
IP [y]:
I P y t h o n
SQUASH: OPEN SOURCE PROJECT
We are looking for community help to add support for more debuggers, platforms
and IDEs.
Check out at github: github.com/solo-io/squash
Service mesh
Solution III
SERVICE MESH
Service mesh data plane:
Touches every packet/request in the
system. Responsible for service
discovery, health checking, routing, load
balancing,
authentication/authorization, and
observability.
Service mesh control plane:
Provides policy and configuration for all
the running data planes in the mesh.
Does not touch any packets/requests in
the system. The control plane turns all of
the data planes into a distributed
system.
ENVOY – DATA PLANE
Out of process architecture: developers focus on business logic
Modern C++11 code base: Fast and productive.
L3/L4 filter architecture: Can be used for things other than HTTP (TCP proxy at its core)
HTTP L7 filter architecture: Make it easy to plug in different functionality.
HTTP/2 first! (Including gRPC and a nifty gRPC HTTP/1.1 bridge).
Service discovery and active health checking.
Advanced load balancing: Retry, timeouts, circuit breaking, rate limiting, shadowing, etc.
Best in class observability: stats, logging, and tracing.
Edge proxy: routing and TLS.
The network should be
transparent to applications.
When network and application
problems do occur it should be
easy to determine the source
of the problem.
CONTROL PLANE
Pilot: responsible for the lifecycle of
Envoy instances deployed across the Istio
service mesh. Pilot exposes APIs for
service discovery, dynamic updates to
load balancing pools and routing tables.
Mixer: provides Precondition Checking
(authentication, ACL checks and more),
Quota Management and Telemetry
Reporting.
Istio-Auth enhance the security of
microservices and their communication
without requiring service code changes.
Service mesh, OpenTracing, and Squash
Towards an integrated solution
THE WHOLE SOLUTION
Step 1:
vs code extension ➜ Squash server
creating a debug config (service &
image) and wait for the debug
session to connect.
Step 2:
envoy gets a curl request with
squash header
Step 3:
➜ envoy ask Squash server to debug
itself and wait for the debug session.
1
2
3
4
5
THE WHOLE SOLUTION
Step 4:
Squash server ➜ Squash client
Squash client ➜ container runtime
interface (to obtain the container host pid)
Squash client ➜ runs the debugger,
attaches it to the process in the container,
and sets the application breakpoints
Squash client ➜ return debug session.
Step 5:
vs code extension ➜ connects to the
debug
server & transfers control to the native
debug extension.
envoy resume traffic to the app
1
2
3
4
5
Service Mesh
Demo
Hybrid apps
vision
THE PROBLEM: DISPARATE ECOSYSTEMS, HARD TRANSITION
Monolithic Apps Microservices Serverless
Puppet Kubernetes AWS 𝝀
SOA
Splunk
debuggers
microservices
OpenTracing
Squash
Event-driven
X-RAY
Event-driven
Enterprise faces 4 main problems in
adopting innovative architectures:
1. Insolation between brown and green
field
2. Transition is lengthy and diverts
essential personnel from core mission
3. Duplicate redundant tools
4. Requires silo teams
THE VISION: HYBRID APP
Monolithic Apps Microservices Serverless
Puppet Kubernetes AWS 𝝀
Access all available functions, the smallest unit of compute in all architectures
THE VISION: HYBRID APP
Monolithic Apps Microservices Serverless
Puppet Kubernetes AWS 𝝀
Hybrid app
Solo gloo
Access all available functions, the smallest unit of compute in all architectures
Provide a unified ecosystem, allowing the IT team
• To seamlessly combine existing functionalities
• Debug, and log applications using a single toolbox
THE SOLUTION IN 3 STEPS
1. Break the applications into functions, the universally minimal unit of computing
2. Enable assembly of functions into hybrid apps
3. Provide a unified ecosystem for debugging of hybrid apps - Squash
The Function Gateway
Introducing
STEP 1. BREAKING THE ECOSYSTEM INTO FUNCTIONS
Gloo
Request Emit
Proxy (Envoy)
Filters: functions, Transformation, …
Function discovery
Enhancing Envoy:
- Support for AWS lambda, Google
functions, OPENAPI functions
Extendable language for routing to
functions
Customization tool
Kubernetes Ingress
Plugins
Platform support
Kubernetes
Compatible
Glooctl
STEP 2. BUILDING HYBRID APPS
calc.com/add
calc.com/sub
calc.com/mul
calc.com/div
+
-
×
÷
Allows adding new functionalities
as monolithic, microservices or
serverless
Permits gradual migration from
monolithic to microservices or
serverless
Facilitates reuse of existing code
Hybrid app
Fluent cross-cloud hybrid appsOn prem Google cloud AWS
/2
Gloo
Request Emit
Proxy (Envoy)
Filters: functions, Transformation, …
Plugins
Platform support
Kubernetes
Compatible
Glooctl
STEP 3. UNIFIED ECOSYSTEM FOR DEBUGGING
calc.com/add
calc.com/sub
calc.com/mul
calc.com/div
+
-
×
÷
Allows adding new functionalities
as monolithic, microservices or
serverless
Permits gradual migration from
monolithic to microservices or
serverless
Facilitates reuse of existing code
Hybrid app
Fluent cross-cloud hybrid appsOn prem Google cloud AWS
/2
Gloo
Request Emit
Proxy (Envoy)
Filters: functions, Transformation, …
Plugins
Platform support
Kubernetes
Compatible
Glooctl
GLOO SUITE
Code: http://www.github.com/solo-io
Docs: http://gloo.solo.io
The Function Gateway Building, deploying and adding
features to Gloo
Extend Gloo’s
configuration language
Command-line interface
for configuring Gloo
Debug hybrid app
Hybrid app
Demo
the solo team
Happy glooing & squashing !
Visit us: www.solo.io
Github: www.github.com/solo-io
Twitter: @idit_levine
Watch the video with slide
synchronization on InfoQ.com!
https://www.infoq.com/presentations/
microservices-debugging-service-mesh

Contenu connexe

Plus de C4Media

Shifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CDShifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CDC4Media
 
CI/CD for Machine Learning
CI/CD for Machine LearningCI/CD for Machine Learning
CI/CD for Machine LearningC4Media
 
Fault Tolerance at Speed
Fault Tolerance at SpeedFault Tolerance at Speed
Fault Tolerance at SpeedC4Media
 
Architectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep SystemsArchitectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep SystemsC4Media
 
ML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.jsML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.jsC4Media
 
Build Your Own WebAssembly Compiler
Build Your Own WebAssembly CompilerBuild Your Own WebAssembly Compiler
Build Your Own WebAssembly CompilerC4Media
 
User & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix ScaleUser & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix ScaleC4Media
 
Scaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's EdgeScaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's EdgeC4Media
 
Make Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home EverywhereMake Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home EverywhereC4Media
 
The Talk You've Been Await-ing For
The Talk You've Been Await-ing ForThe Talk You've Been Await-ing For
The Talk You've Been Await-ing ForC4Media
 
Future of Data Engineering
Future of Data EngineeringFuture of Data Engineering
Future of Data EngineeringC4Media
 
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreAutomated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreC4Media
 
Navigating Complexity: High-performance Delivery and Discovery Teams
Navigating Complexity: High-performance Delivery and Discovery TeamsNavigating Complexity: High-performance Delivery and Discovery Teams
Navigating Complexity: High-performance Delivery and Discovery TeamsC4Media
 
High Performance Cooperative Distributed Systems in Adtech
High Performance Cooperative Distributed Systems in AdtechHigh Performance Cooperative Distributed Systems in Adtech
High Performance Cooperative Distributed Systems in AdtechC4Media
 
Rust's Journey to Async/await
Rust's Journey to Async/awaitRust's Journey to Async/await
Rust's Journey to Async/awaitC4Media
 
Opportunities and Pitfalls of Event-Driven Utopia
Opportunities and Pitfalls of Event-Driven UtopiaOpportunities and Pitfalls of Event-Driven Utopia
Opportunities and Pitfalls of Event-Driven UtopiaC4Media
 
Datadog: a Real-Time Metrics Database for One Quadrillion Points/Day
Datadog: a Real-Time Metrics Database for One Quadrillion Points/DayDatadog: a Real-Time Metrics Database for One Quadrillion Points/Day
Datadog: a Real-Time Metrics Database for One Quadrillion Points/DayC4Media
 
Are We Really Cloud-Native?
Are We Really Cloud-Native?Are We Really Cloud-Native?
Are We Really Cloud-Native?C4Media
 
CockroachDB: Architecture of a Geo-Distributed SQL Database
CockroachDB: Architecture of a Geo-Distributed SQL DatabaseCockroachDB: Architecture of a Geo-Distributed SQL Database
CockroachDB: Architecture of a Geo-Distributed SQL DatabaseC4Media
 
A Dive into Streams @LinkedIn with Brooklin
A Dive into Streams @LinkedIn with BrooklinA Dive into Streams @LinkedIn with Brooklin
A Dive into Streams @LinkedIn with BrooklinC4Media
 

Plus de C4Media (20)

Shifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CDShifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CD
 
CI/CD for Machine Learning
CI/CD for Machine LearningCI/CD for Machine Learning
CI/CD for Machine Learning
 
Fault Tolerance at Speed
Fault Tolerance at SpeedFault Tolerance at Speed
Fault Tolerance at Speed
 
Architectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep SystemsArchitectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep Systems
 
ML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.jsML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.js
 
Build Your Own WebAssembly Compiler
Build Your Own WebAssembly CompilerBuild Your Own WebAssembly Compiler
Build Your Own WebAssembly Compiler
 
User & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix ScaleUser & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix Scale
 
Scaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's EdgeScaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's Edge
 
Make Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home EverywhereMake Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home Everywhere
 
The Talk You've Been Await-ing For
The Talk You've Been Await-ing ForThe Talk You've Been Await-ing For
The Talk You've Been Await-ing For
 
Future of Data Engineering
Future of Data EngineeringFuture of Data Engineering
Future of Data Engineering
 
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreAutomated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
 
Navigating Complexity: High-performance Delivery and Discovery Teams
Navigating Complexity: High-performance Delivery and Discovery TeamsNavigating Complexity: High-performance Delivery and Discovery Teams
Navigating Complexity: High-performance Delivery and Discovery Teams
 
High Performance Cooperative Distributed Systems in Adtech
High Performance Cooperative Distributed Systems in AdtechHigh Performance Cooperative Distributed Systems in Adtech
High Performance Cooperative Distributed Systems in Adtech
 
Rust's Journey to Async/await
Rust's Journey to Async/awaitRust's Journey to Async/await
Rust's Journey to Async/await
 
Opportunities and Pitfalls of Event-Driven Utopia
Opportunities and Pitfalls of Event-Driven UtopiaOpportunities and Pitfalls of Event-Driven Utopia
Opportunities and Pitfalls of Event-Driven Utopia
 
Datadog: a Real-Time Metrics Database for One Quadrillion Points/Day
Datadog: a Real-Time Metrics Database for One Quadrillion Points/DayDatadog: a Real-Time Metrics Database for One Quadrillion Points/Day
Datadog: a Real-Time Metrics Database for One Quadrillion Points/Day
 
Are We Really Cloud-Native?
Are We Really Cloud-Native?Are We Really Cloud-Native?
Are We Really Cloud-Native?
 
CockroachDB: Architecture of a Geo-Distributed SQL Database
CockroachDB: Architecture of a Geo-Distributed SQL DatabaseCockroachDB: Architecture of a Geo-Distributed SQL Database
CockroachDB: Architecture of a Geo-Distributed SQL Database
 
A Dive into Streams @LinkedIn with Brooklin
A Dive into Streams @LinkedIn with BrooklinA Dive into Streams @LinkedIn with Brooklin
A Dive into Streams @LinkedIn with Brooklin
 

Dernier

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 

Dernier (20)

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 

Debugging Microservices Applications w/ Service Mesh, openTracing & Squash

  • 2. InfoQ.com: News & Community Site Watch the video with slide synchronization on InfoQ.com! https://www.infoq.com/presentations/ microservices-debugging-service-mesh • Over 1,000,000 software developers, architects and CTOs read the site world- wide every month • 250,000 senior developers subscribe to our weekly newsletter • Published in 4 languages (English, Chinese, Japanese and Brazilian Portuguese) • Post content from our QCon conferences • 2 dedicated podcast channels: The InfoQ Podcast, with a focus on Architecture and The Engineering Culture Podcast, with a focus on building • 96 deep dives on innovative topics packed as downloadable emags and minibooks • Over 40 new content items per week
  • 3. Purpose of QCon - to empower software development by facilitating the spread of knowledge and innovation Strategy - practitioner-driven conference designed for YOU: influencers of change and innovation in your teams - speakers and topics driving the evolution and innovation - connecting and catalyzing the influencers and innovators Highlights - attended by more than 12,000 delegates since 2007 - held in 9 cities worldwide Presented at QCon London www.qconlondon.com
  • 5. THE PROBLEM A monolithic application consists of a single process An attached debugger allows viewing the complete state of the application during runtime A microservices application consists of potentially hundreds of processes Is it possible to get a complete view of the state of a such application?!
  • 9. OPENTRACING A B E D C Edge service Unique ID → {context} {context} {context} {context} {context} 1. assign a unique identifier to each request at the edge service 2. store it in a context object, along with other metadata 3. propagate the context across process boundaries (in-band) 4. baggage is arbitrary K/V 5. capture timing, events, tags and collect them out of band (async) 6.re-assemble the call tree from the storage for the UI
  • 10. A B E D C Edge service Unique ID → {context} {context} {context} {context} {context} A B E C D TRACE SPANS OPENTRACING
  • 11. OPENTRACING ARCHITECTURE spans - basic unit of timing and causality. can be tagged with key/value pairs. logs - structured data recorded on a span. span context - serializable format for linking spans across network boundaries. carries baggage, such as a request and client IDs. tracers - anything that plugs into the OpenTracing API to record information. zipKin, jaeger & lightstep. but also metrics (Prometheus) and logging.
  • 12. OPENTRACING OpenTracing is a consistent, expressive, vendor-neutral APIs for popular platforms, OpenTracing makes it easy for developers to add (or switch) tracing implementations with an O(1) configuration change.
  • 14. OPENTRACING USES logging - easy to output to any logging tool, even from OSS components. metrics/alerting - measure based on tags, span timing, log data. context propagation - use baggage to carry request and user ID’s, etc. critical path analysis - drill down into request latency in very high fidelity. system topology analysis - identify bottlenecks due to shared resources.
  • 15. OPENTRACING USES openTracing does not provide run-time debugging openTracing requires wrapping and changing the code no holistic view of the application state – can only see what was printed the process (repeatedly modify the application and test) is expansive Impossible to change variable values in runtime logging and printing results in performances overhead
  • 17. SQUASH Squash brings the power of modern popular debuggers to developers of microservices apps that run on container orchestration platforms. Squash bridges between the orchestration platform (without changing it) and IDE. With Squash, you can: • Live debugging cross multi microservices • Debug container in a pod • Debug a service • Set breakpoints • Step through the code • View and modify values of variables • and more ...
  • 19. SQUASH ARCHITECTURE Squash server: holds the information about the breakpoints for each application, orchestrates and controls the squash clients. Squash server deploys and runs on Kubernetes Squash client: deploys as daemon set on Kubernetes node. The client wraps as docker container, and also contains the binary of the debuggers. Squash User Interface: squash uses IDEs as its user interface. After installing the Squash extension, Squash commands are available in the IDE command palette. What vegetable scares all the bugs? Squash!” (one of my 8-year old daughter's favorite riddles)
  • 20. SQUASH ARCHITECTURE: VS CODE EXTENSION vs code extension ➜ kubectl to present the user pod/container/debugger options vs code extension ➜ Squash server with debug config (pod/container/debugger /breakpoint) ➜ waits for debug session vs code extension ➜ connects to the debug server & transfers control to the native debug extension.
  • 21. SQUASH ARCHITECTURE: SQUASH SERVER vs code extension ➜ Squash server Squash server ➜ relevant Squash client with debug config (pod/container/debugger /breakpoint) Squash server ➜ waits for debug session
  • 22. SQUASH ARCHITECTURE: SQUASH CLIENT Squash server ➜ Squash client Squash client ➜ container runtime interface (to obtain the container host pid) Squash client ➜ runs the debugger, attaches it to the process in the container, and sets the application breakpoints Squash client ➜ return debug session.
  • 23. SQUASH HIGH LEVEL ARCHITECTURE Platforms IDEs Debuggers GDB The GNU Project Debugger IP [y]: I P y t h o n
  • 24. SQUASH HIGH LEVEL ARCHITECTURE Platforms IDEs Debuggers GDB The GNU Project Debugger IP [y]: I P y t h o n
  • 25. SQUASH: OPEN SOURCE PROJECT We are looking for community help to add support for more debuggers, platforms and IDEs. Check out at github: github.com/solo-io/squash
  • 27. SERVICE MESH Service mesh data plane: Touches every packet/request in the system. Responsible for service discovery, health checking, routing, load balancing, authentication/authorization, and observability. Service mesh control plane: Provides policy and configuration for all the running data planes in the mesh. Does not touch any packets/requests in the system. The control plane turns all of the data planes into a distributed system.
  • 28. ENVOY – DATA PLANE Out of process architecture: developers focus on business logic Modern C++11 code base: Fast and productive. L3/L4 filter architecture: Can be used for things other than HTTP (TCP proxy at its core) HTTP L7 filter architecture: Make it easy to plug in different functionality. HTTP/2 first! (Including gRPC and a nifty gRPC HTTP/1.1 bridge). Service discovery and active health checking. Advanced load balancing: Retry, timeouts, circuit breaking, rate limiting, shadowing, etc. Best in class observability: stats, logging, and tracing. Edge proxy: routing and TLS. The network should be transparent to applications. When network and application problems do occur it should be easy to determine the source of the problem.
  • 29. CONTROL PLANE Pilot: responsible for the lifecycle of Envoy instances deployed across the Istio service mesh. Pilot exposes APIs for service discovery, dynamic updates to load balancing pools and routing tables. Mixer: provides Precondition Checking (authentication, ACL checks and more), Quota Management and Telemetry Reporting. Istio-Auth enhance the security of microservices and their communication without requiring service code changes.
  • 30. Service mesh, OpenTracing, and Squash Towards an integrated solution
  • 31. THE WHOLE SOLUTION Step 1: vs code extension ➜ Squash server creating a debug config (service & image) and wait for the debug session to connect. Step 2: envoy gets a curl request with squash header Step 3: ➜ envoy ask Squash server to debug itself and wait for the debug session. 1 2 3 4 5
  • 32. THE WHOLE SOLUTION Step 4: Squash server ➜ Squash client Squash client ➜ container runtime interface (to obtain the container host pid) Squash client ➜ runs the debugger, attaches it to the process in the container, and sets the application breakpoints Squash client ➜ return debug session. Step 5: vs code extension ➜ connects to the debug server & transfers control to the native debug extension. envoy resume traffic to the app 1 2 3 4 5
  • 35. THE PROBLEM: DISPARATE ECOSYSTEMS, HARD TRANSITION Monolithic Apps Microservices Serverless Puppet Kubernetes AWS 𝝀 SOA Splunk debuggers microservices OpenTracing Squash Event-driven X-RAY Event-driven Enterprise faces 4 main problems in adopting innovative architectures: 1. Insolation between brown and green field 2. Transition is lengthy and diverts essential personnel from core mission 3. Duplicate redundant tools 4. Requires silo teams
  • 36. THE VISION: HYBRID APP Monolithic Apps Microservices Serverless Puppet Kubernetes AWS 𝝀 Access all available functions, the smallest unit of compute in all architectures
  • 37. THE VISION: HYBRID APP Monolithic Apps Microservices Serverless Puppet Kubernetes AWS 𝝀 Hybrid app Solo gloo Access all available functions, the smallest unit of compute in all architectures Provide a unified ecosystem, allowing the IT team • To seamlessly combine existing functionalities • Debug, and log applications using a single toolbox
  • 38. THE SOLUTION IN 3 STEPS 1. Break the applications into functions, the universally minimal unit of computing 2. Enable assembly of functions into hybrid apps 3. Provide a unified ecosystem for debugging of hybrid apps - Squash
  • 40. STEP 1. BREAKING THE ECOSYSTEM INTO FUNCTIONS Gloo Request Emit Proxy (Envoy) Filters: functions, Transformation, … Function discovery Enhancing Envoy: - Support for AWS lambda, Google functions, OPENAPI functions Extendable language for routing to functions Customization tool Kubernetes Ingress Plugins Platform support Kubernetes Compatible Glooctl
  • 41. STEP 2. BUILDING HYBRID APPS calc.com/add calc.com/sub calc.com/mul calc.com/div + - × ÷ Allows adding new functionalities as monolithic, microservices or serverless Permits gradual migration from monolithic to microservices or serverless Facilitates reuse of existing code Hybrid app Fluent cross-cloud hybrid appsOn prem Google cloud AWS /2 Gloo Request Emit Proxy (Envoy) Filters: functions, Transformation, … Plugins Platform support Kubernetes Compatible Glooctl
  • 42. STEP 3. UNIFIED ECOSYSTEM FOR DEBUGGING calc.com/add calc.com/sub calc.com/mul calc.com/div + - × ÷ Allows adding new functionalities as monolithic, microservices or serverless Permits gradual migration from monolithic to microservices or serverless Facilitates reuse of existing code Hybrid app Fluent cross-cloud hybrid appsOn prem Google cloud AWS /2 Gloo Request Emit Proxy (Envoy) Filters: functions, Transformation, … Plugins Platform support Kubernetes Compatible Glooctl
  • 43. GLOO SUITE Code: http://www.github.com/solo-io Docs: http://gloo.solo.io The Function Gateway Building, deploying and adding features to Gloo Extend Gloo’s configuration language Command-line interface for configuring Gloo Debug hybrid app
  • 45. the solo team Happy glooing & squashing ! Visit us: www.solo.io Github: www.github.com/solo-io Twitter: @idit_levine
  • 46. Watch the video with slide synchronization on InfoQ.com! https://www.infoq.com/presentations/ microservices-debugging-service-mesh