← All Learning Paths

gRPC Developer

Build typed internal APIs over HTTP/2: streaming modes, deadline propagation, health checks, and the GOAWAY and timeout errors that break production meshes.

roleintermediate8 nodes12.67h total

Path overview

gRPC 把内部通信的类型安全提到协议层,也把 HTTP/2 的坑带进日常。本路径从 RPC 与 REST 的边界讲起,覆盖四种流模式与截止时间传播,在 Go 与 TypeScript 双栈中落地,最后直面 GOAWAY 与流重置两类生产故障。

gRPC lifts type safety to the protocol level and imports HTTP/2 traps into daily work. This path covers RPC boundaries, four streaming modes, deadline propagation in Go and TypeScript, and GOAWAY failures.

  1. Read "How to Use the Four gRPC Streaming Modes" for the "Match the mode to the data" argument, then name the decision in grpc work it would change.

    Completion criteria: Attach a one-page summary that quotes "Match the mode to the data", lists two trade-offs, and links the commit where you applied it.

    Next step: Go gRPC Server Setup

    ⏱ 1h

  2. Adapt "Go gRPC Server Setup" to a second input and compare the new output with the behavior described in "the main entry point".

    Prerequisites: How to Use the Four gRPC Streaming Modes

    Completion criteria: Attach the terminal transcript for "Go gRPC Server Setup": command, exit code, and the printed result you used to confirm "the main entry point".

    Next step: GRPC Client Deadline Cancel Propagation

    ⏱ 0.75h

  3. Execute "GRPC Client Deadline Cancel Propagation", change one constant, and describe how the output diverges from "Set per-call deadlines on gRPC clients, propagate cancellation through context, and classify".

    Prerequisites: Go gRPC Server Setup

    Completion criteria: Change one constant in "GRPC Client Deadline Cancel Propagation", rerun, and attach both stdout captures plus a one-line diff explaining what moved.

    Next step: gRPC Client Deadline and Timeout Control

    ⏱ 0.75h

  4. Run the grpc snippet "gRPC Client Deadline and Timeout Control", capture stdout, and show which line demonstrates the documented behavior: "Propagate per-call deadlines through gRPC clients with timeout headers, cancellation".

    Prerequisites: GRPC Client Deadline Cancel Propagation

    Completion criteria: Paste the command, the exit code, and the output line matching "Propagate per-call deadlines through gRPC clients with timeout headers, cancellation"; then show a second run with a changed parameter.

    Next step: Add a gRPC Health Check Probe

    ⏱ 0.75h

  5. Apply "Add a gRPC Health Check Probe" to a grpc task, checking that "grpc.health.v1.Health/Check answers SERVING for payments.v1.Payments." appears after the "Give Kubernetes an accurate readiness and liveness signal for a gRPC service instead of" step.

    Prerequisites: gRPC Client Deadline and Timeout Control

    Completion criteria: Deliver a transcript of "Add a gRPC Health Check Probe" with each step's command and observed state, ending at "Give Kubernetes an accurate readiness and liveness signal for a gRPC service instead of".

    Next step: Inject Timeouts at the Dependency Boundary

    ⏱ 0.5h

  6. Execute "Inject Timeouts at the Dependency Boundary" end to end, then repeat the last step with one parameter changed and compare "The call rejects with a TimeoutError after about two seconds instead of waiting for the OS".

    Prerequisites: Add a gRPC Health Check Probe

    Completion criteria: Run the steps through "Put an explicit timeout on every outbound call.", paste the command output, and mark the line that matches "Clients receive 504 with retryable false for a charge, preventing duplicate payments."; then rerun with one parameter changed.

    Next step: Propagate an RPC Deadline Across Hops

    ⏱ 0.5h

  7. Turn JSON object: { deadlineMs, hops: [{ name, overheadMs }] } into {perHop:[{name:gateway,remainingMs:480},{name:auth,remainingMs:400},{n by completing "Propagate an RPC Deadline Across Hops" with a reproducible script and a failing-case note.

    Completion criteria: Show the test run for "Propagate an RPC Deadline Across Hops" with two passing samples and one deliberately failing input, with the expected error.

    Next step: Capstone: gRPC Developer

    ⏱ 0.42h

  8. Deliver the "Build a gRPC Service Mesh Client" blueprint with "Channel resolver" working and "Load balancer" recorded as evidence.

    Prerequisites: Propagate an RPC Deadline Across Hops

    Completion criteria: Run the project's test command for "Build a gRPC Service Mesh Client", paste the passing output, and attach the acceptance note for "Channel resolver" with the test name.

    Next step: Run the capstone's tests, publish the repository, and demo it to a reviewer.

    ⏱ 4h