// CONCEPTS
Core concepts every engineer should understand — from distributed systems fundamentals to architecture patterns.
A clear, practical explanation of the CAP theorem — what it really means, how it applies to real distributed systems, common misconceptions, and how to discuss it in system design interviews.
A practical guide to Retrieval-Augmented Generation — how RAG works, when to use it over fine-tuning, implementation patterns, and production pitfalls to avoid.
Learn how vector embeddings work, why they power modern AI search and RAG systems, how to choose embedding models, and common pitfalls in production.
Master prompt engineering techniques — from zero-shot to chain-of-thought prompting, with practical patterns, anti-patterns, and interview preparation tips.
Compare fine-tuning and RAG for LLM customization — when each approach wins, cost analysis, implementation complexity, and decision frameworks.
Understand multi-agent AI systems — architectures, orchestration patterns, inter-agent communication, and when agents outperform single-prompt approaches.
Understand the Model Context Protocol (MCP) — how it standardizes LLM-tool interaction, server architecture, and why it matters for AI engineering.
Learn LLM serving infrastructure — batching strategies, KV cache optimization, quantization, and choosing between self-hosted and API-based deployments.
Master token budgeting for LLM applications — context window management, cost optimization strategies, prompt compression, and production best practices.
Understand semantic search — how it uses embeddings to find meaning-based matches, implementation with vector databases, and when it beats keyword search.
Understand the transformer architecture — self-attention, positional encoding, encoder-decoder structure, and why transformers revolutionized NLP and beyond.
Deep dive into the attention mechanism — scaled dot-product attention, multi-head attention, self-attention vs cross-attention, and key optimizations.
Compare embedding models for search, RAG, and classification — model selection criteria, benchmarks, fine-tuning strategies, and production deployment tips.
Learn RAG chunking strategies — fixed-size, semantic, recursive, and parent-document chunking with practical guidelines for chunk size and overlap.
Understand LLM hallucination — why models fabricate facts, detection techniques, mitigation strategies with RAG and guardrails, and evaluation methods.
Learn how to implement AI guardrails — input validation, output filtering, content moderation, jailbreak prevention, and production safety patterns.
How read replicas work — replication lag, consistency trade-offs, routing strategies, and when to use replicas vs caching or sharding for read scaling.
How database connection pooling works — why connections are expensive, pool sizing, PgBouncer vs application-level pools, and common misconfigurations.
How materialized views work — when to use them over regular views, refresh strategies, and real-world use cases for dashboards, reporting, and APIs.
How Change Data Capture (CDC) works — Debezium, WAL-based capture, event-driven architectures, and keeping derived data stores in sync with your database.
How WAL (Write-Ahead Logging) works — why databases write logs before data, crash recovery, checkpointing, and performance implications for durability.
How MVCC lets databases handle concurrent reads and writes without locking — version chains, snapshot isolation, vacuum, and performance implications.
How database transactions work — BEGIN, COMMIT, ROLLBACK, savepoints, isolation levels, and common pitfalls with practical PostgreSQL and MySQL examples.
When to use optimistic vs pessimistic locking — version-based conflict detection vs exclusive locks, with real-world examples and implementation patterns.
Comparing Snowflake IDs and UUIDs for distributed systems — sortability, collision probability, database indexing impact, and choosing the right ID strategy.
How to model time-series data effectively — partitioning by time, downsampling, retention policies, and choosing between TimescaleDB, InfluxDB, and Cassandra.
How DNS resolution works step by step — recursive resolvers, authoritative servers, caching, TTL, and why DNS failures take down the internet.
How the TCP three-way handshake works — SYN, SYN-ACK, ACK sequence, why it exists, connection states, and how it affects application latency.
How the TLS handshake establishes encrypted connections — certificate verification, key exchange, TLS 1.2 vs 1.3, and performance implications for HTTPS.
How HTTP/2 multiplexing solves head-of-line blocking — streams, frames, server push, and why HTTP/2 is faster than HTTP/1.1 for modern web applications.
How WebSockets work — the upgrade handshake, frame format, when to use WebSockets vs SSE or polling, and scaling WebSocket connections in production.
How Server-Sent Events (SSE) work — EventSource API, automatic reconnection, and when to choose SSE over WebSockets for real-time server-to-client updates.
How long polling works — holding HTTP connections open for server-push updates, timeout handling, and when long polling beats WebSockets or SSE.
How CDNs and edge computing work — caching layers, cache invalidation, edge functions, and designing systems that leverage geographic distribution.
How CORS works — preflight requests, Access-Control headers, why browsers block cross-origin requests, and how to configure CORS correctly for your API.
The complete journey from typing a URL to seeing a web page — DNS, TCP, TLS, HTTP, rendering, and every step in between explained for system design interviews.
Understanding tail latency — why p99 and p999 percentiles matter, what causes latency spikes, and how to measure and reduce tail latency in production systems.
How to do back-of-envelope calculations in system design interviews — latency numbers, storage estimates, throughput math, and the key numbers every engineer should know.
The difference between SLOs, SLIs, and SLAs — how to define reliability targets, measure them with error budgets, and use them in system design interviews.
How chaos engineering works — injecting failures in production to discover weaknesses, the principles behind Netflix's Chaos Monkey, and building resilient systems.
How blue-green and canary deployment strategies work — traffic shifting, rollback speed, infrastructure costs, and choosing the right strategy for your system.
Learn how consistent hashing distributes data across nodes with minimal disruption when nodes join or leave, with real examples from DynamoDB and Cassandra.
Understand the Raft consensus algorithm — leader election, log replication, and safety guarantees, with implementation details and interview tips.
Demystify the Paxos consensus protocol — proposers, acceptors, and learners, with practical examples from Google Chubby and real interview scenarios.
Understand vector clocks — how they capture causal ordering of events across distributed nodes, detect conflicts, and compare to Lamport timestamps.
Learn how gossip protocols propagate information across distributed clusters with epidemic-style communication, used by Cassandra, Consul, and SWIM.
Master the circuit breaker pattern for distributed systems — states, transitions, implementation with real examples from Netflix Hystrix and Resilience4j.
Learn the saga pattern for distributed transactions — choreography vs orchestration, compensating actions, and real examples from e-commerce systems.
Understand CQRS (Command Query Responsibility Segregation) — why separating read and write models enables scalability, with practical implementation.
Learn event sourcing — storing every state change as an immutable event, with real examples from banking, e-commerce, and event-driven architectures.
Understand the Two-Phase Commit (2PC) protocol — how it coordinates atomic transactions across distributed nodes, its blocking problem, and alternatives.
Learn eventual consistency — what it guarantees, how it differs from strong consistency, real-world examples from DNS and DynamoDB, and interview strategies.
Master database sharding — partitioning strategies, shard key selection, rebalancing challenges, and real examples from Instagram, Discord, and Vitess.
How database replication works in distributed systems — synchronous vs asynchronous, leader-follower vs multi-leader, replication lag, and production trade-offs.
How load balancing works — algorithms, health checks, Layer 4 vs Layer 7, sticky sessions, and how Netflix and Google distribute billions of requests.
How leader election works — Raft, Bully, and ZAB algorithms, why distributed systems need leaders, failure detection, and split-brain prevention.
How quorum works in distributed systems — read/write quorums, the W+R>N formula, sloppy quorums, and how Cassandra and DynamoDB use them.
How heartbeat mechanisms work — failure detection, timeout tuning, phi accrual detectors, gossip protocols, and how Kafka and Kubernetes use heartbeats.
How Bloom filters work — hash functions, false positives, sizing formulas, and how Google, Cassandra, and CDNs use them to avoid expensive lookups.
How Merkle trees work — hash trees for efficient data verification, anti-entropy repair, and how Git, Bitcoin, Cassandra, and IPFS use them.
How to achieve consistent reads in distributed databases — read-after-write consistency, monotonic reads, strategies for handling replication lag.
How partition tolerance works — why network partitions are inevitable, CAP theorem implications, partition handling strategies, and real-world examples.
How split-brain occurs in distributed systems — causes, consequences, fencing tokens, STONITH, quorum-based prevention, and real-world outage examples.
How write-ahead logging works — crash recovery, log structure, checkpointing, and how PostgreSQL, SQLite, Kafka, and etcd use WAL for durability.
How idempotency works — idempotency keys, at-least-once delivery, exactly-once semantics, and how Stripe, AWS, and Kafka handle duplicate requests.
Learn how microservices architecture works, when to use it, deployment patterns, real-world trade-offs, and how to discuss it in system design interviews.
A practical comparison of monolithic and microservices architectures — when each wins, migration strategies, and how to reason about it in interviews.
Understand how service meshes handle traffic management, security, and observability between microservices, with real-world examples and trade-offs.
Learn how API gateways route, secure, and manage traffic from external clients to microservices, with implementation patterns and interview tips.
Learn how event-driven architecture decouples services through asynchronous events, with patterns like event sourcing, CQRS, and real-world trade-offs.
Understand hexagonal architecture (ports and adapters) — how it isolates business logic from infrastructure, with practical code examples and trade-offs.
Learn domain-driven design (DDD) fundamentals — bounded contexts, aggregates, ubiquitous language, and how DDD shapes microservices boundaries.
Learn the strangler fig pattern for incrementally replacing legacy systems — migration strategies, routing techniques, and avoiding big-bang rewrites.
Understand the sidecar pattern for attaching cross-cutting functionality to services — logging, networking, security — without modifying application code.
Learn the BFF pattern for building client-specific backends — why one API does not fit all, implementation strategies, and system design interview tips.
How Clean Architecture works — dependency inversion, layers, use cases, and why your business logic should never depend on frameworks or databases.
How serverless architecture works — cold starts, event-driven execution, cost models, and when serverless saves money vs when it becomes expensive.
How pub/sub works — topics, subscriptions, message ordering, at-least-once delivery, and real-world patterns with Kafka, SNS, and Google Pub/Sub.
How the observer pattern works — subjects, observers, event-driven updates, and why it underpins reactive UIs, event buses, and pub/sub systems.
How SOLID principles work — Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, and Dependency Inversion with real examples.
The Twelve-Factor App methodology — codebase, dependencies, config, backing services, build/release/run, and why modern cloud apps follow these rules.
How the bulkhead pattern works — thread pool isolation, connection limits, service partitioning, and why one slow dependency should never crash everything.
How retry with exponential backoff works — jitter, max retries, idempotency requirements, and why naive retries cause thundering herd failures.
How the transactional outbox pattern works — dual-write problem, outbox table, CDC-based publishing, and guaranteed event delivery in microservices.
How the Anti-Corruption Layer pattern works — translating between bounded contexts, isolating legacy systems, and keeping your domain model clean.
Understand ACID properties in databases — Atomicity, Consistency, Isolation, Durability — with real-world examples, isolation levels, and interview tips.
Learn BASE properties for distributed databases — how they differ from ACID, why NoSQL systems adopt them, and when eventual consistency is the right choice.
Understand database indexing internals — B-Tree, LSM Tree, and Hash indexes — with performance characteristics, SQL examples, and interview guidance.
Learn when to normalize or denormalize your database — with normal forms, real-world examples, SQL patterns, and practical decision frameworks.
Master database partitioning strategies — range, hash, list, and composite — with practical examples, partition pruning, and system design applications.