Engineering Decisions · Middle · Question 7 of 14

Checkout calls a recommendations service that sometimes hangs for 30 seconds. Recommendations are optional, while checkout must stay fast. What do you do?

Show the answer

Correct answer: A short timeout with a fallback of no recommendations

Explanation

An optional feature should never hold up the main flow, so a short timeout and an empty fallback keep checkout fast. Long timeouts with retries fit a dependency you truly can't work without, and here they would stack delays on top of a hanging service. Merging the services fits two parts that always change together, but it's a big rewrite and doesn't fix the slowness itself.

Further reading

Problem with a question

Engineering Decisions · Middle · question 7

Test yourself

Take the Engineering Decisions · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz