I have done a lot of interviews at FB and have seen several patterns that can help people be more successful. Note: this is my personal observations. I think my observations might help people interviewing for E5 the most, and hopefully not just at FB but other tech companies as well. 1. You don't lead the conversation. At FB, E5 is senior SWE, you are expected to lead. During system design interview, we expect you to lead the conversation. If you cannot do that effectively, very likely I will down level you to E4. 2. You don't pay enough attention to Problem Exploration. Very often, candidates ask a couple simple questions to verify the problem and move on, jump right into the solution/design. It's not a good practice. I recommend structure it better, at least break down the problem clearly to 2 parts: Functional requirements, and Non-function requirements. Describe your assumptions and ask for clarification. 3. You don't do quantitative analysis or you do it incorrectly. Some people ignore that part. If you don't understand the scale of the system, QPS, database size, database growth, how would you design a scalable system. Now, it's even more interesting. Many people did quantitative analysis as recommended in many interview guideline. But it's fking useless if you don't use the information there to justify your design decisions/tradeoffs. In short, many people only do some quantitative analysis to complete an item in the checklist. 4. You don't actively discuss your design decisions and tradeoffs. Sometimes you think it's obvious, but as an interviewer, I don't know if you have consider other options. You'd better discuss some alternatives and why you decide to go with your choice. For example why you use MySQL vs K/V store. It sounds very basic, but from my own experience, 90% of candidates make at least 1 or more of these mistakes. How would you approach it? This is what I would do, and what I have seen successful candidates do. 1. Clarify functional and non-functional requirements. 2. The non-functional requirements should include the capacity or scalability requirement. Go from there to do some quantitative analysis. 3. Start with a basic design (similar to the brute-force solution in coding). Express clearly that this is the basic design and you will evolve it from there. Note: even for the basic design, you should start talking about tradeoffs of your design decisions. 4. Now, use the analysis in 2. to evolve your design. Do you need to add LB, caching, sharding, pre-computing etc? Why? This is quite enough for a senior SWE in 40'. For higher levels, you should be able to go deeper and broader for 4 and I will not go into the detail here. Also, go broader might help as well. For example, if the question as you to design something for photos, think about how you would extend it to videos and other content types as well. #facebook #meta #systemdesign #interview
How many teams at fb are actually designing systems using this approach in their day to day job?
Probably none. But interview and job are two completely different things.
I cannot speak for other teams, but this is what I and my team do.
Great post, thanks for your effort
BTW when would one use sql VS key value store? I hear a lot of articles talk about this but don't explain the difference. Does anyone know this or is it a bad question for blind? One difference is if you have relational data go with sql or else key value store. Assuming this statement is correct why go with key value store in this case? Why can't we use sql for non relational data?
MySQL is relational. K/V store is non-relational. For smaller systems with known data skeleton, MySQL is easy to use and maintain. For bigger systems, K/V store provides more flexibility. But regardless, these days big companies like FB & G customized the DBs so much it’s hard to fit one solution into one problem.
This is not true. Schema less vs schema architecture depend on what your are trying to optimize based on CAP theorem (when you talk of large scale a distributed network needs to be optimized as opposed to single node). If you need multiple indexes on large scale database where writes >>> higher than MySQL will beat K/V. You can also tune MySQL with K/V configuration to make K/V store completely useless. Modern DBs like Mondo DB are popular because ease of integration of their distributed network that fits fairly simple requirements and not because K/V stores scale better.
Awesome, thanks for the breakdown. For an E4/IC4 interview I’m guessing the best strategy is to still aim for all of these things, but do you know if there are any significant differences regarding what’s expected of a candidate at that level?
For E4, aim for completing the design, having a working solution, clear API, well-defined component responsibility, failure handling.
Thanks, I have my onsite in a week so that’ll help point me in the right direction. Interestingly, I have two SDI rounds. The second one has a shadow interviewer. Do you know how the shadow round usually factors into the results?
Does anyone have a good resource for quantitative analysis/back of the envelope calculations? I can design a fairly comprehensive system and explain why certain decisions should be made for better latency, availability, etc., but I don’t have a real sense of scale when it comes to the numbers provided for one of these questions
Someone shared this so this is good. So,here's something that might help. 1 Million => 10^6 1 Billion => 10^9 1 Trillion => 10^12 1 Million bytes => 1MB 1 Billion bytes => 1000MB => 1GB 1 Trillion bytes => 10^6MB => 1000GB => 1TB M => Million bytes => 1MB T => 10^Twelve => Trillion Bytes => 1TB If data you're trying to save is 500kb/reuqest approach it like this - 500 * 10^3 bytes => 5*10^5 bytes For 10Million (10^7) requests => 10^7* 10^5 * 5 => 10^12 * 5 => 1Trillion bytes * 5 => 5TB
This is a good starting point not just for SRE but for SWE too - https://sre.google/workbook/non-abstract-design/
Thanks for this. If attempting for an E6 role, would failure to dig in deeper as fitting for a E6 result in a rejection or downlevelling?
It would result in down level.
Facebook is about speed coding. There is no time to break down a problem into “functional and non functional requirements” when you got 15 minutes per question. Everyone just regurgitating solutions because that is who you hire: leetcode memorizers.
Did you even read the post? It's about system design, not coding lol
Thx for writing this post. I’ve 15 yoe and I don’t see the point of doing quantitative analysis in interviews. Every company wants to design scalable systems. Everyone cares about fault tolerance, availability, and some about consistency. Every system wants to store millions and billions of rows. The divide between nosql and sql systems is already diminishing. What do you get by checking if ppl can do math on the whiteboard? Is the design really changing based on the math? I rarely see this happening. Unless I’m building a prototype everything needs to be scalable from the get go. The numbers simply don’t matter so much.
I think quantitative analysis is important. I don't care if you can do math or if your analysis has some small errors. I think what we care about is if you know how to use data to inform your decision. Why do you need to add LB, why do you need to shard? Not every system design problem would need that. Also, data driven decision at FB is important. I have to gather and analyze data before for most if not all of the projects I work on. Tbh, the quantitative analysis in system design in interview is very straightforward and easy to do. For nosql vs. sql, it's just an example. You should discuss other options and why you pick what you pick.
Not true. I had the same idea as you and then I received a system design interview questions where consistency was much more important than scale and you’re expected to figure out that scale isn’t much of a problem at all for the system.
Is it automatic downgrade/reject if I use a calculator to do estimation ?
I don't care. It's not a math test.
Tech Industry
Yesterday
2522
Do people underestimate E6 role at meta?
World Conflicts
6h
329
Peaceful Protest Hasn’t Worked and Has Been Met With Aggression.
Tech Industry
2d
2323
The two-pizza team rule is racist
Tech Industry
Yesterday
1385
Companies that pay as much as meta
Tech Industry
2d
9917
What happens when most of your team is Indian?
Thanks for clarification. FB down levels regardless.