Stubhub | Senior | System Design
Anonymous User
1644
Design a system that will send 1,000,000 recommendation emails to users in 5 minutes.

These emails must be sent from 12:00 PM to 12:05 PM.


My answer:

- You cannot create the recommendations within 5 minutes. You must create the recommendations in the
hour or two beforehand.

- Ask your interviewer whether the email service is a black box, or whether you own the service.
When it comes to email, some users will ultimately complain that they aren't getting their 
emails even if you send them, so you might need SMTP logs to prove that you're sending the emails.
This is usually easier to do if you own the email service.

- Discuss other problems that accompany email systems, like failure, retries, at-least-once delivery, and dead lettering.

- I gave calculations for the number of worker nodes that we need for the email service. I don't know
whether this is necessary.

- You will be asked about business statistics etc. that you should collect. Open rate, click through rate, 
conversion rate, A/B testing success metrics etc. are the ones you should talk about.

- You will be asked about system metrics to collect. You should collect metrics on email failure, retries, complaints.
You should also figure out how long it takes for the recommendation system to prepare 1,000,000 recommendations.

- You should talk about what to do if each component fails. If the recommendation system fails, you should have default recommendations.

Feel free to ask questions. See my diagram.

High Quality Image link
Low quality:
image

Comments (1)