observability before and after service mesh · java, microservices and golang enthusiast. fallacies...
TRANSCRIPT
![Page 1: Observability before and after Service Mesh · Java, Microservices and Golang enthusiast. Fallacies of distributed computing The network is reliable Latency is zero Bandwidth is infinite](https://reader034.vdocument.in/reader034/viewer/2022042219/5ec5dbb30efcdc47420f5c83/html5/thumbnails/1.jpg)
Observability before and after Service Mesh
![Page 2: Observability before and after Service Mesh · Java, Microservices and Golang enthusiast. Fallacies of distributed computing The network is reliable Latency is zero Bandwidth is infinite](https://reader034.vdocument.in/reader034/viewer/2022042219/5ec5dbb30efcdc47420f5c83/html5/thumbnails/2.jpg)
Agenda
◦ Microservices and the fallacies of distributed computing◦ Observability
◦ Logs, traces and metrics◦ How have we been solving this so far?
◦ Service Mesh ◦ Data and Control plane
◦ Istio◦ Control plane components
◦ Demo
![Page 3: Observability before and after Service Mesh · Java, Microservices and Golang enthusiast. Fallacies of distributed computing The network is reliable Latency is zero Bandwidth is infinite](https://reader034.vdocument.in/reader034/viewer/2022042219/5ec5dbb30efcdc47420f5c83/html5/thumbnails/3.jpg)
About us!I am Matheus MoraesSoftware Engineer @sensedia
Java, NoSQL and Microservices enthusiast
![Page 4: Observability before and after Service Mesh · Java, Microservices and Golang enthusiast. Fallacies of distributed computing The network is reliable Latency is zero Bandwidth is infinite](https://reader034.vdocument.in/reader034/viewer/2022042219/5ec5dbb30efcdc47420f5c83/html5/thumbnails/4.jpg)
whoamiI am Tiago AngeloSoftware Engineer @sensedia
Java, Microservices and Golang enthusiast
![Page 5: Observability before and after Service Mesh · Java, Microservices and Golang enthusiast. Fallacies of distributed computing The network is reliable Latency is zero Bandwidth is infinite](https://reader034.vdocument.in/reader034/viewer/2022042219/5ec5dbb30efcdc47420f5c83/html5/thumbnails/5.jpg)
Fallacies of distributed computing
◦ The network is reliable◦ Latency is zero◦ Bandwidth is infinite◦ The network is secure◦ Topology doesn't change◦ There is one administrator◦ Transport cost is zero◦ The network is homogeneous
![Page 6: Observability before and after Service Mesh · Java, Microservices and Golang enthusiast. Fallacies of distributed computing The network is reliable Latency is zero Bandwidth is infinite](https://reader034.vdocument.in/reader034/viewer/2022042219/5ec5dbb30efcdc47420f5c83/html5/thumbnails/6.jpg)
Observability
![Page 7: Observability before and after Service Mesh · Java, Microservices and Golang enthusiast. Fallacies of distributed computing The network is reliable Latency is zero Bandwidth is infinite](https://reader034.vdocument.in/reader034/viewer/2022042219/5ec5dbb30efcdc47420f5c83/html5/thumbnails/7.jpg)
1Do I have a problem?
Dashboarding, Trending & Problem Detection
2
3
Where exactly is my problem?
What is causing it?
Cross-Service Debug & Performance Optimization
Root Cause & Forensics
Traces
Metrics
Logs
![Page 8: Observability before and after Service Mesh · Java, Microservices and Golang enthusiast. Fallacies of distributed computing The network is reliable Latency is zero Bandwidth is infinite](https://reader034.vdocument.in/reader034/viewer/2022042219/5ec5dbb30efcdc47420f5c83/html5/thumbnails/8.jpg)
Metrics
![Page 9: Observability before and after Service Mesh · Java, Microservices and Golang enthusiast. Fallacies of distributed computing The network is reliable Latency is zero Bandwidth is infinite](https://reader034.vdocument.in/reader034/viewer/2022042219/5ec5dbb30efcdc47420f5c83/html5/thumbnails/9.jpg)
reviews_http_requests_total{env="prod",method="POST",code="200",type="infra"} 647.0
reviews_http_requests_total{env="prod",method="POST",code="400",type="infra"} 74.0
products_searches_category_total{env="prod",category="BOOK",type="business"} 152.0
ratings_http_request_seconds_count{env="prod",type="infra"} 77.0
ratings_http_request_seconds_sum{env="prod",type="infra"} 34.97
RateErrorDuration
D
RE
![Page 10: Observability before and after Service Mesh · Java, Microservices and Golang enthusiast. Fallacies of distributed computing The network is reliable Latency is zero Bandwidth is infinite](https://reader034.vdocument.in/reader034/viewer/2022042219/5ec5dbb30efcdc47420f5c83/html5/thumbnails/10.jpg)
Prometheus & Grafana Product page
Details
Ratings
ReviewsReviewsReviews
GET /metrics
GET /metrics
GET /metrics
GET /metrics
● Scrapping;● Storage;● Service Discovery;● Alerts;● Dashboards.
● Beautiful Visualizations;● Alerts.
![Page 11: Observability before and after Service Mesh · Java, Microservices and Golang enthusiast. Fallacies of distributed computing The network is reliable Latency is zero Bandwidth is infinite](https://reader034.vdocument.in/reader034/viewer/2022042219/5ec5dbb30efcdc47420f5c83/html5/thumbnails/11.jpg)
![Page 12: Observability before and after Service Mesh · Java, Microservices and Golang enthusiast. Fallacies of distributed computing The network is reliable Latency is zero Bandwidth is infinite](https://reader034.vdocument.in/reader034/viewer/2022042219/5ec5dbb30efcdc47420f5c83/html5/thumbnails/12.jpg)
Just by adding the Spring dependency:
Spring Actuator & Micrometer
We automatically gain production ready endpoints:
◦ /actuator/health◦ /actuator/info◦ /actuator/metrics◦ /actuator/trace
◦ /actuator/prometheus
![Page 13: Observability before and after Service Mesh · Java, Microservices and Golang enthusiast. Fallacies of distributed computing The network is reliable Latency is zero Bandwidth is infinite](https://reader034.vdocument.in/reader034/viewer/2022042219/5ec5dbb30efcdc47420f5c83/html5/thumbnails/13.jpg)
Distributed Tracing
![Page 14: Observability before and after Service Mesh · Java, Microservices and Golang enthusiast. Fallacies of distributed computing The network is reliable Latency is zero Bandwidth is infinite](https://reader034.vdocument.in/reader034/viewer/2022042219/5ec5dbb30efcdc47420f5c83/html5/thumbnails/14.jpg)
?
?
?
?
?
??
?
?
Where exactly is my problem?
![Page 15: Observability before and after Service Mesh · Java, Microservices and Golang enthusiast. Fallacies of distributed computing The network is reliable Latency is zero Bandwidth is infinite](https://reader034.vdocument.in/reader034/viewer/2022042219/5ec5dbb30efcdc47420f5c83/html5/thumbnails/15.jpg)
![Page 16: Observability before and after Service Mesh · Java, Microservices and Golang enthusiast. Fallacies of distributed computing The network is reliable Latency is zero Bandwidth is infinite](https://reader034.vdocument.in/reader034/viewer/2022042219/5ec5dbb30efcdc47420f5c83/html5/thumbnails/16.jpg)
traceId{3200a05d-a0f4}
spanId{3ba41afd-1392}traceId{320
0a05d-a0
f4}
spanId{0cf7cb54-594c}
traceId{3200a05d-a0f4}
spanId{c5a91003-533a}
traceId{3200a05d-a0f4}spanId{358af2af-fe37}
The OpenTracing standard
![Page 17: Observability before and after Service Mesh · Java, Microservices and Golang enthusiast. Fallacies of distributed computing The network is reliable Latency is zero Bandwidth is infinite](https://reader034.vdocument.in/reader034/viewer/2022042219/5ec5dbb30efcdc47420f5c83/html5/thumbnails/17.jpg)
The Distributed Tracing System
Find performance issues quickly
through a graphical view
![Page 18: Observability before and after Service Mesh · Java, Microservices and Golang enthusiast. Fallacies of distributed computing The network is reliable Latency is zero Bandwidth is infinite](https://reader034.vdocument.in/reader034/viewer/2022042219/5ec5dbb30efcdc47420f5c83/html5/thumbnails/18.jpg)
Just by adding the Spring dependency:
Spring Cloud Sleuth
We automatically gain:
◦ trace and span instrumentation;
◦ logging;
◦ send traces to the distributed tracing system.
![Page 19: Observability before and after Service Mesh · Java, Microservices and Golang enthusiast. Fallacies of distributed computing The network is reliable Latency is zero Bandwidth is infinite](https://reader034.vdocument.in/reader034/viewer/2022042219/5ec5dbb30efcdc47420f5c83/html5/thumbnails/19.jpg)
Logs
![Page 20: Observability before and after Service Mesh · Java, Microservices and Golang enthusiast. Fallacies of distributed computing The network is reliable Latency is zero Bandwidth is infinite](https://reader034.vdocument.in/reader034/viewer/2022042219/5ec5dbb30efcdc47420f5c83/html5/thumbnails/20.jpg)
Logs
Who
What
When
Where
Why
INFO
DEBUG
WARNING
ERROR
![Page 21: Observability before and after Service Mesh · Java, Microservices and Golang enthusiast. Fallacies of distributed computing The network is reliable Latency is zero Bandwidth is infinite](https://reader034.vdocument.in/reader034/viewer/2022042219/5ec5dbb30efcdc47420f5c83/html5/thumbnails/21.jpg)
[INFO][2019-10-10 00:51:48][de4c1b04-9ca1][c.s.domain.service.ProductService] - finding product details by id 140708
[WARN][2019-10-10 00:52:02][de4c1b04-9ca1][c.s.domain.service.ProductService] - product details non-cached, calling details service
[ERROR][2019-10-10 00:52:03][de4c1b04-9ca1][c.s.domain.service.ProductService] - error when calling /details/140708org.springframework.web.server.ResponseStatusException: 404 NOT_FOUND
![Page 22: Observability before and after Service Mesh · Java, Microservices and Golang enthusiast. Fallacies of distributed computing The network is reliable Latency is zero Bandwidth is infinite](https://reader034.vdocument.in/reader034/viewer/2022042219/5ec5dbb30efcdc47420f5c83/html5/thumbnails/22.jpg)
?
?
?
?
?
?
Where analyze the logs?
![Page 23: Observability before and after Service Mesh · Java, Microservices and Golang enthusiast. Fallacies of distributed computing The network is reliable Latency is zero Bandwidth is infinite](https://reader034.vdocument.in/reader034/viewer/2022042219/5ec5dbb30efcdc47420f5c83/html5/thumbnails/23.jpg)
Log aggregator
Datastore
Product page
Details
Ratings
ReviewsReviewsReviewsAgg
rega
tio
n
TransformationOutput
![Page 24: Observability before and after Service Mesh · Java, Microservices and Golang enthusiast. Fallacies of distributed computing The network is reliable Latency is zero Bandwidth is infinite](https://reader034.vdocument.in/reader034/viewer/2022042219/5ec5dbb30efcdc47420f5c83/html5/thumbnails/24.jpg)
container
Discovery
Load-balancer
Resiliency
Metrics
Tracing
reviews
container
Discovery
Load-balancer
Resiliency
Metrics
Tracing
product page
container
Discovery
Load-balancer
Resiliency
Metrics
Tracing
details
container
Discovery
Load-balancer
Resiliency
Metrics
Tracing
ratings
But... What's wrong with that?
![Page 25: Observability before and after Service Mesh · Java, Microservices and Golang enthusiast. Fallacies of distributed computing The network is reliable Latency is zero Bandwidth is infinite](https://reader034.vdocument.in/reader034/viewer/2022042219/5ec5dbb30efcdc47420f5c83/html5/thumbnails/25.jpg)
Service Mesh
![Page 26: Observability before and after Service Mesh · Java, Microservices and Golang enthusiast. Fallacies of distributed computing The network is reliable Latency is zero Bandwidth is infinite](https://reader034.vdocument.in/reader034/viewer/2022042219/5ec5dbb30efcdc47420f5c83/html5/thumbnails/26.jpg)
◦ East/West Traffic Control◦ Service Discovery◦ Routing◦ Security
◦ Observability
What can we do with it?
![Page 27: Observability before and after Service Mesh · Java, Microservices and Golang enthusiast. Fallacies of distributed computing The network is reliable Latency is zero Bandwidth is infinite](https://reader034.vdocument.in/reader034/viewer/2022042219/5ec5dbb30efcdc47420f5c83/html5/thumbnails/27.jpg)
How?
![Page 28: Observability before and after Service Mesh · Java, Microservices and Golang enthusiast. Fallacies of distributed computing The network is reliable Latency is zero Bandwidth is infinite](https://reader034.vdocument.in/reader034/viewer/2022042219/5ec5dbb30efcdc47420f5c83/html5/thumbnails/28.jpg)
An implementation of a service mesh:
![Page 29: Observability before and after Service Mesh · Java, Microservices and Golang enthusiast. Fallacies of distributed computing The network is reliable Latency is zero Bandwidth is infinite](https://reader034.vdocument.in/reader034/viewer/2022042219/5ec5dbb30efcdc47420f5c83/html5/thumbnails/29.jpg)
Components:
◦ Data-Plane◦ Envoy Proxy
◦ Control-Plane◦ Pilot◦ Galley◦ Citadel◦ Mixer
![Page 32: Observability before and after Service Mesh · Java, Microservices and Golang enthusiast. Fallacies of distributed computing The network is reliable Latency is zero Bandwidth is infinite](https://reader034.vdocument.in/reader034/viewer/2022042219/5ec5dbb30efcdc47420f5c83/html5/thumbnails/32.jpg)
It's NOT JUST about observability
![Page 33: Observability before and after Service Mesh · Java, Microservices and Golang enthusiast. Fallacies of distributed computing The network is reliable Latency is zero Bandwidth is infinite](https://reader034.vdocument.in/reader034/viewer/2022042219/5ec5dbb30efcdc47420f5c83/html5/thumbnails/33.jpg)
Thanks!Any questions?You can find us at:
mfariam
matheusfm
matheusfm
kurtisangelo
angelokurtis
tiagoangelo