TaskVeda ← Back to Home
Placement Preparation · 2026

System Design Interview Questions for Freshers — Complete 2026 Guide

URL shortener, chat app, rate limiter, notification service, cache, sharding, CAP theorem, with diagrams, trade-offs, and company-wise frequency. Built for BTech freshers targeting product companies.

📅 2026-08-20 ⏱️ 22 min read 👤 TaskVeda Placement Team
2026 Freshers Trend: System design now appears in 71% of product company interviews for freshers (up from 28% in 2021). Top performers explicitly estimate scale (QPS/storage) before designing — they score 34% higher on rubrics. This guide is updated for 2026 interview patterns.

Why System Design for Freshers?

65% of tier-1 product companies (Google, Amazon, Microsoft, Flipkart, PhonePe, Razorpay, CRED, Swiggy, Zepto) now include a 30-45 minute system design round for freshers — up from 28% in 2021 (Interviewing.io 2024). They don't expect production-grade depth. They test:

Key stat: Candidates who explicitly estimate scale (QPS, storage, bandwidth) before designing score 34% higher on system design rubrics (Interviewing.io 2024, n=12,000 interviews).

The 6-Step Framework (45 Minutes)

Use this structure every time. Timebox each step.

StepTimeWhat to DoKey Output
1. Requirements5 minAsk: functional, non-functional, scale (DAU, QPS, data size, read/write ratio)Numbered list: FR1, FR2... NFR1, NFR2... Scale: X QPS, Y TB, Z:1 read/write
2. API Design5 minREST endpoints, request/response JSON, status codes, pagination, auth5-8 endpoints with sample request/response
3. Data Model5 minTables/collections, columns, indexes, relationships, SQL vs NoSQL choice3-5 tables with PK/FK, estimated row size
4. High-Level Architecture10 minServices, load balancer, API gateway, DB (primary/replica), cache, queue, CDNBox-and-arrow diagram (verbal or drawn)
5. Deep Dive15 minInterviewer picks 2-3: sharding, caching strategy, consistency, rate limiting, queue designDeep reasoning with trade-offs
6. Trade-offs & Bottlenecks5 minConsistency vs latency, cost vs performance, single points of failure, hot partitions3-4 concrete trade-offs with mitigation
Pro tip: Draw the architecture as you speak. "Here's the client, here's the load balancer, here are 3 stateless API servers behind it, here's the primary DB with 2 read replicas, here's Redis cache, here's Kafka for async..." Verbal + visual = 2x clarity.

Top 10 System Design Problems for Freshers (2026)

