CSE Roadmap

Common tier · about 3 hours · 8 parts

Part 8 of 8 · 2 min read

Exercises

Easy

Easy 1: Availability arithmetic (20 minutes)

A service has 12 servers and 2 are unresponsive but still in the pool. What share of requests fail if the balancer spreads evenly?

Done when: a percentage with the working.

Hint

Failing share is unhealthy servers divided by all servers.

Easy 2: Classify the check (20 minutes)

Classify each as liveness, local or dependency: ping returns 200; free disk under 10 percent; database calls fail; heap over 90 percent; cache miss rate over 80 percent.

Done when: five labels.

Hint

A dependency check asks about another system.

Easy 3: Stateless or not (20 minutes)

List five things a process stores that would block "let it crash" (for example sessions in memory). For each, say where to move it.

Done when: a five-row table.

Hint

Move state to a shared store.

Medium

Medium 1: Design /health (30 minutes)

Write the response of a health endpoint for a shop service: which checks it runs, thresholds, the HTTP codes returned and what is left out and why.

Done when: a specification and a short example response.

Hint

Keep the endpoint cheap and fast.

Medium 2: Fail-open simulation (30 minutes)

Write a small simulation of 10 servers, a dependency outage and a balancer with and without the fail-open rule. Count successful requests in each case.

Done when: code and two result tables.

Hint

Make the dependency fail for a fixed time.

Medium 3: Watchdog with limits (30 minutes)

Write the rules of a watchdog for a leaking process, including the readings needed, restart limits and escalation.

Done when: a rule list and a state diagram.

Hint

Count consecutive bad readings.

Hard

Hard 1: Steady state sheet (45 minutes)

For a system you know, write the steady state: eight measures with normal ranges, alert levels and automatic actions.

Done when: an eight-row table with one human-only action marked.

Hint

Pick measures users can feel.

Hard 2: Review a flapping check (45 minutes)

A health check removes and re-adds a server every 20 seconds because its threshold sits at the edge of normal load. Explain the cause, the harm and three fixes.

Done when: a diagnosis and three fixes with side effects.

Hint

Add a gap between the remove and add thresholds.

Hard 3: Whole-level design review (50 minutes)

Take a three-tier web system. Walk the 8 layers in section 6 and mark which are present, weak or missing. Rank the top five changes.

Done when: a table of layers with a status and a ranked list with reasons.

Hint

Score each layer as present, weak or missing, then fix cheap and high impact first.