46. service MintService {
rpc Mint (stream MintRequest)
returns (stream MintResponse);
}
gRPC STREAMING
@aiborisov
@mykyta_p
The image is property of Netflix Inc. and cannot be reused
69. HOW TO CORRELATE STREAMS ?
GATEWAY MINT LEDGER
@aiborisov
@mykyta_p
STREAM ID 1 STREAM ID 43 STREAM ID 91
70. // Example with Brave
var grpcTracing = GrpcTracing.create(rpcTracing);
val channel = ManagedChannelBuilder
.forTarget(“mint:8089”)
.intercept(grpcTracing.newClientInterceptor())
.build();
ADD TRACING OF YOUR CHOICE
@aiborisov
@mykyta_p
91. FAILED CALLS ?
Inspect:
Metrics + Status Codes
Exceptions
Frame Logs
Binary Logs
@aiborisov
@mykyta_p
The image is property of Netflix Inc. and cannot be reused
93. BINARY LOGS
Machine-readable
var binaryLog =
BinaryLogs.createBinaryLog();
var channelWithBinaryLogs =
binaryLog.wrapChannel(channel);
var server = ServerBuilder
.forPort(port)
.addService(...)
.setBinaryLog(binaryLog)
.build();
@aiborisov
@mykyta_p
The image is property of Netflix Inc. and cannot be reused
102. gRPC STREAMING:
KEEP-ALIVE
val channel =
ManagedChannelBuilder
.forTarget(“mint:8089”)
.idleTimeout(1, MINUTES)
.build();
@aiborisov
@mykyta_p
The image is property of Netflix Inc. and cannot be reused
104. gRPC STREAMING
DON’T USE TO OPTIMIZE
PERFORMANCE
USE TO OPTIMIZE YOUR APP
@aiborisov
@mykyta_p
The image is property of Netflix Inc. and cannot be reused
134. gRPC OVER HTTP/3
@aiborisov
@mykyta_p
FASTER CONNECTION
NEGOTIATION
NO HEAD-OF-LINE BLOCKING
CONNECTION TRANSITION
BETWEEN NETWORKS
The image is property of Netflix Inc. and cannot be reused