System Design: Event Sourcing and CQRS — Append-Only Events, Projections, and Read Models
6 min read What is Event Sourcing? In traditional systems, the database stores the current state: the orders table has one row per […] Read article
Learn to design scalable, reliable systems that handle millions of users. System design interviews test your ability to architect real-world applications, considering tradeoffs, scalability, and best practices.
Core Topics:
Scalability: Load balancing, horizontal vs vertical scaling
Storage: Databases (SQL vs NoSQL), caching (Redis, Memcached)
Reliability: Replication, failover, disaster recovery
Performance: CDNs, caching strategies, database indexing
Common Design Questions:
Design URL shortener (bit.ly)
Design rate limiter
Design Twitter/Instagram feed
Design messaging system (WhatsApp)
Design file storage (Dropbox)
Interview Level: Senior engineers (L5+) at FAANG companies. Requires 3-5+ years experience to tackle effectively.
Preparation: Study system design patterns, understand distributed systems fundamentals, and practice mock interviews.
6 min read What is Event Sourcing? In traditional systems, the database stores the current state: the orders table has one row per […] Read article
6 min read What is Multi-Tenancy A multi-tenant SaaS serves multiple customers (tenants) from the same shared infrastructure. Each tenant’s data must be Read article
7 min read Core Entities Plan: plan_id, name, billing_cycle (MONTHLY, ANNUAL, WEEKLY), price_cents, currency, trial_days, features (JSON). Subscription: subscription_id, customer_id, plan_id, status (TRIALING, Read article
7 min read Problem Scope Given a prefix typed by the user, return the top-K (typically 5-10) suggestions ranked by relevance. Used in Read article
7 min read Core Entities Flight: flight_id, airline, flight_number, origin_airport, destination_airport, departure_time, arrival_time, aircraft_type, status (SCHEDULED, BOARDING, DEPARTED, ARRIVED, CANCELLED, DELAYED). Seat: seat_id, Read article
6 min read The Three Pillars of Observability Observability lets engineers understand the internal state of a system from its external outputs. Three Read article
7 min read Core Entities JobDefinition: job_id, name, type (CRON, INTERVAL, ONE_TIME), schedule (cron expression or interval_seconds), handler (class name or function reference), Read article
6 min read Core Requirements 1:1 messaging and group chats. Real-time delivery (< 100ms latency). Message persistence: users can scroll back through history. Read article
7 min read Core Entities Property: property_id, address, city, state, zip, lat, lng, type (APARTMENT, HOUSE, CONDO, TOWNHOUSE), status (FOR_SALE, FOR_RENT, SOLD, OFF_MARKET), Read article
6 min read The Problem with Distributed Transactions In a monolith, a database transaction is atomic: either all changes commit or all roll Read article
6 min read Core Entities Vehicle: vehicle_id, license_plate, type (SEDAN, VAN, TRUCK), capacity_kg, fuel_type, status (AVAILABLE, ON_TRIP, MAINTENANCE, OFFLINE), current_location (lat, lng), odometer_km, Read article
6 min read Core Entities Metric: metric_id, name, type (COUNTER, GAUGE, HISTOGRAM), unit, description, owner_id, created_at. DataPoint: metric_id, timestamp, value (DOUBLE), tags (key-value Read article
6 min read Core Entities Survey: survey_id, owner_id, title, description, status (DRAFT, ACTIVE, CLOSED), settings (allow_multiple_responses, anonymous, show_progress_bar), created_at, closes_at. Question: question_id, survey_id, Read article
6 min read Core Entities ContentType: type_id, name (Article, Page, Product), fields_schema (JSON schema defining the fields). Content: content_id, type_id, slug, status (DRAFT, Read article
7 min read Core Entities User: user_id, username, display_name, bio, avatar_url, follower_count, following_count, created_at. Post: post_id, author_id, content, media_urls[], like_count, comment_count, share_count, visibility Read article