Module 12 Summary
What this module established
Use a yield dependency with finally for sessions: one per request, always closed. A leak on the error path exhausts the pool slowly, so the symptom appears hours later and under load.
Carry forward
- Map boundary failures to 503 or 504 rather than 500. The status tells a client whether retrying can help.
- Set an explicit timeout on every outbound call. Several popular clients default to none, so the failure mode is a hang.
- Bound retries, add jitter, and never retry a 4xx - the payload will not become valid.
Before moving on
Move on when every outbound call is bounded, no boundary failure becomes a 500, and one service is tested with no database.
