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
69 practiced
Implement a simple in-process task scheduler in Python that supports enqueue(task, priority) and worker threads that process tasks. Add backpressure: when overall queue length exceeds a high-water mark, reject or shed low-priority tasks until the queue drops below a low-water mark. Describe how to extend this scheduler to work across distributed workers while preserving fairness.
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.
MediumTechnical
67 practiced
Implement a Bloom filter in Python with configurable bit array size and number of hash functions. Provide insert(key) and possibly_contains(key) methods. Then explain how a Bloom filter could reduce backend lookups for a large keyspace and discuss the implications of false positives for cache misses and SRE operations.
MediumTechnical
68 practiced
Implement a consumer-side deduplication layer in Python for messages from a distributed queue. Provide process_message(msg_id: str, payload: dict) that ensures at-most-once semantics using a persistent dedupe store with TTL. Discuss race conditions when multiple consumers see the same message and how you would scale dedupe store cleanup.
MediumTechnical
57 practiced
Implement simple leader election using Redis with SETNX and TTL in Python: provide functions acquire_leader(instance_id) -> bool, renew_leader(instance_id) -> bool, release_leader(instance_id). Handle edge cases: expired TTL, renewal races, and process crashes. Discuss split-brain scenarios and how you'd improve safety with stronger consensus protocols.

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.