Project deep dives
Explain ownership, trade-offs, failure handling, and real project outcomes.
What is the bottleneck?
A bottleneck is the resource or serialized step that limits throughput or increases waiting time. It can move after an optimization, so it is a property of a workload and system state rather than a permanent label on a component. Traces and saturation measurements help identify it.
What would you cache?
Caching reuses an earlier result to avoid repeated work. Good candidates are expensive repeated reads with an acceptable freshness window and a clear key. Caching is a poor shortcut when every answer must reflect the latest write or when users could share private results accidentally.
Where could a race condition happen?
A race condition happens when overlapping operations can violate a rule because their checks and writes are not coordinated. It can occur across requests even in a single-threaded Node process, and across multiple app instances. Identify the shared state and the exact interleaving that produces a wrong result.
What happens if a third-party integration is unavailable?
An unavailable integration should not cause unlimited waiting or silently lose accepted work. The design needs deadlines and an explicit user-visible outcome, such as failure, pending work or a stale-but-labeled result. Retry and reconciliation policies depend on whether the external operation is safe to repeat.
What happens if a database transaction fails halfway?
A database transaction is intended to prevent partial committed changes within its own boundary. If a participating statement fails and the transaction is rolled back, its uncommitted database changes are not kept. Other systems and earlier independent commits are outside that protection.
How would you monitor this system?
Monitoring tracks whether the system meets its operational goals and helps locate failures. Metrics show trends, logs show events and traces connect steps in a request or workflow. Useful monitoring includes business progress, not just whether processes are alive.
What would you redesign today?
A redesign answer should show what you learned from the existing system and how you would improve one real weakness. The proposal needs a benefit, a migration approach and an honest cost. Replacing a whole stack is rarely a convincing answer without a specific constraint driving it.
Difficulty is an editorial estimate. Completion means you chose to mark a question as understood.