CD10: Capstone: three DevOps projects for RouteRani

Lesson 4 of 5 · reading 15–25 minutes; practice and project time is on the module page

Project 3: dashboards, alerts and scaling

🎯You'll be able to

Make the service visible and self-scaling until all 8 observability tests pass.

🏠The everyday picture

A bus depot has a board showing every bus, a bell that rings only when a bus is really late, and a supervisor who sends extra buses when queues build, and stands them down only after the rush has clearly passed.

📘What it really is

Project 3 asks you to fix:

📝A worked example

Input: after your changes, run npm run test:observe.

Expected output: # pass 8 after about 9 minutes. Test 5 deploys a release that fails 25% of requests and waits for RouteRaniHighErrorRate to fire; tests 6 and 7 run load, watch the copies reach 4 and come back to 2; test 8 stops Prometheus for 30 seconds and checks nothing changes. In a longer run on the test machine (1 November 2026), the reference autoscaler went 2 → 4 → 6 → 2 copies with no failed requests.

🌍Where it's used

📝Case scenario

A learner's autoscaler passes test 6 but fails test 7: copies drop from 4 to 2 straight after the load stops, before the window. Their window only looked at recommendations made so far, and at the first sample after start-up the list held a single low value. Requiring a full window of samples since the scaler started (as well as all recent recommendations being lower) fixed it.

🖱️Try it

Run the autoscaler by hand with --down-delay=60 while tools/load.js runs for 90 seconds, and watch its log. Success: you see it scale up within a few intervals, wait at least 60 seconds after the load ends, and then scale back down, never below the minimum.

⚠️Common mistakes

🛠️For your project

Save the dashboard during a load test, the alert firing, and the autoscaler's log on the Project 3 page.

✅Quick check

Why use dns_sd_configs instead of a fixed target?

Show the answer

So Prometheus scrapes every copy, however many there are.

What should the autoscaler do when Prometheus can't be reached?

Show the answer

Change nothing.

← PreviousProject 2: a pipeline with a way back
ProLearners Assist