面试系统设计_如何进行系统设计面试

面试系统设计

The system design interview is a great way to assess the seniority of a candidate in an interview. You can find a lot on the Internet on how to prepare for the design interview or which system design interview questions to expect, but very little on how to conduct an actual interview.

系统设计面试是评估面试候选人资历的好方法。 在Internet上,您可以找到很多有关如何准备设计面试或期望哪些系统设计面试问题的信息,而关于如何进行实际面试的信息很少。

In this post, I will describe my experience interviewing senior candidates for distributed systems roles. If you stumbled on this piece because you want to know how to ace the design interview, you should keep reading — a good way to prepare for the interview is to know how interviewers think about them.

在这篇文章中,我将描述我采访分布式系统角色的高级候选人的经验。 如果您是因为想知道如何应对设计面试而偶然发现的,则应该继续阅读-准备面试的一种好方法是知道面试官对他们的看法。

A word of advice before I continue: this type of interview is best suited for interviewing engineers who have some experience working in the industry. Engineers straight out of school, or with few years of experience, don’t have the skills necessary to ace this interview yet.

在我继续之前,请提个建议:这种面试最适合面试具有行业工作经验的工程师。 刚从学校毕业或具有几年经验的工程师还没有掌握这次面试所需的技能。

选择一个您熟悉的系统 (Pick a system you are familiar with)

A system design interview entails asking a candidate to design a system that solves a specific problem. The interview, which typically takes about an hour, is mostly an open-ended conversation — the goal is to get a sense of the candidate’s experience and problem-solving skills while working with them as they were your coworker.

系统设计面试要求要求候选人设计解决特定问题的系统。 面试通常需要大约一个小时,主要是开放性的对话-目的是在与候选人作为您的同事一起工作时,了解候选人的经验和解决问题的能力。

You want to pick a system you worked on in the past, or at the very least, know well. Ideally, it should be something relevant to what your team or your company does so that the candidate gets the chance to see the kind of projects they will be working on if they join your team. Don’t forget that it’s not just you evaluating them — they are also evaluating you.

您想选择一个您过去使用过的系统,或者至少要熟悉。 理想情况下,应该与您的团队或公司的工作相关,这样候选人才能有机会看到他们加入您的团队将要从事的项目类型。 别忘了,不仅仅是您在评估他们-他们也在评估您

Another reason to pick a system you know well is that you have spent a considerable amount of time internalizing its solution space, scalability limitations, tradeoffs, and failure modes. It’s not only easier for you to prepare for the interview, but it also gives you the ability to compare their solution to what you, or your team, came up with. And who knows, they might even give you some insights that you missed — I call this a win-win.

选择一个众所周知的系统的另一个原因是,您花费了大量的时间来内部化其解决方案空间,可伸缩性限制,权衡和故障模式。 您不仅可以为面试做准备,而且还可以将他们的解决方案与您或您的团队提出的解决方案进行比较。 谁知道,他们甚至可能为您提供一些您错过的见解-我称之为双赢。

Whatever you do, don’t ask them how to design a Twitter clone (unless you work at Twitter), or any other typical design interview question. When you are in the hotel booking business and ask to design a Twitter clone during the interview, you are telling the candidate that there is nothing interesting going on where you work. It’s a big red flag for a senior engineer, and rightly so.

无论您做什么,都不要问他们如何设计Twitter克隆 (除非您在Twitter上工作)或任何其他典型的设计面试问题。 当您从事酒店预订业务并在面试过程中要求设计Twitter克隆时,您是在告诉应聘者在您的工作地点没有什么有趣的事情。 对于高级工程师来说,这是一个很大的危险信号,这是正确的。

“But what if I don’t have a Twitter-scale problem?” — I hear you ask. That’s perfectly fine, you don’t need to have millions of users to reason about scalability — plus, it’s just one of the many challenges to solve when designing a distributed system.

“但是,如果我没有Twitter规模的问题怎么办?” —我听到你问。 很好,您不需要数百万用户来考虑可伸缩性,而且,这只是设计分布式系统时要解决的众多挑战之一。

