AR6: Reliability across services: deadlines, retries, idempotency, outboxes and contracts

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

Networks fail in partial ways

🎯You'll be able to

Describe how calls between services fail, and why "slow" and "unknown" are harder to handle than "down".

🏠The everyday picture

You post a cheque and hear nothing. Did it get lost, is it still on the way, or was it paid and the receipt lost? Each needs a different response, and you can't tell which happened.

📘What it really is

📝A worked example

Input: the starter's order flow, where orders waits for the SMS.

Steps:

  1. Provider down and refusing: the order fails fast with an error (bad, but quick).
  2. Provider slow (10 seconds): each order waits 10 seconds; at 3 a second, 30 orders are held at once.
  3. No answer at all: the order waits until something gives up, possibly never.
  4. Unknown: if the call times out, the SMS may still have been sent.

Expected output: a table of the four cases and what the customer sees in each, showing that slow and unknown need design.

🌍Where it's used

📝Case scenario

An e-commerce site called a recommendations service on every product page with no deadline. One afternoon the service slowed to 20 seconds; every web server filled up with waiting requests and the whole site went down, though recommendations were optional. A 300 ms deadline would have shown pages without recommendations.

🖱️Try it

For one call in a system you know (an app calling a payment gateway), write what happens if it's slow, if it fails, and if you don't know whether it worked. Success: each case has a clear behaviour.

⚠️Common mistakes

🛠️For your project

Project 2's test 7 runs the monolith against a service that is down and one that never answers.

✅Quick check

Why is a slow service often worse than one that is down?

Show the answer

Callers wait and tie up resources, and the slowness spreads to them.

What does a timeout tell you about whether a request happened?

Show the answer

Nothing for certain: it may or may not have been carried out.

← BackAR6
ProLearners Assist