LEARN. PRACTICE. EXPLAIN.
Learning paths & interview practiceP
← Build a health-probe & rollout controller
BUILD → VERIFY → EXPLAIN · STEP 6 OF 6

Wire the HTTP probe server and defend the design

Exercise live HTTP endpoints for dependency loss, draining, and metrics.

UNDERSTAND

Bring these concepts with you

BUILD

Your implementation

  1. Implement createServiceGuardServer(options) serving /livez, /readyz, /metrics, /work, /admin/drain, /admin/dep-down, and /admin/dep-up.
  2. Run node checks.mjs ./starter.mjs 6 and verify all six groups pass.
  3. Start node starter.mjs, simulate dependency outage and draining via curl or fetch, and rehearse a two-minute incident & rollout walkthrough.
export function createServiceGuardServer(options = {}) {
  // Return Node HTTP server exposing /livez, /readyz, /metrics, /work, and /admin/*
}
Need a hint?
  • Return 503 from /readyz and /work whenever evaluateProbes reports ready === false.
  • Explain why /livez stays 200 during /admin/dep-down.

Saved on this device · 0 / 6000 · Do not include passwords or private data.

VERIFY

Acceptance checks

From the folder containing your downloaded files, run:

node checks.mjs ./starter.mjs 6

This runs checks up to this step. Earlier steps must work first. Mark each result only after checking your implementation; the website does not run or grade it.

Record your attempt to enable the checklist and reference comparison.

Compare with the reference

Attempt the step first, then compare decisions and behavior. There can be more than one correct implementation.

After attempting every step, compare against the complete runnable app.

Save reference.mjs beside checks.mjs, run node checks.mjs ./reference.mjs 6, then run node reference.mjs.

Attempt every step to unlock the complete reference downloads.

EXPLAIN

Your interviewer asks

Walk me through what happens in your cluster during a rolling deploy when a dependency slows down at the same time.

Say your answer aloud, then record the trade-offs and evidence in your notes above.

LOCAL VOICE REHEARSAL

Rehearse your step walkthrough aloud

Target pacing: 02:00 · Stays in this browser only; never uploaded.

00:00/ 02:00
AlifBay Prep