Interview with a Meta engineer.
An Interview with a Meta engineer
Interview Summary
Problem type
Design a free food app
Interview question
You have a food delivery app. You want to run a marketing campaign. You need to distribute 6M burgers in 10mins. No one should be promised more than 1 free burger.
Read more about the questions
Interview Feedback
Feedback about The Legendary Avenger (the interviewee)
Advance this person to the next round?
Yes
How were their technical skills?
4/4
How was their problem-solving ability?
4/4
What about their communication ability?
4/4
Overall:
TC did really well in terms of problem scoping. TC came up with the working solution. TC was able to scale their solution with sharding and other distributed system tools. TC was good at communicating the ideas and taking input. TC can do better in time management. Strengths:
- TC iterated on the fact that the marketing campaign is the key feature for this design.
- TC stated their assumption that each user has one account.
- TC asked clarifying questions about the design constraints and user requirements during the design discussion.
Improvement Areas:
- TC could have involved the interviewer while making the decision about sync vs async.
- TC came up with some complex solutions to handle the counter.
Interview Transcript
Red Maelstrom: Before we start, can you help me with what level you're applying at Meta?
The Legendary Avenger: Yeah, so I have on-site scheduled on Monday and Tuesday, of which I'll have a system design round.
Red Maelstrom: Let's start with the system design problem then. You have a food delivery app, and on this app, you want to run a marketing campaign. You would like to distribute 6 million burgers in ten minutes. No one should be promised more than one free burger.
The Legendary Avenger: To recap, we need to track distribution aggregation for 6 million burgers in 10 minutes, ensuring each user can only receive one burger.
- Assumptions Clarified:
- Each user has a unique account.
- Users are notified about the campaign beforehand.
Non-Functional Requirements:
- High availability and low latency are critical for enhanced user experience.
Action Items:
- Work on time management. Spend around 15 minutes on functional/non-functional requirements and leave time for API design and high-level design.
- Involve the interviewer more in discussions about trade-offs and decisions.
High-Level Design Discussion:
API Design:
- An endpoint to apply for a promotion with a payload containing user ID and promo code, processed asynchronously to enhance user experience.
System Design Considerations:
- A scalable payment system is already in place.
- The system should handle 20,000 requests per second efficiently.
Data Structures Used:
- Possible use of Bloom filters to keep track of which users have received a burger to avoid duplication.
Overall, the interviewee demonstrated a clear understanding of the problem and provided a structured approach to the design, aligning well with the requirements of a Meta engineering role.