gRPC 00:00:01 A local-looking call crosses a network A profile service calls GetUser through a gRPC client stub. Its syntax resembles a local call. The request will still cross a deadline boundary, be serialized, and may finish with an unknown remote outcome. Your code calls GetUser like a local method. The channel was opened when the program started. The stub turns the request into Protocol Buffers and adds metadata and a deadline. The channel opens an HTTP/2 stream on a connection it already has. Other calls are on it too. The server decodes, runs interceptors, and calls your method with a context. The response message travels back, then the trailers with grpc-status 0. The gRPC status in the response trailers reports the call outcome seen by the client. If the connection breaks, the application still needs to reason about any effect the server already performed. 00:00:58 A schema turns the request into bytes A Protocol Buffers schema gives fields stable numbers and wire types. Those numbers let an encoded message identify fields without sending their human-readable names with every request. The schema gives each field a number. The names stay at home. Field one is encoded as a variable-length integer. The value three hundred needs two payload bytes for the number, in addition to its field tag. A string field includes its tag, the payload length and the encoded string bytes. For these sample values the protobuf payload uses thirty-three bytes. The gRPC message framing adds five more before transport overhead. Preserve field-number compatibility when evolving the schema. The final message length in the drawing belongs to these exact sample values, rather than every request of this type. 00:01:48 One second belongs to the entire chain Give the client one second for its full call. The first service should propagate the remaining budget when it calls a second service. Starting a fresh second at each hop would quietly extend the customer's wait. The client calls A and gives the whole thing one second. A needs 350 ms, then calls B with 650 ms. Service B runs out of its remaining six hundred fifty milliseconds and receives a cancellation or deadline signal. The waiting client receives a deadline-exceeded status. The server code must stop any remaining work cooperatively where cancellation is supported. Cancellation only saves work when the service and its downstream operations observe it. The deadline result describes the caller's limit; it cannot retroactively cancel a completed side effect. 00:02:36 A long connection can pin many calls Multiple HTTP/2 streams can share one connection. A transport-level balancer that chooses only when a connection opens may keep sending a busy client's calls to one server. The balancer chose server 1 when the connection was opened. Every call follows it. The channel opens a connection to each address from DNS and sends each call to the next one. Server 3 reports NOT_SERVING before it stops. The channel sends calls to the other two. A replacement server joins once discovery, connection management and the client's balancing policy make it eligible. Per-call client-side or application-layer balancing can distribute calls across eligible endpoints. Plan name resolution, health discovery and draining together. 00:03:23 A single click becomes sixty-four attempts Three levels in a request chain each allow up to four total attempts. During a failure their retry counts can multiply instead of merely adding. Follow the database workload created by one click. The client calls A, A calls B, B reads the database. B tries four times. Four attempts at each of three nested layers can drive as many as sixty-four database attempts in this simplified worst case. Only B retries, only reads, with backoff, and it stops when the tokens run low. Assign retries to an appropriate layer, bound the overall deadline and restrict repeat attempts to operations safe under the application's contract. Charge every extra attempt to the same failure budget.