如何进行系统设计面试
https://www.hiredintech.com/courses/system-design
- constraints and user cases. 确认量级以及各种条件约束,需要完成的功能等
- abstract design. 按照功能划分成为各种services, 这种方式比较系统化,然后按照各个service进行设计。先考虑功能完备,然后考虑性能问题,决定是否需要增加更多的services.
- bottleneck and trade-off. 列举出来可能哪些地方出现瓶颈(bottlenecks and weak spots). 然后可能会就某个点进行比较深入的探讨
- performance and scalability. caching, LB, replication, sharding etc.
So what should you do at your interview?
- First of all, follow the System Design Process. You already know how to apply it, so we'll be brief. Don't skip steps, don't make assumptions, start broad and go deep when asked.
- Second, keep in mind that system design questions serve as an idea exchange platform. Be prepared for discussions about tradeoffs, about pros and cons. Be prepared to give alternatives, to ask questions, to identify and solve bottlenecks, to go broad or deep depending on your interviewer's preferences.
- Don't get defensive: whenever your interviewer challenges your architectural choices, acknowledge that rarely an idea is perfect, and outline the advantages and disadvantages of your choice. Be open to new constraints to pop up during the discussion and to adjust your architecture on the fly.
- Most of all, have fun. Dreaming up architectures is a very stimulating mental process - enjoy it and stay positive. You're already equipped with the right knowledge, just apply it during your interview and you'll do well.
Each interview is unique and you will need to adapt to the situation. In this example problem we tried to produce a low-level design that covers most important aspects of a production system that can summarize text. To get to this point we went through a few steps:
- Tried to collect information about the constraints of the problem
- Drafted a very high-level design of the system. While doing that some additional questions popped up and by getting the answers to them we made the right decisions about the system. We also made sure that the interviewer is happy with the general direction that we are going before going into the details.
- After all that, we went into more details to address various issues that the system could have in production. This is probably the most time consuming part, which will also involve some more detailed discussions about different decisions that we make. You need to be prepared to talk about things more concretely using actual numbers, technology solutions and possible use cases.