The system design interview lasts 45 minutes.
A entrevista de system design dura 45 minutos.Aula
Entrevista técnica B2: system design
Nível: B2
Objetivo
Conduzir (ou participar) uma entrevista de system design em inglês com estrutura visível: clarifying questions, requirements, constraints, high-level design, bottlenecks, trade-offs, e fechamento com o que o candidato faria diferente em produção.
Explicação
System design B2 não é sobre 'saber a resposta certa', é sobre mostrar como você pensa sob incerteza. A estrutura canônica é: clarifying questions (5–10 minutos, vague → concreto), requirements (functional e non-functional, com números), constraints (throughput, latency, durability, consistency), high-level design (caixas e setas, sem implementação), deep dives nos componentes críticos, bottlenecks and trade-offs, e closing com 'o que você faria diferente em produção?'.
Marcadores verbais B2 importantes: 'let me make sure I understand the requirements before I propose anything', 'the main constraint here is X', 'here is the high-level design', 'the trade-off is Y vs Z', 'the bottleneck is X, and the mitigation is Y', 'in production I would add W'. Eles mostram processo, não apenas resposta. O oposto é pular direto para o design, defender a primeira ideia, e fechar sem reconhecer trade-offs.
O entrevistador bom B2 também faz o oposto: ouve o candidato, anota o que foi coberto, e segue a estrutura em vez de caçar a 'resposta certa'. O candidato bom B2 faz perguntas antes de desenhar, fala enquanto desenha (think aloud), e sempre volta aos requirements: 'this is consistent with the latency requirement of 100ms p95'. Sem requirements explícitos, qualquer design vira 'achismo'.
Erros comuns: ir direto para o design sem clarifying, defender a primeira ideia sem trade-offs, falar de implementação antes do high-level, esquecer de non-functional requirements, e fechar sem 'o que você faria diferente em produção'. O bom system design B2 termina com autoavaliação: 'here is what I would change in production after this interview'.
Exemplos
| Inglês | Tradução | Observação |
|---|---|---|
| Let me make sure I understand the requirements before I propose anything. | Deixa eu ter certeza de que entendi os requisitos antes de propor qualquer coisa. | Abertura B2: clarifying questions antes do design. |
| The main constraint here is 100ms p95 latency for the search endpoint. | A principal restrição aqui é latência p95 de 100ms para o endpoint de busca. | Constraint explícita, com número. |
| Here is the high-level design: clients hit the API gateway, which fans out to the search and ranking services. | Aqui está o design de alto nível: clientes batem no API gateway, que distribui para os serviços de busca e ranking. | High-level em uma frase; sem implementação. |
| The trade-off here is consistency versus availability; we are choosing availability for this product. | O trade-off aqui é consistência versus disponibilidade; estamos escolhendo disponibilidade para este produto. | Trade-off explícito + escolha com razão. |
| The bottleneck is the read path under batch load, and the mitigation is a read-through cache with a five-minute TTL. | O gargalo é o caminho de leitura sob carga de batch, e a mitigação é um cache de leitura com TTL de cinco minutos. | Bottleneck + mitigação, com número. |
| In production I would add a circuit breaker around the ranking service and a feature flag for the cache. | Em produção eu adicionaria um circuit breaker em volta do serviço de ranking e uma feature flag para o cache. | Fechamento: o que faria diferente em produção. |
| This is consistent with the latency requirement of 100ms p95; the cache hit ratio needs to be at least 60% to stay under budget. | Isso é consistente com o requisito de latência de 100ms p95; a taxa de hit do cache precisa ser de pelo menos 60% para ficar dentro do orçamento. | Volta aos requirements; número ancorado. |
| What are the non-functional requirements I should design against? | Quais são os requisitos não-funcionais para os quais devo projetar? | Clarifying question de non-functional. |
Erros comuns
- Pular direto para o design sem clarifying: o candidato erra o problema antes de começar.
- Defender a primeira ideia sem trade-offs: mostra falta de processo, não de conhecimento.
- Falar de implementação antes do high-level: perde a visão de sistema.
- Esquecer non-functional requirements: latência, throughput, durabilidade, consistência definem o design.
- Fechar sem 'o que faria diferente em produção': perde a chance de autoavaliação honesta.
- Não falar enquanto desenha: o entrevistador não sabe o que você está pensando; think aloud é o processo.
- Não voltar aos requirements: 'isso é consistente com X' ancora a conversa e mostra processo.
- Fingir que sabe uma tecnologia que não domina: B2 prefere honestidade ('I would not pick this in production because I don't have enough experience with it; here is how I would validate').
Prática guiada
Reescreva cada momento abaixo no padrão B2 de system design. O objetivo é clarifying, requirements, trade-offs, e fechamento com autoavaliação.
- Pular para o design: 'Vou usar Kafka.'
→ Versão B2: *Let me make sure I understand the requirements before I propose anything. What is the expected throughput? What is the consistency model? The main constraint is 100ms p95 latency, so the trade-off here is consistency versus availability; we are choosing availability for this product.* Explicação: clarifying + requirements + trade-off explícito.
- Defender primeira ideia: 'Esse design é o melhor.'
→ Versão B2: *Here is the high-level design. The trade-off is consistency versus availability; we are choosing availability. The bottleneck is the read path, and the mitigation is a read-through cache with a five-minute TTL. In production I would add a circuit breaker and a feature flag for the cache.* Explicação: design + trade-off + bottleneck + mitigação + fechamento com autoavaliação.
Resumo
System design B2 é processo sob incerteza: clarifying questions → requirements → constraints → high-level design → bottlenecks and trade-offs → closing with production reality check. Marcadores: *let me make sure I understand the requirements*, *the main constraint is X*, *the trade-off is Y vs Z*, *in production I would add W*. Não há 'resposta certa' — o que importa é o processo.
Vocabulário
Palavras principais
I always start with clarifying questions.
Eu sempre começo com perguntas de esclarecimento.What are the functional and non-functional requirements?
Quais são os requisitos funcionais e não-funcionais?Latency and throughput are non-functional requirements.
Latência e throughput são requisitos não-funcionais.Expected throughput is 10k requests per second.
Vazão esperada é 10k requisições por segundo.p95 latency is 100ms.
Latência p95 é 100ms.Start with the high-level design, then the deep dives.
Comece com o design de alto nível, depois os deep dives.The bottleneck is the read path under load.
O gargalo é o caminho de leitura sob carga.Always call out the trade-off.
Sempre destaque a compensação.The trade-off is consistency versus availability.
O trade-off é consistência versus disponibilidade.Add a circuit breaker around the ranking service.
Adicione um circuit breaker em volta do serviço de ranking.We will do a deep dive on the ranking service.
Vamos fazer um aprofundamento no serviço de ranking.The API gateway fans out to the search and ranking services.
O API gateway distribui para os serviços de busca e ranking.A read-through cache reduces p95 by 40%.
Um cache de leitura reduz p95 em 40%.Ship behind a feature flag.
Lance atrás de uma feature flag.Walk me through your capacity estimate.
Me guie pela sua estimativa de capacidade.Start with a back-of-the-envelope for QPS.
Comece com um cálculo de ordem de grandeza para QPS.Which consistency model fits this product?
Qual modelo de consistência cabe neste produto?História
História: Entrevista técnica B2: system design
Nível: B2
História em inglês
Clarifying questions
The interviewer asked Priya to design a search system. Priya opened with clarifying questions instead of jumping to a design. She asked, what is the expected throughput? Ten thousand QPS, the interviewer said. She asked, what is the consistency model? Eventually consistent is fine for this product, he said. She asked, what are the non-functional requirements? One hundred milliseconds p95 latency and 99.9% availability, he answered. She said, let me make sure I understand the requirements before I propose anything.
High-level design and trade-offs
Then Priya moved to the high-level design. She said, here is the high-level design: clients hit the API gateway, which fans out to the search and ranking services. The interviewer asked, where is the cache? Priya answered, in front of the search service, with a read-through cache and a five-minute TTL. The interviewer asked, what is the trade-off? Priya answered, the trade-off here is consistency versus availability; we are choosing availability for this product, with a five-minute TTL on the cache. She added, the bottleneck is the read path under batch load, and the mitigation is the read-through cache.
Closing with production reality check
The interviewer asked, what would you do differently in production? Priya answered, in production I would add a circuit breaker around the ranking service and a feature flag for the cache. The interviewer asked, how would you validate the cache hit ratio? Priya said, a back-of-the-envelope: at 10k QPS with 60% hit ratio, the cache handles 6k QPS, the origin handles 4k; both need to stay under the p95 budget. The interviewer asked, what about consistency? Priya said, this is consistent with the latency requirement of 100ms p95; if the product later needs stronger consistency, we would add a write-through layer behind the cache. She ended with one honest caveat. I would not pick Kafka in production for the indexing pipeline without a small prototype with a synthetic load, she said. The interviewer nodded; Priya had shown process, trade-offs, and self-awareness under uncertainty.
Tradução linha por linha
| Inglês | Tradução |
|---|---|
| The interviewer asked Priya to design a search system. | O entrevistador pediu para Priya desenhar um sistema de busca. |
| Priya opened with clarifying questions instead of jumping to a design. | Priya abriu com perguntas de esclarecimento em vez de pular para o design. |
| She asked, what is the expected throughput? Ten thousand QPS, the interviewer said. | Ela perguntou: qual é a vazão esperada? Dez mil QPS, disse o entrevistador. |
| She asked, what is the consistency model? Eventually consistent is fine for this product, he said. | Ela perguntou: qual é o modelo de consistência? Consistência eventual é suficiente para este produto, ele disse. |
| She asked, what are the non-functional requirements? One hundred milliseconds p95 latency and 99.9% availability, he answered. | Ela perguntou: quais são os requisitos não-funcionais? Cem milissegundos de latência p95 e 99,9% de disponibilidade, ele respondeu. |
| She said, let me make sure I understand the requirements before I propose anything. | Ela disse: deixa eu ter certeza de que entendi os requisitos antes de propor qualquer coisa. |
| Then Priya moved to the high-level design. | Então Priya passou para o design de alto nível. |
| She said, here is the high-level design: clients hit the API gateway, which fans out to the search and ranking services. | Ela disse: aqui está o design de alto nível: clientes batem no API gateway, que distribui para os serviços de busca e ranking. |
| The interviewer asked, where is the cache? | O entrevistador perguntou: onde está o cache? |
| Priya answered, in front of the search service, with a read-through cache and a five-minute TTL. | Priya respondeu: na frente do serviço de busca, com um cache de leitura e TTL de cinco minutos. |
| The interviewer asked, what is the trade-off? | O entrevistador perguntou: qual é o trade-off? |
| Priya answered, the trade-off here is consistency versus availability; we are choosing availability for this product, with a five-minute TTL on the cache. | Priya respondeu: o trade-off aqui é consistência versus disponibilidade; estamos escolhendo disponibilidade para este produto, com TTL de cinco minutos no cache. |
| She added, the bottleneck is the read path under batch load, and the mitigation is the read-through cache. | Ela adicionou: o gargalo é o caminho de leitura sob carga de batch, e a mitigação é o cache de leitura. |
| The interviewer asked, what would you do differently in production? | O entrevistador perguntou: o que você faria diferente em produção? |
| Priya answered, in production I would add a circuit breaker around the ranking service and a feature flag for the cache. | Priya respondeu: em produção eu adicionaria um circuit breaker em volta do serviço de ranking e uma feature flag para o cache. |
| The interviewer asked, how would you validate the cache hit ratio? | O entrevistador perguntou: como você validaria a taxa de hit do cache? |
| Priya said, a back-of-the-envelope: at 10k QPS with 60% hit ratio, the cache handles 6k QPS, the origin handles 4k; both need to stay under the p95 budget. | Priya disse: um cálculo de ordem de grandeza: a 10k QPS com 60% de hit, o cache lida com 6k QPS, a origem com 4k; ambos precisam ficar dentro do orçamento de p95. |
| The interviewer asked, what about consistency? | O entrevistador perguntou: e a consistência? |
| Priya said, this is consistent with the latency requirement of 100ms p95; if the product later needs stronger consistency, we would add a write-through layer behind the cache. | Priya disse: isso é consistente com o requisito de latência de 100ms p95; se o produto depois precisar de consistência mais forte, adicionaríamos uma camada de write-through atrás do cache. |
| She ended with one honest caveat. | Ela terminou com uma ressalva honesta. |
| I would not pick Kafka in production for the indexing pipeline without a small prototype with a synthetic load, she said. | Eu não escolheria Kafka em produção para o pipeline de indexação sem um protótipo pequeno com carga sintética, ela disse. |
| The interviewer nodded; Priya had shown process, trade-offs, and self-awareness under uncertainty. | O entrevistador assentiu; Priya tinha mostrado processo, trade-offs e autoavaliação sob incerteza. |
Notas de vocabulário
- let me make sure I understand the requirements before I propose anything = abertura B2: clarifying antes do design; processo, não resposta.
- what are the non-functional requirements? = non-functional define o design; latência, throughput, disponibilidade, consistência.
- here is the high-level design: clients hit the API gateway, which fans out = high-level em uma frase; caixas + setas, sem implementação.
- the trade-off here is consistency versus availability; we are choosing availability for this product = trade-off explícito + escolha com razão, não a 'resposta certa'.
- the bottleneck is the read path under batch load, and the mitigation is the read-through cache = bottleneck + mitigação ancorados no design.
- in production I would add a circuit breaker and a feature flag for the cache = fechamento com o que faria diferente em produção; autoavaliação honesta.
- a back-of-the-envelope: at 10k QPS with 60% hit ratio, the cache handles 6k QPS = cálculo de ordem de grandeza ancora números sem calculadora.
- this is consistent with the latency requirement of 100ms p95 = volta aos requirements; ancora a conversa em critérios, não em opinião.
- I would not pick Kafka in production for the indexing pipeline without a small prototype = honestidade B2: não sei, mas sei como validar.
Perguntas de compreensão
- Why did Priya open with clarifying questions instead of jumping to a design?
- What requirements did Priya extract from the interviewer?
- How did Priya present the high-level design?
- What was the trade-off, and what did Priya choose?
- How did Priya identify the bottleneck and the mitigation?
- How did Priya answer the closing question about what she would do differently in production?
- Why did Priya use a back-of-the-envelope for the cache hit ratio?
- Why did Priya acknowledge the consistency caveat and the Kafka prototype risk?
- What was the strongest B2 signal in Priya's interview?
Prática com a história
- Reescreva: 'Vou usar Kafka.' (system design B2)
- Reescreva: 'Esse design é o melhor.' (system design B2)
- Reescreva: 'Vou implementar com Docker, Kubernetes e Postgres.' (high-level B2)
- Reescreva: 'Acho que está bom, vamos fechar.' (fechamento B2)
- Traduza: 'Aqui está o design de alto nível: clientes batem no API gateway, que distribui para os serviços de busca e ranking.'
- Traduza: 'Quais são os requisitos não-funcionais para os quais devo projetar?'
Prática
Exercícios e teste
A próxima melhoria é transformar esses arquivos em perguntas com resposta no navegador. Por enquanto, esta página já organiza o estudo e permite seguir a aula inteira sem abrir os arquivos manualmente.