Skip to content
SparkTime, home

Tagged #case study

GuideTechnology

17 min read

Design a Web Search Engine: Crawling, Inverted Indexes and Ranking

An educational design for searching a billion web pages: a polite, distributed crawler with a URL frontier and robots.txt, deduplication, building an inverted index with batch processing, document-partitioned shards and replicas, scatter-gather query serving with result caching and tail-latency control, ranking from relevance and link signals, freshness tiers, failures and safety.

GuideTechnology

16 min read

Design an E-Commerce System: Catalog, Cart, Checkout, Inventory and Flash Sales

Design an online store from product pages to delivery: a catalogue and search served from caches and event-fed indexes, carts in a key-value store, inventory reservations with expiry, a checkout saga across inventory and payment, oversell prevention, and a flash sale that survives a thousandfold spike with a waiting room, bucketed stock and isolation from normal shopping.

GuideTechnology

17 min read

Design a Food Delivery Platform: Orders, Restaurants and Delivery Partners

Design a food delivery platform where every order coordinates three parties in real time: restaurant discovery and menus as cached read models, an idempotent checkout, an order state machine driven by a saga with timeouts and compensations, dispatching delivery partners timed to food readiness, batching, live tracking, notifications, dinner-peak load, failures and the trade-offs between them.

GuideTechnology

18 min read

Design a Ride-Hailing System: Location, Matching and Real-Time Updates

Design the core of a ride-hailing app: ingesting hundreds of thousands of driver location updates per second, a geospatial index of available drivers, matching riders to drivers with offers and timeouts, never assigning one driver twice, a trip state machine, live tracking for riders, city-based partitioning, payments, failures, privacy and fraud.

GuideTechnology

15 min read

Design a Video Streaming Platform: Upload, Transcoding and Adaptive Streaming

Design an on-demand video platform: resumable uploads straight to object storage, a parallel transcoding pipeline that splits videos into chunks and renditions, adaptive bitrate streaming with HLS-style segments and manifests, CDN delivery at terabits per second, storage tiering, view counting, failures, content safety and the metrics that matter to viewers.

GuideTechnology

19 min read

Design a Payment System: Idempotency, Ledgers and Reconciliation

Design the payment platform behind checkout and refunds, where correctness matters more than speed: payment intents and attempts, an explicit state machine, idempotency at every hop, asynchronous confirmation through verified webhooks, a double-entry ledger with a runnable example, reconciliation against provider reports, refunds, provider failover, fraud and PCI scope, and an audit trail.

GuideTechnology

16 min read

Design a Ticket Booking System Without Overselling

Design ticketing for concerts and matches where thousands of people want the same seats at the same moment: seat inventory modelling, holds with expiry, atomic all-or-nothing seat claims, idempotent payment and confirmation, what happens when payment succeeds after a hold expires, virtual waiting rooms for big on-sales, hot inventory, bots, failures and the invariant that a seat is never sold twice.

GuideTechnology

17 min read

Design a Distributed Job Scheduler

Design a service that runs millions of one-time and recurring jobs at the right time, at least once, across many machines: time-bucketed storage, dispatchers that own partitions through leases, atomic claims that prevent double dispatch, queues and workers with heartbeats, retries and dead letters, misfire policies after outages, top-of-the-hour spikes, time zones, and safe HTTP callbacks.

GuideTechnology

14 min read

Design Search Autocomplete (Typeahead)

Design the suggestions that appear as users type in a search box: requirements and estimates per keystroke, why querying the database per keystroke fails, an offline pipeline that turns search logs into prefix-to-top-K tables or tries, in-memory serving, client debouncing and CDN caching, trending updates, sharding and replication, privacy filtering and failures.

GuideTechnology

16 min read

Design a News Feed: Fan-Out, Ranking and the Celebrity Problem

Design a home feed that shows posts from accounts a user follows: estimates for posting, reading and fan-out, fan-out on read versus fan-out on write, the hybrid model that handles celebrity accounts, precomputed feed storage, hydration, ranking with a chronological fallback, cursor pagination, deletions and privacy, and what changes at social-media scale.

GuideTechnology

18 min read

Design a Chat System Like a Messaging App

Design one-to-one and group chat for tens of millions of concurrent users: WebSocket connection gateways, a session registry for routing messages to the right server, per-conversation sequence numbers for ordering, acknowledgements and deduplication, offline delivery with push and sync, multi-device cursors, presence, partitioned message storage, failures and security.

GuideTechnology

17 min read

Design a Notification System: Email, SMS and Push at Scale

Design a notification platform that other services use to reach users by push, SMS, email and in-app inbox: requirements and estimates, a 202-accepted API with idempotency keys, preferences and templates, priority queues per channel, provider rate limits and failover, retries and dead-letter queues, deduplication, delivery tracking, campaign fan-out, failures, security and observability.

GuideTechnology

15 min read

Design a Distributed Cache

Design an in-memory cache service shared by many applications: requirements and estimates, the get/set/delete API, a single-node design with TTLs and LRU eviction, then partitioning with consistent hashing or hash slots, client-side versus proxy routing, replication and failover, rebalancing, hot keys, cache stampedes, and what consistency a cache can and cannot promise.

GuideTechnology

19 min read

Design a Distributed Rate Limiter

Design a rate limiter that enforces limits across many API servers: requirements, estimates, where the limiter sits, token bucket, leaky bucket, fixed window, sliding log and sliding window counter algorithms with a runnable comparison, atomic Redis implementations, local plus global hybrids, failure behaviour (fail open or fail closed), multi-region limits and response headers.

GuideTechnology

20 min read

Design a URL Shortener (and Pastebin): A Complete Walkthrough

The classic first system design problem, worked end to end with the course's method: requirements, estimates, APIs, data model, a simple baseline, short-code generation and collisions, 301 versus 302 redirects, caching a read-heavy path, expiry, analytics off the critical path, sharding, failures, abuse prevention, and the Pastebin variant with object storage.