Java Fundamentals

The vocabulary and the numbers. A design round goes badly when requirements are never pinned down and estimates are never made.

4 concepts · 12 interview questions

What this topic covers

Every concept in fundamentals, and the questions each one gets asked as. Where a question links, it has a full write-up.

Requirements and back-of-envelope numbers

A design answer is only assessable against constraints. Reads per second, payload size and retention turn opinions into arithmetic.

  • Walk me through how you would start a system design question.
  • What would you estimate before choosing a database?
  • What is the difference between a functional and a non-functional requirement here?

Vertical and horizontal scaling

Bigger machines are simpler until they run out; more machines are unbounded but require statelessness and a way to distribute traffic.

  • When does horizontal scaling stop being possible?
  • What makes a service stateless, and why does it matter?
  • Where does the bottleneck move after you scale the app tier?

Latency, throughput and tail behaviour

Throughput is how much work per second; latency is how long one piece takes. Averages hide the tail, and the tail is what users notice.

  • What is the difference between latency and throughput?
  • Why do you care about p99 rather than the mean?
  • What is tail latency amplification?

CAP and the trade-off vocabulary

Under a network partition a system either refuses requests or serves possibly stale data. Naming the choice is what a senior answer sounds like.

  • Explain CAP without saying pick two.
  • What does PACELC add?
  • Give an example where you would choose consistency over availability.

More in System design

See the whole reference map →