Interview Q&A · questions with model answers
FAANG / Big Tech Interview Questions
Part of the study plan for: Backend Engineer
Ordered by how often they're asked. Most-asked answers are free to read in full; members see every answer and can rate their confidence on each.
-
Most asked Design a URL shortener like bit.ly.
Clarify read/write ratio, generate unique short codes (hash or base62 counter), store mappings in a DB/KV store, add caching, handle collisions, and discuss analytics and redirects.
-
Most asked Design a news feed / timeline.
Discuss fan-out on write vs read, ranking, caching hot users, denormalized feed stores, and pagination.
-
Most asked Design a rate limiter.
Cover token bucket/leaky bucket/sliding window, where to enforce (gateway/service), distributed counters (Redis), and client identification.
-
Most asked Design a chat/messaging system.
Discuss online presence, message delivery, fan-out, storage (recent vs history), push vs pull, and ordering/idempotency.
-
Design a distributed cache.
Explain cache-aside vs write-through, eviction (LRU), sharding, consistency, stampede prevention, and TTL strategies.
-
Design a key-value store.
Discuss API, persistence, replication, partitioning, consistency model, and failure recovery at a high level.
-
Design Apple's Find My network at a high level.
Crowdsourced BLE beacons from online devices report encrypted location to Apple; offline devices emit rotating public keys; owners decrypt with private keys.
-
How would you design iMessage delivery and encryption?
End-to-end encryption with device key registration, store-and-forward servers that cannot read payloads, multi-device sync, APNs wakeups, and fallback SMS.
-
Design a photo library sync service like iCloud Photos.
Client-side dedupe/hashing, chunked upload, content-addressed blobs, device sync state machines, conflict resolution, and CDN/edge for thumbnails.
-
Design a push notification system for mobile apps.
Provider APIs (APNs/FCM), token registry, fan-out workers, quiet hours, collapse keys, delivery receipts, and backoff.
-
Design a video streaming CDN architecture.
Origin storage, multi-bitrate packaging (HLS/DASH), edge caches, tokenized URLs, adaptive bitrate, and analytics.
-
Design YouTube / video streaming at a high level.
Cover upload pipeline, transcoding, CDN delivery, metadata store, recommendations boundary, and bandwidth cost trade-offs.
-
Design a ride-sharing matching system.
Model drivers/riders, geospatial indexing, matching latency, ETA, surge pricing boundaries, and failure modes.
-
How would you design autocomplete / typeahead?
Use trie or search index, cache popular prefixes, rank by frequency/personalization, and handle updates with eventual consistency.
-
Design a notification system.
Support multi-channel (push/email/SMS), preference store, fan-out workers, retries/idempotency, and quiet hours.
-
Design a search autocomplete backend for Amazon product search.
Prefix indexes, popularity ranking, personalization boundaries, latency budgets, and typo tolerance.
-
Design a distributed job queue.
Producers, brokers, workers, acknowledgements, retries/DLQ, idempotent handlers, and visibility timeouts.
-
How would you design a feature store for ML models?
Online/offline stores, point-in-time correctness, feature versioning, low-latency serving, and training/serving skew prevention.
-
Design a distributed lock service.
Lease-based locks with fencing tokens (Chubby/ZooKeeper/etcd patterns), clock skew caveats, and failure handling.
-
Design a searchable encrypted document store for consumer backups.
Client-side encryption with searchable indexes via tokens/hashes, key escrow tradeoffs, recovery flows, and threat models (curious cloud vs device theft).
-
Design an API gateway for a large microservices fleet.
AuthN/Z, rate limits, routing, retries/timeouts, observability, schema versioning, and multi-region failover.
-
Design a real-time collaborative document editor.
OT or CRDTs, presence, conflict resolution, persistence, and offline support.
-
Design a content moderation pipeline for user uploads.
Async workers, ML classifiers, human review queues, appeals, regional policy packs, and audit logs.
-
Design a metrics and alerting platform.
Ingest high-cardinality time series carefully, downsample, SLOs/error budgets, alert routing, and dashboards.
-
Design Uber-style surge pricing / marketplace matching at high level.
Real-time supply/demand signals, geospatial indexes, matching latency SLOs, fairness constraints, and abuse prevention.
-
How would you design an API for a parking garage?
Resources for spots/tickets, endpoints for enter/exit, constraints for spot types, idempotency, and error cases.