Engineering Decisions · Junior · Question 10 of 12

Sign-up sends a welcome email through a provider that sometimes takes 10 seconds. Sign-up itself must stay fast, and the email may arrive a minute later. What do you do?

Show the answer

Correct answer: Put the email on a queue for a background worker

Explanation

A queue returns the response at once, and a worker can retry if the provider fails, which suits a delay of a minute. Sending inside the request fits rare actions where the user must see the result of delivery, but here it ties sign-up speed to the provider. Sending from the browser exposes credentials and is lost if the tab closes, so it only fits a public, keyless client API.

Further reading

Problem with a question

Engineering Decisions · Junior · question 10

Test yourself

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

Take this quiz