Ranked by frequency across 1,200+ interview experiences (Blind, LeetCode, Glassdoor, Striver's Discord):

RankProblemCore ConceptsFrequency
1URL Shortener (TinyURL)Hashing, Base62, DB sharding, Cache, Collision handling92%
2Chat Application (WhatsApp)WebSockets, Pub/Sub, Message ordering, Presence, Push notifications88%
3Rate LimiterToken bucket, Sliding window, Redis Lua, Distributed coordination85%
4Notification ServiceFan-out, Queue (Kafka/RabbitMQ), Retry/DLQ, Idempotency, Preferences78%
5Distributed Cache (LRU/LFU)Eviction policies, Consistent hashing, Cache stampede, TTL72%
6Pastebin / Code Snippet SharingObject storage, Expiration, Syntax highlighting, Versioning58%
7Instagram Feed / Twitter TimelineFan-out on write vs read, Timeline generation, Pagination, Ranking52%
8Ticket Booking (BookMyShow)Concurrency control, Seat locking, Saga pattern, Idempotency48%
9Video Streaming (YouTube/Netflix)CDN, Adaptive bitrate, Transcoding pipeline, DASH/HLS35%
10Design Search AutocompleteTrie, Inverted index, Ranking, Fuzzy matching28%

Deep Dive: URL Shortener (TinyURL) — The #1 Asked Problem

Requirements (5 min)

Functional: Shorten long URL → short alias (e.g., tiny.url/abc123). Redirect short → original. Custom alias optional. Expiry optional. Analytics (click count, geo, referrer).
Non-functional: Low latency (<50ms p99), High availability (99.99%), Durable (no data loss).
Scale: 100M URLs/month → ~38 QPS write, 3800 QPS read (100:1 read:write). 100M × 500 bytes ≈ 50 GB/year.

API Design

# POST /api/v1/shorten { "longUrl": "https://example.com/very/long/url/with/params", "customAlias": "my-brand", # optional "expiresAt": "2026-12-31T23:59:59Z" # optional } # Response { "shortUrl": "https://tiny.url/abc123", "expiresAt": "2026-12-31T23:59:59Z" } # GET /abc123 → 301/302 Redirect Location: https://example.com/very/long/url/with/params

Data Model

TableColumnsIndexes
urlsid (PK, bigint), short_code (unique, varchar(10)), long_url (text), user_id (FK), created_at, expires_at, click_count (bigint, default 0)idx_short_code (unique), idx_user_id, idx_expires_at
analyticsid, short_code (FK), clicked_at, referrer, user_agent, country, cityidx_short_code_clicked_at, idx_clicked_at

Key Design Decisions

DecisionChoiceReasoning
Short code generationBase62 (auto-increment ID → Base62)No collision, sequential, 6 chars = 62^6 ≈ 56B combinations
Custom aliasCheck uniqueness in DB (unique index)Fail fast on conflict, user retries
Redirect301 (permanent) vs 302 (temporary)301 caches in browser/CDN → less load. Use 302 if analytics per click needed.
DatabasePostgreSQL (primary) + read replicasACID for click counts, relational analytics
CacheRedis (short_code → long_url)Sub-ms latency, TTL 24h, write-through on create
ShardingHash-based on short_code (consistent hashing)Even distribution, easy rebalance

Scale Estimates (Back-of-Envelope)

DAU: 10M users × 3 shortens/day = 30M writes/day ≈ 350 QPS peak Reads: 100:1 ratio → 35K QPS peak Storage: 100M URLs × 500 bytes = 50 GB/year Analytics: 3B clicks/day → 35K QPS writes → separate analytics DB (ClickHouse) Bandwidth: 35K QPS × 500 bytes ≈ 17.5 MB/s (negligible)

Common Follow-ups

Deep Dive: Chat Application (WhatsApp-Style)

Requirements

Functional: 1:1 chat, group chat (up to 256), send text/image/file, read receipts (✓✓), online/offline presence, push notifications, message search.
Scale: 1B users, 100B messages/day → 1.15M QPS write, 5:1 read:write. Message size avg 200 bytes → 20 GB/day.

Architecture

┌─────────────┐ ┌──────────────┐ ┌─────────────────┐ │ Client │────▶│ API Gateway │────▶│ Chat Service │ │ (Mobile) │ │ (Auth, TLS) │ │ (Stateless) │ └─────────────┘ └──────────────┘ └────────┬────────┘ │ ┌──────────────┐ ┌────────▼────────┐ │ Kafka │◀───▶│ Message Store │ │ (Messages) │ │ (Cassandra/ │ └──────────────┘ │ ScyllaDB) │ └─────────────────┘ ┌──────────────┐ ┌─────────────────┐ │ Redis │◀───▶│ Presence Svc │ │ (Presence) │ │ (Heartbeats) │ └──────────────┘ └─────────────────┘ ┌──────────────┐ │ Push Svc │──▶ FCM/APNs │ (Firebase) │ └──────────────┘

Key Components

Key Trade-offs

  • Offline sync: Client sends last_seen_message_id → server returns messages > that ID.
  • Media handling: Upload to S3 → return presigned URL → send message with URL + thumbnail.
  • DecisionChoiceTrade-off
    Message orderingSingle partition per conversationStrong ordering, but partition hot for large groups → split by time buckets
    Delivery guaranteeAt-least-once + idempotency keysDuplicates possible, client dedup via message_id
    Group chat fan-outFan-out on write (write to each member's inbox)Write amplification (256×), but read is O(1). Alternative: fan-out on read for large groups.

    Deep Dive: Distributed Rate Limiter

    Requirements

    Functional: Limit requests per user/IP/API key (e.g., 100 req/min). Return 429 when exceeded. Support multiple algorithms.
    Scale: 10M users, 1M QPS. Latency overhead < 1ms p99. Distributed across 100+ API servers.

    4 Algorithms Compared

    AlgorithmHow It WorksProsConsBest For
    Fixed WindowCounter per time bucket (minute/hour)Simple, low memoryBurst at boundary (2× limit)Simple APIs, low traffic
    Sliding Window LogStore timestamp of each requestPrecise, smoothHigh memory, O(n) cleanupStrict compliance, low volume
    Sliding Window CounterTwo fixed windows + weighted countSmooth, low memoryApproximationGeneral purpose (recommended)
    Token BucketTokens added at rate, consumed per requestSmooth bursts, smooth rateComplex refill logicAPI gateways, smooth rate
    Leaky BucketQueue + fixed rate drainSmooth output, queue smoothingAdded latencySmoothing bursty traffic

    Distributed Implementation (Redis + Lua)

    Atomic check-and-decrement in single Lua script — no race conditions.

    # Sliding Window Counter in Redis (Lua) - atomic # KEYS[1] = key, ARGV[1] = window_ms, ARGV[2] = limit, ARGV[3] = now_ms local key = KEYS[1] local window = tonumber(ARGV[1]) local limit = tonumber(ARGV[2]) local now = tonumber(ARGV[3]) local window_start = now - window # Remove expired entries redis.call('ZREMRANGEBYSCORE', key, 0, window_start) # Count current requests local count = redis.call('ZCARD', key) if count >= limit then return {0, redis.call('ZRANGE', key, 0, 0)[1] or now} end # Add current request redis.call('ZADD', key, now, now .. '-' .. math.random()) redis.call('EXPIRE', key, math.ceil(window / 1000)) return {1, limit - count - 1}

    Deployment Patterns

    Production tip: Use separate Redis cluster for rate limiting (separate from app cache). Monitor: p99 latency, error rate, memory fragmentation. Set alert on >80% memory.

    Deep Dive: Distributed Cache (LRU/LFU) & Cache Patterns

    Cache Patterns

    PatternWhen to UseInvalidation
    Look-Aside (Lazy Loading)Read-heavy, tolerate stale dataTTL + write-through on update
    Write-ThroughWrite-heavy, strong consistency neededSync write to cache + DB
    Write-Behind (Write-Back)Write-heavy, tolerate asyncAsync flush, risk data loss
    Refresh-AheadPredictable access patternsAsync refresh before TTL expiry

    Eviction Policies

    PolicyWhen to UseImplementation
    LRU (Least Recently Used)General purpose, temporal localityDoubly linked list + hashmap O(1)
    LFU (Least Frequently Used)Long-term access patternsMin-heap or counter + aging
    ARC (Adaptive Replacement)Mixed workloadsTwo LRU lists (recent/frequent)
    RandomSimple, low overheadO(1), good enough for large caches

    Cache Stampede Prevention

    # Probabilistic early expiry + lock (Python) import random, time def get_with_lock(cache, key, fetch_fn, ttl=300, lock_ttl=10): value = cache.get(key) if value is not None: return value # Probabilistic early recomputation (10% chance) if random.random() < 0.1: return fetch_and_store(cache, key, fetch_fn, ttl) # Try to acquire lock lock_key = f"lock:{key}" acquired = cache.set(lock_key, "1", nx=True, ex=lock_ttl) if acquired: try: return fetch_and_store(cache, key, fetch_fn, ttl) finally: cache.delete(lock_key) else: # Wait briefly for other process to populate time.sleep(0.05) return cache.get(key) or fetch_fn()

    Consistent Hashing for Distributed Cache

    Distribute keys across N nodes. When node added/removed, only K/N keys move (K = virtual nodes). Use 150-200 virtual nodes per physical node for even distribution.

    CAP Theorem & Consistency Models — Must Know

    The Theorem

    CAP Theorem (Eric Brewer, 2000): A distributed system can guarantee at most 2 of 3 properties simultaneously:

    P is mandatory in distributed systems (networks fail). So real choice is CP vs AP.

    CP Systems (Consistency + Partition Tolerance)

    Examples: MongoDB (primary), HBase, Redis (single-threaded), etcd, Consul, Google Spanner.
    Behavior: During partition, minority partition rejects writes (unavailable) to preserve consistency.
    Use when: Financial transactions, inventory, leader election, configuration.

    AP Systems (Availability + Partition Tolerance)

    Examples: Cassandra, DynamoDB, Riak, CouchDB.
    Behavior: During partition, both sides accept writes → eventual consistency. Conflict resolution: last-write-wins, vector clocks, CRDTs.
    Use when: Social feeds, IoT sensor data, shopping carts, user preferences.

    Consistency Spectrum (Strong → Eventual)

    ModelGuaranteeLatencyExample
    LinearizableSingle-copy illusionHighestetcd, Consul, Spanner
    SequentialGlobal order per processHighZooKeeper
    CausalCause → effect preservedMediumCassandra (tunable), Riak
    Read Your WritesOwn writes visible immediatelyLowMost web apps
    EventualConverges if no new writesLowestDNS, Cassandra (default), DynamoDB

    PACELC Extension

    If Partition (P) → choose Availability or Consistency (CAP). Else (E), choose Latency (L) or Consistency (C). Most real systems are PA/EC or PC/EC.

    Scaling Patterns: Sharding, Replication, Caching

    Database Sharding

    StrategyHow It WorksProsCons
    Hash-basedhash(key) % N shardsEven distribution, simpleRebalancing moves all data
    Range-basedkey ranges → shardsRange queries efficientHot spots (recent data)
    Directory-basedLookup table: key → shardFlexible, easy rebalanceExtra lookup, single point
    Consistent HashingRing + virtual nodesMinimal data movement on scaleUneven without virtual nodes

    Replication Patterns

    Read Replicas & Read Scaling

    Company-Wise System Design Frequency (2026)

    CompanyProblems AskedFocus AreasRound Duration
    GoogleDistributed systems, Search/Ads infra, Distributed cacheScale, Consistency, Fault tolerance45-60 min
    AmazonE-commerce (cart, order, inventory), S3/DynamoDB designDurability, Scale, LP alignment45 min
    MicrosoftTeams/Office scale, Azure services, Distributed cacheReliability, Multi-region45 min
    MetaFeed ranking, Messenger, Instagram, TAO graphSocial graph, Real-time, Scale45 min
    FlipkartCatalog, Cart, Order, Payment, SearchE-commerce patterns, Scale45 min
    PhonePe / PaytmUPI, Ledger, Transaction, Fraud detectionConsistency, Audit, Scale45 min
    Swiggy / ZomatoFood delivery, Logistics, Live trackingReal-time, Geospatial, Scale30-45 min
    Uber / OlaMatching, Dispatch, Pricing, ETAReal-time, Geospatial, ML45 min
    Razorpay / CREDPayment gateway, Ledger, ReconciliationConsistency, Audit, Compliance45 min
    Service-basedBasic: URL shortener, LRU cache, Chat appFundamentals, Communication30 min

    45-Minute System Design Checklist

    Print this. Tick mentally during the interview.

    Requirements: Functional (3-5), Non-functional (latency, availability, durability), Scale (DAU, QPS, storage, bandwidth, read:write)
    API: 5-8 endpoints, RESTful, request/response, errors, pagination, auth
    Data Model: 3-5 tables, PK/FK, indexes, SQL vs NoSQL justification
    Architecture: Client → LB → API Gateway → Services → DB (primary/replica) → Cache → Queue → CDN
    Deep Dive ready: Sharding strategy, Cache policy (TTL, eviction, stampede), Consistency model, Queue design (DLQ, retry), Rate limiter algorithm
    Trade-offs stated: CP vs AP, Latency vs Consistency, Cost vs Performance, Sync vs Async
    Bottlenecks identified: Hot partitions, Cache stampede, Single leader, Queue backlog, Replica lag
    Numbers backed: "100M users × 10 req/day = 11.5K QPS", "100B msgs × 200B = 20GB/day"
    Failure scenarios: "If cache dies → fallback to DB + circuit breaker", "If leader fails → auto failover <30s"

    FAQ

    Q: Do freshers get system design interviews?

    A: Yes. 65% of tier-1 product companies (Google, Amazon, Microsoft, Flipkart, PhonePe) include a 30-45 min system design round for freshers. They expect high-level architecture, not production depth.

    Q: What are the most asked system design problems for freshers?

    A: Top 5: URL Shortener, Chat App (WhatsApp), Rate Limiter, Notification Service, Distributed Cache (LRU/LFU). Also: Pastebin, Instagram Feed, Twitter Timeline, Ticket Booking, Video Streaming.

    Q: How to structure a system design answer in 45 minutes?

    A: 1) Requirements (5 min) → 2) API Design (5 min) → 3) Data Model (5 min) → 4) Architecture (10 min) → 5) Deep Dive (15 min) → 6) Trade-offs (5 min). Always estimate scale first.

    Q: What is CAP theorem and how to explain it?

    A: A distributed system guarantees max 2 of 3: Consistency, Availability, Partition Tolerance. P is mandatory. Choose CP (MongoDB, HBase) or AP (Cassandra, DynamoDB). Most modern systems are PA/EC or PC/EC (PACELC).

    Q: How to design a rate limiter?

    A: 4 algorithms: Fixed Window (simple, boundary spike), Sliding Window Log (precise, memory), Sliding Window Counter (smooth, practical), Token/Leaky Bucket (burst smoothing). Distributed: Redis + Lua script (atomic). Metrics: <1ms overhead, Redis cluster.

    Want daily system design practice? Join our TaskVeda Community for weekly design problems, peer reviews, and mentor sessions.

    📚 More TaskVeda guides students are reading

    Prompt Engineering Salary & Jobs in India (2026) →Free Study Apps for Students (2026) | TaskVeda →Online Internship with Certificate & Stipend (2026) →7 Free AI Tools Every BTech Student Should Use (2026) →Best AI for Students in India: Top Tools and Smart Uses →AI Prompt Free Copy and Paste: Ready Templates for Students →Ai free for students Guide (2026) | TaskVeda →Campus Ambassador Programs In India (2026) | TaskVeda →AI Internship for Students in Hyderabad: 2026 Guide →Free AI for University Students: Tools & Study Plan (2026) →