Skip to main content

Capstone: follow a passenger's booking

You will be able to: explain, for one POST /api/bookings, who acts at each hop, what evidence proves it, and what that mechanism does not guarantee.

Why a walkthrough​

Each chapter taught one mechanism in isolation. A passenger's booking is where they all meet. The skill is not naming every object from memory: it is telling a coherent causal story, and knowing for each claim what evidence supports it and what it leaves unproven.

Throughout, keep one distinction in mind. Configuration (Gateway, HTTPRoute, Service, EndpointSlice) is stored data that programs the running parts; the traffic (a packet) flows through the running parts: proxy, kernel rules, Pods. Mixing the two is the most common source of confusion.

The path, hop by hop​

#HopMechanismEvidenceDoes not prove
1Browser → edgeDNS and the Host header reach a load-balancer address and a running Gateway proxy. Gateway and HTTPRoute are configurationGateway Programmed, route Accepted, a live responseAccepted config ≠ proxy listening ≠ this request matched
2Edge → PodProxy → Service ClusterIP → node rules → a ready Pod chosen from the EndpointSliceReady endpoints; the request succeedsA packet never passes through an API object
3Application workbooking calls identity, flight, writes to booking-db, then notification asynchronously, each call starting from booking's own network viewA trace, and logs sharing its trace_idReady=True does not mean this call succeeds
4StorageThe reservation lives in Postgres on a PVC; a StatefulSet ordinal remounts its own claimNew Pod UID, same claim, DB opens, the app returns the bookingBackup or replication
5RecoveryKubelet restarts containers; a ReplicaSet replaces PodsrestartCount versus a UID changeThe outcome of the interrupted request
6DeliveryCI → image → manifest → rollout (Helm, Kustomize, Argo)imageID, rollout status, Argo Synced + HealthyThat rollback undoes writes or emails
7TelemetryMetric = scope, trace = location, log = detailtrace_id joins trace to logContext survives if any hop drops traceparent
8ScalingCache, HPA, VPA advice, node capacityA baseline before and afterMore Pods do not fix a slow DB; a cache can be stale

The interrupted request​

The hardest case to reason about is a Pod that dies mid-request:

Infrastructure recovery restores capacity, not the outcome of one in-flight request. Retrying safely needs application-level idempotency (a repeat must not create a second booking or send a second email).

Evidence layers, weakest to strongest​

  1. The API accepted the object.
  2. A controller reports convergence (counts, conditions).
  3. Endpoints are ready and the proxy route is accepted.
  4. A real request returns the passenger-visible result.

Self-assessment​

Explain one booking and score one point per row; aim for 8 or more before the capstone walkthrough.

CriterionYou can…
Client locationName the client of every call and what localhost means for it
Config versus trafficSeparate API objects and controllers from processes and packets
AcceptanceCite evidence the API accepted the object
ConvergenceName the controller and the evidence observed ≈ desired
Useful behaviourVerify a passenger-facing result, not just Running
Identity and stateState what restart versus replacement keeps, and where the reservation lives
Failure boundaryName one failure the mechanism does not survive
Change and rollbackSay what rollback restores and what it cannot reverse
TelemetryPick a signal for a question and correlate a real request ID
Status honestyLabel Stage 8 and 9 controls as planned
Model answer

The browser resolves the booking hostname and reaches a running edge proxy. An accepted HTTPRoute is configuration evidence, not proof of traffic; a live HTTP response verifies the listener and match. The proxy forwards to the booking Service and node rules select a ready Pod from endpoint information. Booking calls identity and flight from its own network environment and stores the reservation in its database. If the Pod disappears, a controller creates a replacement with a new UID, but that does not prove the interrupted request completed: I would verify the reservation through the application and use the same request or trace ID in logs and traces. A rollback restores workload configuration, not a sent notification or a committed database write.

Next: the hands-on Core Capstone.