DevOps Foundations · Module 5: Container basics · Lab
Verify Health Checks, SIGTERM Handling and Resource Limits
50 min hands-on · Advanced
Local Docker/Podman; a service with a slow-warm dependency stub under /tmp/dlab-m05-03.
Two ways to do this lab: in your browser on Killercoda (free, no install), or on your own machine as a local guide. Killercoda runs one free scenario at a time: if you see a waiting queue, close other Killercoda tabs and wait a minute.
Objectives
- Add a readiness check on a real dependency path with warmup cover
- Prove graceful SIGTERM drain with in-flight requests
- Set a memory limit from measured peak and show the OOM boundary
Step 1
Add a real healthcheck
Implement /ready testing the stub dependency, with start-period covering measured warmup. Show the check failing before warm and passing after.
Step 2
Prove graceful stop
Send traffic, stop the container, and show in-flight requests completing before exit. Record stop duration and confirm no 5xx during a recreate cycle.
Step 3
Bound the resources
Measure peak memory under load, set a limit with headroom, and demonstrate the container surviving normal load while a deliberate over-allocation trips the limit. Record numbers.
How to confirm it worked
- Healthcheck tests the dependency path with warmup covered, both states shown
- Graceful stop proven with request evidence, zero 5xx across recreate
- Memory peak measured, limit set with stated headroom, OOM boundary demonstrated
- All three proofs recorded with commands and outputs