Distributed Systems & Data
Consistency, replication, partitioning, caching and messaging.
CAP & PACELC Theorems
During a network partition you choose consistency or availability; when there's no partition you still trade latency against consistency.
Consistency Models
From linearizable to eventual — what each guarantee means for users, and practical models like read-your-writes and monotonic reads.
Replication
Keep copies of data on multiple nodes for availability, durability and read scaling — single-leader, multi-leader and leaderless, sync vs async.
Sharding & Partitioning
Split data across nodes so storage and throughput scale horizontally — choosing shard keys, range vs hash, hot spots and rebalancing.
Caching Strategies
Cache-aside, read/write-through, write-behind; TTLs, invalidation, stampede protection and multi-layer caches (browser → CDN → app → DB).
Message Queues vs Event Streams
RabbitMQ/SQS-style queues distribute work; Kafka-style logs retain ordered events for many consumers and replay. Know which one your problem needs.
MongoDB at Enterprise Scale
Data modelling by access pattern, indexing (ESR rule), transactions, change streams and the operational gotchas of large multi-tenant collections.