Queues and background jobs

Some work is slow, and some can fail. How does an app do it without making the person in front of it wait?

System design · about 5 minutes

Some work doesn't need to happen while a person waits. Do it after you've answered, or put it in a line and do it one piece at a time. Then one slow part never holds up the person in front of the screen.

Picture: people waiting in a line go through one door, one at a time, 300 ms apart, onto a mailing list at Resend, the email service; above them a clock marks the nightly job that deletes what is older than 180 days