Pidoku

Archive

This learning material is in the archive. It is not currently maintained and has not been updated with the latest information, so tool versions, prices and dates may be out of date.

Projects

Reading builds recognition. Building builds understanding. These six projects are in Go, use only the standard library unless they say otherwise, and need no cloud account. Each one proves a group of modules end to end, and together they make a portfolio (11.d).

#ProjectAfter moduleNeedsTime
1An SLO service with burn-rate alerts2–3Nothing (Prometheus optional)5–8 h
2A paging simulator and postmortem4–5Nothing4–6 h
3A resilient client library6Nothing6–10 h
4A load balancer with P2C, outlier detection and shedding7Nothing6–10 h
5A canary analyser for Kubernetes8kind, Prometheus8–12 h
6A chaos game day on a three-service system9–11Docker or kind8–12 h

“Done” means every box under Done when is ticked and you can explain the result to someone else.


1 — An SLO service with burn-rate alerts#

Goal. Make SLIs, error budgets and multiwindow burn-rate alerting concrete.

Build. A small Go HTTP service (“orders”) with an injectable error rate and latency, RED metrics in Prometheus text format (3.a), and a separate Go program that scrapes it every 10 seconds, stores the counts, and evaluates the page and ticket rules from 2.d. It prints alerts as they fire and resolve, and a budget-remaining line every minute.

Done when

  • A 2-minute blip at 30% errors does not page; a sustained 5% error rate pages within the time the formula in 2.d predicts.
  • The page resolves within a few minutes of the error rate returning to normal.
  • You wrote an SLO document and an error budget policy for the service (2.b, 2.c).
  • (Optional) Real Prometheus with Sloth-generated rules gives the same result.

Stretch. Add a latency SLO with histogram buckets and alert on it the same way.


2 — A paging simulator and postmortem#

Goal. Practise on-call and incident response without a real outage.

Build. A game-master CLI (extend wheel.go from 10.c) that loads a scenario file — symptoms, the answers to commands, the cause, the fixes — and runs an interactive session from standard input, recording timestamps of every command. Write three scenarios from public postmortems.

Done when

  • Three scenarios exist, each based on a real public incident (with link).
  • You ran each with a colleague playing on-call, and kept the command trail.
  • For one, you wrote a complete blameless postmortem using the template in 5.c, with typed action items that pass pmcheck.go.
  • Each scenario has a runbook (4.b) that would have shortened it.

3 — A resilient client library#

Goal. Implement the resilience patterns of Module 6 as one reusable package.

Build. A Go package wrapping http.Client with: per-call timeouts and deadline propagation (6.a); retries for retryable errors only, exponential backoff with full jitter, Retry-After support and a retry budget (6.b); a per-host circuit breaker (6.c); a concurrency-limit bulkhead (6.c); idempotency keys for POST (6.b); and metrics for each decision. Test it against a fake server with a fault injector (10.b).

Done when

  • Unit tests prove: no retry on 4xx; retries stay within budget when the server is down; the breaker opens and recovers; a hanging server never blocks a call past its deadline.
  • A simulated outage reproduces the metastable scenario of 6.e without the budget and recovers with it.
  • Every decision (retry, reject, open) is visible in metrics.

4 — A load balancer with P2C, outlier detection and shedding#

Goal. Make Module 7’s load-balancing and overload ideas concrete.

Build. An HTTP reverse proxy in Go (net/http/httputil) in front of five backends, one of which you can make slow or broken. Implement round robin and power-of-two-choices, outlier ejection with a maximum ejection percentage, a panic threshold, and a bounded queue with priority shedding (a header marks sheddable traffic). Load-test it open-loop (7.f).

Done when

  • With one slow backend, P2C’s p99 is far below round robin’s, as in 7.b.
  • A broken backend is ejected within seconds and readmitted after recovery; never more than the maximum percentage is ejected.
  • At 150% of capacity, critical requests keep succeeding and goodput stays near capacity.
  • Your load test is open-loop and you can explain why.

5 — A canary analyser for Kubernetes#

Goal. Automate the release decision of 8.b.

Build. In a kind cluster with Prometheus: deploy a service with stable and canary Deployments behind one Service (or use Argo Rollouts). Write a Go program that queries Prometheus for both versions’ request and error counts, applies the sample-size rule and z-test from canary.go, and promotes (scales the canary up) or aborts (scales it to zero) through the Kubernetes API (or by calling kubectl).

Done when

  • A healthy release is promoted through at least three steps.
  • A release with a 3× error rate is aborted automatically before 25%.
  • Early steps with too little data are reported as “not enough data”, not as pass or fail.
  • The Deployment manifests pass k8slint.go from 8.d.

6 — A chaos game day on a three-service system#

Goal. Run the full practice of Modules 9–11 on a small system.

Build. Three services (web → orders → payments-fake) plus PostgreSQL and a cache, in Docker Compose or kind. Give them SLOs, burn-rate alerts, runbooks, graceful shutdown, timeouts, retry budgets and a degraded mode. Then run a game day (10.c): kill a service, add latency with Toxiproxy or Chaos Mesh, fail over or restore the database from backup, expire a certificate.

Done when

  • A written PRR (11.a) for the system, with must-fix items fixed.
  • A game day plan with hypothesis, abort criteria and roles; and a review afterwards.
  • At least one hypothesis was refuted and the fix was made.
  • A database restore from backup was performed and timed; RPO and RTO were measured.
  • A one-page SLO report (11.c) for the month the project ran.

↑↓ navigate↵ openesc close

100% drag to pan · scroll or pinch to zoom · double-click to zoom in