Timeouts, retries, and idempotency

15-minute session: read for 3 minutes, trace for 3, experiment for 7, and complete the check for 2. Spend longer whenever you need.

A timeout does not prove a server did nothing: the action may have completed before the response was lost. Use an idempotency key for operations that must not run twice. Bound retries and add backoff. The model returns the same stored result for repeated keys instead of applying the side effect again.

Practice and evidence: 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.

results={}
def complete(key):
    if key not in results:results[key]=len(results)+1
    return results[key]
print(complete("lesson-1"),complete("lesson-1"))
print(len(results))

Expected result: 1 1 1

Practice and evidence

Keep three notes: your prediction, the actual result, and why they match or differ. The completion check grades understanding; the practice task builds skill.