Interview with a FAANG engineer.
Job Scheduler (System Design)
Watch someone solve the job scheduler problem in an interview with a FAANG engineer and see the feedback their interviewer left them. Explore this problem and others in our library of interview replays.
Problem type
Job Scheduler
Interview question
Design a Job Scheduler that runs at scheduled intervals
Interview Feedback
Feedback about Mutant Anteater (the interviewee)
- Advance this person to the next round?
No - How were their technical skills?
2/4 - How was their problem solving ability?
2/4 - What about their communication ability?
3/4
Strengths:
- Nicely gathered functional and non-functional requirements.
- Nice suggestion on AWS lambda.
- Decent high level designs and good discussion on various tradeoffs. Nice suggestion on using Kafka queues.
- Good communication skills.
Weaknesses:
- When probed into details, TC didn't perform too well. Specifically, scheduler's interaction with the database and how fault tolerance and cancellation will work.
- Missed providing high level system design.
- Missed status updates in the database and hence the database (persistent layer) didn't know what was happening with the rest of the system.
- Haphazard suggestion on using consistent hashing to assign jobs to scheduler.
Overall Feedback
- Visualize the overall user journey in your mind and then use those functional requirements to derive the interview.
- Use time wisely to get to the most interesting part of the question ASAP and not bore the interviewer with mundane stuff.
- When answering questions, discuss with the interviewer your design choices and keep seeking where they want to go into details.
- Change the functional requirements if the system is becoming too complicated due to unreasonable requirements. Challenge the status quo!
Interview Transcript
Doctor Squab: So I've been working at FAAng for about six plus years. My current level is l six. And I have interviewed about 100 plus candidates, a lot of them for system design, a lot of them for coding. I have sat in hiring committee meetings and stuff like that. So hopefully this interview will be helpful in that regard. My core expertise is in machine learning, mostly in images and videos. But in the past, I have kind of done all sorts of stuff. Yeah, that's about me. I wanted to understand what kind of roles you are applying for so that I can tailor the interview according to that.
Job Scheduler Requirements
Functional Requirements:
- Users can upload jobs to the scheduler.
- Users can modify existing jobs.
- Users can cancel jobs.
- Users can check job status.
Non-Functional Requirements:
- Reliability: The job must run at the scheduled time; failure is not acceptable.
- Scalability: Must be able to handle up to 100 million users, each scheduling jobs daily.
- Fault Tolerance: The system should handle failures gracefully and ensure jobs are not lost.
- Monitoring: Users should be able to get updates on their jobs.
High-Level System Design
Entities:
- Job Entity:
- Job ID
- Job Description
- Job Code or Image
- User Entity:
- User ID
- Job references
- Job Entity:
API Endpoints:
- Upload Job
- Modify Job
- Cancel Job
- List Job Status
Conclusion
- The overall system should be designed around ensuring jobs can be scheduled, monitored, and managed in a user-friendly manner. Communication and the ability to simplify requirements are crucial for efficiency and effectiveness in design.