← Inside orch contents

Chapter 14 - Worked Answers

1. Consecutive thresholds

Set both healthy and unhealthy thresholds to two and start from running. The sequence 200,404,200,404,404 produces counters successes/failures of 1/0,0/1,1/0,0/1,0/2. No healthy report is justified because two successes never occur consecutively. The last observation reaches two failures and triggers unhealthy. Total failure count three is irrelevant to this decision. This reasoning assumes ordinary results, not checker errors, whose early-return branch does not update these threshold counters.

2. TCP versus HTTP semantics

A TCP probe can connect successfully while Atlas returns503 on its readiness route, sends invalid HTTP or never produces a useful application response. TCP checks connection establishment, whereas the HTTP checker also receives and classifies an HTTP status under its timeout and redirect policy. Choose the probe for the intended observation. Neither one independently establishes every business dependency or complete traffic-path availability.

3. Origin includes port

A same-scheme redirect to another path on the same host and port passes the same-origin comparison, subject to the redirect-count bound. A redirect from one loopback port to another changes URL.Host and is rejected even though both addresses are 127.0.0.1. sameOriginRedirect compares lowercased scheme and host against the original URL. The executed loopback suite exercised these redirect cases; it did not establish a universal network allowlist for all callers.

4. The caller establishes the initial target

DefaultChecker accepts a Check.Target. Its redirect restriction keeps that request on the supplied origin but does not independently restrict every possible initial address. The agent’s validated manifest/assigned-port path generates the loopback target. Calling the checker directly bypasses that caller boundary. A safe test uses two owned loopback servers: invoke the checker directly with one supplied initial URL, then show the agent builder rejects an unassigned port. Keep both servers local, record exact requests and clean up their listeners; there is no need to probe private or external addresses.

These answers distinguish source reasoning from the scoped execution records linked in chapter 14. Proposed changes require separate implementation and validation.