Slides from my presentation at Spring i/o 2024:
https://2024.springio.net/sessions/navigating-the-complexities-of-service-to-service-invocations-deep-and-brief-dive-into-causality/
Size: 7.1 MB
Language: en
Added: Jun 11, 2024
Slides: 45 pages
Slide Content
Navigating the Complexity of
Service to Service Invocation
Deep and Brief Dive Into
causality
Cause -> Effect
Spring i/0
-How did a talk Influence your Perspective?
-Which new Tool will you try out next week?
-Did any networking interaction lead to a
significant connection?
Causality in tech
High traffic -> increase latency SLO’s
Alerts
Business Problem
Call Graphs
Service A
Micrometer
Service B
Micrometer
Call Graph with a
Service Mesh
Service A
Envoy
Service B
Envoy
DEMO
Trace 1
Span 1.1
Span 1.2
Span 1.3
Span 1.4
Service A Service B Service C
Request
header
Request
header
Trace 1
Span 1.1 Span 1.2 Span 2.1 Span 2.2
Trace 2
Service A
Service B
Service C
Request
header
Request
header
Trace 1
Span 1.1 Span 1.2 Span 1.3 Span 1.4
Context
Propagation
Service A
Service B Service C
Service Invocation Besides HTTP
Message Broker
TRACES
Service A
Auto instrumentation
Manual
instrumentation
OpenTelemetry
Application
Instrument
Telemetry data
Query-,
alerting-,
visualization
Platform
Observibility
data backend
DEMO
Ice Cream Recommender
Recommen-
dation
Service
Location
Service
Weather
Service
AI Service
Kafka
Ice Cream Recommender
Recommen-
dation
Service
Location
Service
Weather
Service
AI Service
Kafka
Traces
Traces
Metrics
Logs
< Exemplars
Tags >
Trace ID
https://spring.io/blog/2022/10/12/observability-with-spring-boot-3
Where is my Ice Cream
Recommendation?
Workflows
User A
Service A
Activity BActivity A
Event
Ice Cream Recommender
Recommen-
dation
Service
Location
Service
Weather
Service
AI Service
Kafka
workflow
Recommendation
Workflow
Application
Location
Service
Get Weather
Activity
REcommender
Service
Request Geo
Data Activity
Request Recommendation
Activity
Geo data
received
Recommendation
received
Kafka
DEMO
Service A
+
Workflow
Service B
public class IceCreamRecommendationWorkflow extends Workflow {
@Override
public WorkflowStub create() {
return ctx-> {
Logger logger = ctx.getLogger();
String instanceId = ctx.getInstanceId();
logger.info("Instance ID: " + instanceId);
//Send Location name to Location Service
Location location = new Location();
location.setName(recommendationPayload .getLocation());
location.setWorkflowID(instanceId);
ctx.callActivity(RequestLocationDetailsActivity .class.getName(), location).await();
System.out.println("Workflow waits for geo Info" + instanceId);
//Wait for the geo information
Geodata geodata = null;
try {
geodata = ctx.waitForExternalEvent( "geoInformationRecieved" , Duration.ofDays(1), Geodata.class).await();
System.out.println("Workflow received geo Info " + instanceId);
} catch (TaskCanceledException e ) {
Recommendation norecommendation = new Recommendation();
norecommendation.setContent("Sorry we can't provide and recommendation for your location" );
ctx.complete(norecommendation);
}
//More things
ctx.complete(recommendation);
};
}
}
Same Same but Different
-Network Traffic
-Service to Service Invocation
-Based On traces
-Context propagation
-Outer Edges
-Observability
-Auto or Manual
Instrumentation
-Customize Span definitions
-Inside the application
Context
-Observability
-Application Design/ Build
-State Management
-Rollbacks, Timeouts etc
-Business Case