3 lines
1.2 KiB
HTML
3 lines
1.2 KiB
HTML
<!doctype html><html lang="en"><meta charset="utf-8"><title>Service state and recovery</title><h1>Service state and recovery</h1><p>15-minute session: read for 3 minutes, trace for 3, experiment for 7, and complete the check for 2. Spend longer whenever you need.</p><p>A service can be stopped, starting, ready, failed, or restarting. Readiness means it can serve its intended workload, not merely that a PID exists. A restart policy needs backoff and a limit to avoid an endless crash loop. Model startup failure and a dependency becoming available.</p><p><strong>Practice and evidence:</strong> Predict the example or draw its state transitions. Change one assumption, test the boundary, and record the actual result. Explain what this small model does not establish about a production system.</p><pre><code class="language-python">delays=[min(2**attempt,30) for attempt in range(6)]
|
|
print(delays)
|
|
</code></pre><p><strong>Expected result:</strong> <code>[1, 2, 4, 8, 16, 30]</code></p><h3>Practice and evidence</h3><p>Keep three notes: your prediction, the actual result, and why they match or differ. The completion check grades understanding; the practice task builds skill.</p></html> |