从小规模设计开始 (Start with a small scale design)

Spend the first minutes talking to the candidate to get a sense of their past experience, their strengths, and their weaknesses. Then, pick a design question you prepared before the interview and present it to the candidate. Draw a basic sketch of the system you want them to architect on the whiteboard — this will help make them feel more relaxed as empty whiteboards can make people nervous.

花第一分钟与候选人交谈,以了解他们的过去经验,优势和劣势。 然后,选择面试前准备的设计问题,并提交给候选人。 在白板上绘制您要让他们架构的系统的基本草图 -这将使他们感到更轻松,因为空白的白板会使人感到紧张。

When presenting the system they should design, start with a small scale and make sure the candidate is on the same page — there will be time later to dig into scalability. Also, don’t hash out all the requirements in detail, as you want the candidate to ask questions to see whether they can get a clear picture of what they have been asked to design before jumping into the solution.

在介绍他们应该设计的系统时,应从小规模入手,并确保应聘者在同一页面上-稍后会有时间深入研究可伸缩性。 另外, 不要详细散列所有需求 ,因为您希望应聘者提出问题,以查看他们是否可以在进入解决方案之前对要设计的内容有清晰的了解。

Finally, ask them how they would design the system. But don’t just sit silently in a corner, talk to the candidate, and try to understand why they are making the decisions they are and how they are approaching the problem. At this stage, there is no need to deep dive into a specific component of the design or technology — go broad and give the candidate space to hash out a complete architecture.

最后,询问他们如何设计系统。 但是,不要只是默默地坐在角落里, 与候选人交谈,并试图了解他们为什么要做出自己的决定以及他们如何解决问题。 在此阶段,无需深入研究设计或技术的特定组成部分-扩大范围并给候选空间以散列完整的体系结构。

If you feel there are too many moving parts, ask whether there is a way to remove specific components while not affecting the overall solution. Also, ask the candidate to justify the tradeoffs they are making — for example, why did they pick a NoSQL store rather than SQL one?

如果您感觉到活动部件过多,请询问是否有一种在不影响整体解决方案的情况下卸下特定组件的方法。 另外,请候选人证明他们正在做出的取舍–例如,为什么他们选择NoSQL存储而不是SQL存储?

By the end of the first 30 minutes, they should have a simple design sketched out on the whiteboard.

在前30分钟的末尾,他们应该在白板上画出一个简单的设计。

扩大规模 (Crank up the scale)

Now that the candidate has an initial design, crank up the scale. Increase the number of requests per second, the volume of the data ingested, or anything else relevant to your specific problem. No matter how the initial design looks like, it’s bound to hit a brick wall as you increase the load it’s under.

既然候选人已经有了初步设计,就可以扩大规模。 增加每秒的请求数,增加的数据量或与您的特定问题相关的其他任何信息。 无论最初的设计是什么样子,当您增加其承受的负载时,它肯定会撞到砖墙上。

Ask them what they think will break as the scale increases and how they would address it. It’s a great sign if the candidate can point out brick walls on their own. Once they have identified the breaking points, work with the candidate to eliminate them. Start with the one that has the highest likelihood of being hit first, as the others might become less relevant once the design evolves. This stage is very much iterative, and as the design changes, so do the tradeoffs — discuss what those are and whether they make sense.

问他们,随着规模的扩大,他们认为会破裂什么,以及如何解决。 如果候选人可以自己指出砖墙,这是一个好兆头。 一旦他们确定了突破点,就与候选人合作消除它们。 首先从最有可能被首先击中的那一个开始,随着设计的发展,其他的相关性可能会降低。 这个阶段非常反复,随着设计的变化,权衡也随之改变-讨论它们是什么以及它们是否有意义。

Point out failure modes they missed and ask them what would happen if this component, or that link, was to go down. You can tell a lot about a candidate’s experience by how quickly they can spot failure modes, like single points of failure, and come up with elegant ways to solve them. Because you are asking about a system you have experience with, you can just recollect what the most typical issues were in the past and how you mitigated them.

