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.
How do I explain Azure AD SSO and its tokens?
Single sign-on lets an application rely on an identity provider so users can reuse an established login. OIDC supplies login identity on top of OAuth, while access and refresh tokens support API access and session continuation. The client and API validate different token purposes rather than trusting any token returned by the login service.
What is a tenant, and why does it matter?
A tenant is an organizational identity boundary containing users, applications and policies. Multi-tenant applications must decide which organizations can sign in and which data each organization may access. Identity-provider tenant validation and application database tenant scoping are related but separate controls.
How do I explain workflow state, retries and compensation?
Workflow state records where a run is, which steps completed and what remains to be done. Retries repeat recoverable steps, while compensation performs a business recovery action after partial success. Durable state makes these decisions possible after a process restart instead of relying on in-memory progress.
How do I explain stored procedure optimization?
A stored procedure is database-side code that groups SQL operations and control flow into a callable unit. It can reduce application round trips and centralize data logic, but a procedure can still contain slow queries or hold locks too long. Optimization begins by finding the expensive statements and understanding their plans and transaction behavior.
How do I explain price/time priority and auditability?
Price/time priority chooses better eligible prices first and then the earlier accepted order among equal-price orders in a simple matching model. Auditability means accepted inputs and resulting decisions can be reconstructed and checked. Concurrency control, durable sequence and exact quantities are needed so recovery does not change the outcome.
Difficulty is an editorial estimate. Completion means you chose to mark a question as understood.