InterviewStack.io LogoInterviewStack.io

System Design in Coding Questions

Assess the ability to apply system design thinking while solving coding problems. Candidates should demonstrate how implementation level choices relate to overall architecture and production concerns. This includes designing lightweight data pipelines or data models as part of a coding solution, reasoning about algorithmic complexity, throughput, and memory use at scale, and explaining trade offs between different algorithms and data structures. Candidates should discuss bottlenecks and pragmatic mitigations such as caching strategies, database selection and schema design, indexing, partitioning, and asynchronous processing, and explain how components integrate into larger systems. They should be able to describe how they would implement parts of a design, justify code level trade offs, and consider deployment, monitoring, and reliability implications. Demonstrating this mindset shows the candidate is thinking beyond a single function and can balance correctness, performance, maintainability, and operational considerations.

MediumTechnical
61 practiced
Implement a graceful shutdown handler for a networked Python HTTP service: stop accepting new requests, allow existing in-flight requests to finish up to a configured timeout, report readiness/drain status to a load balancer (or Kubernetes), and then exit. Show signal handling, connection draining, and interaction with an orchestrator's termination lifecycle.
HardSystem Design
121 practiced
Design and outline an implementation for a consistent hashing system that supports replication factor R and read/write quorums similar to Dynamo. Provide pseudocode for put(key, value) and get(key) that route to replica nodes, wait for W/R acknowledgements, and resolve conflicts (vector clocks or timestamps). Discuss availability under node failures and anti-entropy strategies.
HardSystem Design
69 practiced
Design and implement a reactive data-access layer that observes DB latency percentiles and dynamically routes reads to replicas or cached copies when primary latency exceeds thresholds. Provide code to track latency percentiles and to switch routing decisions with hysteresis. Discuss consistency implications and how to alert when serving stale data increases.
MediumTechnical
62 practiced
Implement an idempotency wrapper in Python that makes a request handler idempotent based on an idempotency key stored in persistent storage (Redis or database). Provide handle_request(idempotency_key, request_fn) that atomically stores the key before executing request_fn or returns the cached response for retries. Discuss TTL, storage cost at scale, and correctness under concurrent retries.
EasyTechnical
59 practiced
Implement a per-user fixed-window rate limiter in Python. Build a class RateLimiter(max_requests: int, window_seconds: int) with method allow_request(user_id: str, timestamp: float) -> bool that returns True if the request is allowed. Aim for O(1) amortized time per request and memory proportional to number of active users. After implementing, explain how this fixed-window approach behaves under bursty traffic and what production changes (TTL cleanup, distributed state) you would make.

Unlock Full Question Bank

Get access to hundreds of System Design in Coding interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.