指出他们错过的故障模式,并询问他们如果该组件或该链接断开,将会发生什么情况。 您可以通过候选人快速发现故障模式(例如单点故障)并提出巧妙的方法来解决这些问题,从而充分说明候选人的经历。 因为您要询问的是您有经验的系统,所以您可以回顾过去最典型的问题以及如何缓解这些问题。

By the end of the first 50 minutes, you should have discussed at length scaling and reliability issues. If there is time for it, pick a slice of the design and drill down into it. For example, if the candidate’s design requires replicating data, talk about consistency guarantees, and how to enforce them in detail.

在最初的50分钟结束之前,您应该已经讨论了长度缩放和可靠性问题。 如果有时间,请选择设计的一部分,然后深入研究 。 例如,如果候选人的设计需要复制数据,请讨论一致性保证,以及如何详细实施它们。

This is akin to the question: “tell me what happens when you type example.com in your browser,” but tailored to the design at hand. If you are hiring a senior systems engineer, you expect them to have a deep understanding of the basics, like TCP, paging, consistency models, etc. This knowledge is critical when debugging, and optimizing, complex systems.

这类似于一个问题:“告诉我,当您在浏览器中键入example.com时会发生什么”,但是针对当前设计而定制的。 如果您要雇用高级系统工程师,则希望他们对TCP,分页,一致性模型等基础知识有深入的了解。这些知识对于调试和优化复杂的系统至关重要。

By the end of the interview, you should have a good idea of the candidate’s strengths and weaknesses and how they approach problems that don’t have a single best answer. A senior candidate should be able to quickly go through the first part of the interview and have no issues scaling up the system and addressing failure modes in the second part. They should have a good explanation of every decision they took and be able to list the tradeoffs of their design. When interviewing strong candidates, you should leave the interview feeling like you learned something from them.

在面试结束之前,您应该对候选人的长处和短处以及他们如何解决没有最佳答案的问题有一个很好的了解。 高级候选人应该能够快速完成面试的第一部分,并且在第二部分中没有扩大系统规模和解决失败模式的问题。 他们应该对自己做出的每个决定都有很好的解释,并能够列出设计的权衡。 在面试优秀候选人时,您应该让面试感觉就像您从他们那里学到了什么一样

最后的话 (Final words)

The system design interview is a great way to get a feeling of a senior’s candidate’s problem-solving skills. Connecting boxes with arrows is just one part of it, though — and not the most challenging one. The tricky part is understanding the requirements, failure modes, and tradeoffs. This type of interview also encourages lively discussions, which gives you a glimpse into the candidate’s soft skills. Can they explain things clearly? Do they receive constructive feedback well?

系统设计面试是一种了解高级候选人的解决问题能力的好方法。 但是,用箭头连接框只是其中的一部分,而不是最具挑战性的部分。 棘手的部分是了解需求,故障模式和权衡。 这种面试还鼓励进行热烈的讨论,使您可以快速了解候选人的软技能。 他们可以清楚地解释事情吗? 他们是否收到建设性反馈?

If you are interested to learn more about designing distributed systems, not just in the context of interviews, check out the System Design Manual. It talks at length about network fundamentals, the theory of distributed systems, architectural patterns of scalable systems, resiliency patterns, and operational best practices on how to maintain large-scale systems with a small team.

如果您想了解更多有关设计分布式系统的信息,而不仅仅是在访谈中,请查阅《系统设计手册》 。 它详细讨论了网络基础知识,分布式系统的理论,可伸缩系统的体系结构模式,弹性模式以及有关如何使用小型团队维护大型系统的最佳操作实践。

Originally published at https://robertovitillo.com.

最初发布在 https://robertovitillo.com

翻译自: https://levelup.gitconnected.com/how-to-conduct-a-system-design-interview-9031a261c08e

面试系统设计

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值