KatInterview

Storage, Isolation, Orchestration and Speed: Four Engineering Trade-offs

System DesignModel answer
MediumModel answerSystem Designdatabasesdockerkubernetes

Last updated

Answer four fundamentals questions: relational vs NoSQL storage, VMs vs containers, what Kubernetes adds beyond Docker, and why Python lags C++ and how to close the gap.

You are in a technical screen and asked four short fundamentals questions. For each one, give a mental model, the main trade-offs, and a concrete rule for when you would pick each option. Tie your answers to a realistic workload where you can, for example high-rate sensor data alongside experiment metadata.

  1. Relational vs NoSQL storage. Compare relational databases and NoSQL stores on schema, transactions and ACID, consistency, scaling, and query flexibility. When would you choose each?

  2. Virtual machines vs containers. How do the two differ in how they isolate workloads? What problems does Docker address?

  3. Kubernetes on top of Docker. If containers already run under Docker, what does Kubernetes add? Consider scheduling, service discovery, autoscaling, rollouts and rollbacks, and self-healing.

  4. Python vs C++ for CPU-bound work. Why is Python usually slower? List practical ways to speed up Python code and say when each is appropriate.

Aim for a structured answer that names trade-offs explicitly rather than reciting definitions.

Hints

Hint 1

For part 1, think about what a database must coordinate when data lives on many machines, and how that limits transactions and joins.

Hint 2

For part 2, ask what is shared (the kernel) and what is duplicated (the whole guest OS). Then connect that to startup time, density and security boundaries.

Hint 3

For part 3, Docker manages one host. List what you must do by hand once you have dozens of containers over many hosts, and which of those jobs a control loop with a desired state could automate.

Hint 4

For part 4, separate the causes (interpretation, dynamic typing, boxed objects, the GIL) and match each speed-up to the cause it removes. Always profile before optimizing.