I was interviewed recently for FB onsite system design in Dec 2021 for singapore location. I have 10+ years of exp.
Design privacy for a FB post
Users will select three privacy options in a post.
- Public
- Friends
- Friends of Friends
After the user selects any privacy option others will view the post based on the post privacy setting.
I clarified questions about this requirement.
- no of daily active users
- no of read/writes etc
- non-functional requirements (availability, latency, read/write ratio, scalability etc)
After writing func/non-func req and scale.
- Draw high level design.
- APIs /get-privacy-settings, /post-message, /check-privacy etc
- DB tables user_post, user_friends
Then interviewer asked few cross-questions. I managed to ans.
- how will you handle friends-of-friends check for a post
- how will you handle new privacy types (group, exclude, include particular persons etc)
- why I choosen user_friends table and how data look like.
- discussed special case about celebrity users.
It all felt ok in dicussions...
later got rejected due to f***ed up on a Coding round :)
Got feedback about Product Design-
- communication, discussion all good
- should also consider quantitative analysis. like always calculate on each decision data volume, no of users, read/write and have these numbers drive your conversation.
- I felt for each question interviewer asks you should ans it 2-3 steps each going deeper (onion like explanation step by step) and don't ans 1 liner.
Going to work more on these and hope to crack any FAANG soon :)
Good Luck 🍀 Everyone !!
Lets Enjoy this journey together.....