System Design
81 bites tagged System Design — interview questions with model answers, and 60-second explainers.
Design a system to reduce large client-side experiment payload size
Tests edge evaluation and payload compression. Use server-side pre-evaluation or edge nodes sending only assigned variants; compact bucketing indexes or Bloom filters; lazy-load noncritical experiments. Never do full client-side evaluation of every flag rule.
Compare PostgreSQL versus a columnar warehouse for raw event data
Contrast row vs column storage, compression, and scan speed; note Postgres suits OLTP and point lookups while columnar stores excel at aggregations. data orientation tradeoffs.
How would you implement a simple feature flag system?
Tests runtime config separation and distributed hygiene. Outline: control service, datastore, API, SDK, and update mechanism; local evaluation with cached state; short-lived flags. Red flag: static config files requiring redeployment are not feature flags.
Walk me through a magic link login system and its security considerations
Tests auth architecture and threat modeling for passwordless flows. Strong answers map request-token-email-verify-session, then harden with short expiry, single-use tokens, rate limits, and device binding.
Design a highly available entitlements service with caching
This tests balancing read performance with consistency in access control. A strong answer proposes tiered caching with proactive invalidation, read-optimized hot paths, and event-sourced temporary grants.
Design an A/B test for a Buy Now button
This tests experiment plumbing: deterministic bucketing, sticky storage, and logging. A strong answer covers user-ID hashing, cookie persistence, and impression-plus-conversion events.
Design a programmatic SEO system for 1 million landing pages
Tests data infrastructure thinking, not content generation. Covers one-row-one-page schema, template rendering with edge caching, hierarchical routing, and crawl-budget controls via sitemaps. Red flag: AI bulk writing without structured data or caching.
Architect an A/B test for paid-ad signup flows
Tests pre-auth bucketing and funnel attribution. Hash a stable anonymous ID for fast assignment; stream events via Kafka into hourly aggregates; run t-tests on signup rates. Red flag: assigning after signup starts or DB lookups per assignment.
Design a system that detects choice paralysis and dynamically simplifies the interface
Track hover entropy, scroll jitter, and time-to-click; use a contextual bandit to select simplification tiers. real-time behavioral inference with safe UI adaptation.
Design a near real-time user interaction tracking and analytics system
Tests decoupling ingestion from querying with justified tech choices. Outline: client → Kafka → Flink → ClickHouse → API; budget sub-30s latency and backpressure per stage. Red flag: one monolithic RDBMS or batch ETL handling both writes and reads.
How do you architect a global notification holdback group?
Tests persistent control-group isolation without breaking critical flows. Strong answers use deterministic sticky bucketing by user ID, separate marketing and transactional namespaces, and audit holdout bleed.
How do you design allocation logic to minimize concurrent A/B test interactions?
Compare mutual exclusion with layered randomization via layers and reservations; stress isolation vs throughput. Designing allocation to isolate concurrent experiments.
How would you model cross-platform ad campaign data and adaptation logic?
Propose a canonical model, platform adapters mapping copy to each schema, and an async pipeline with validation. Separating campaign intent from platform execution.
Design a simple templating system for ad copy generation
Tests separation of concerns and API design. A good answer: data model separate from template, placeholder syntax, graceful missing-value handling, and HTML escaping. Red flag: naive string concatenation without validation or extensibility.
Design a personalized newsletter recommendation pipeline
Tests batch versus stream tradeoffs and send-time personalization constraints for millions of recipients. A strong answer covers event capture, 24-hour aggregation, lightweight rec generation, and template injection before send.
Design a system to A/B test headlines for a single article URL
Hash users for sticky variants; store separately; emit events; compute CTR. controlled experiment design with user bucketing and attribution. client-side randomization without stickiness or event tracking.
How would you design an auto-generated sitemap.xml for a large blog?
This tests scalable SEO automation. A strong answer proposes an async pipeline, sitemap index files past 50,000 URLs, and loc, lastmod, and priority. Red flag: manual edits, static files in git, or ignoring the 50,000 URL limit.
Architect a real-time multi-armed bandit and compare trade-offs to A/B testing
Sketch a fast arm router, streaming feedback, and model updates; contrast MAB regret minimization with A/B's unbiased estimates. Real-time ML serving and statistical trade-offs.
How would you engineer pSEO templating and data integration to prevent duplication?
Architecting data-templating pipelines that enforce genuine uniqueness at scale. A strong answer hits modular variable-rich blocks, canonical and noindex guardrails, and similarity monitoring.
Design a system to detect keyword cannibalization
Query-page-position data, intent clustering, and rank volatility. Whether you can distinguish search-intent overlap from keyword duplication at scale. exact-keyword deduplication without modeling intent or CTR.
Design a content gap tool: data sources and core logic
Tests system design for SEO pipelines. Strong answers cite APIs (Ahrefs, Semrush, GSC), explain normalization, and frame logic as a left-anti-join on keyword plus geo and device filtered by rank. Red flag: dismissing API cost, rate limits, and freshness.
Design a content versioning system with history and revert
Versions table with article_id, version_num, content_snapshot, timestamp; APIs for createVersion, getHistory, restoreVersion. Can you model immutable history simply? Diff-only storage without latest lookup or mutating rows in place.
Design a secure templating engine for user notifications
Tests balancing creator flexibility with defense-in-depth security and i18n. Strong answers cover context-aware auto-escaping, a restricted AST grammar, ICU MessageFormat for pluralization, and sandboxed execution.
Design backend logic for personalized hero by industry
Tests multi-signal segmentation and graceful degradation. Strong answers list explicit profile data, IP or domain enrichment, behavioral inference, and a default fallback. Red flag: proposing heavy ML for a binary rule or skipping fallback entirely.
Get System Design bites daily.
Five a day, five minutes, offline. With quizzes so it sticks.
Open testing — you’ll join as an early tester.