Technology
14 min read
An honest comparison of monoliths, modular monoliths and microservices: what each gives and costs, why a modular monolith is often the best start, how to draw service boundaries and own data, synchronous versus asynchronous communication, API gateways, service discovery, service meshes, the distributed-monolith trap, and migrating with the strangler fig pattern.
Technology
14 min read
If you cannot observe a system, you cannot operate it. Learn the three signals (structured logs, metrics and distributed traces), the golden signals and RED and USE methods, percentiles and histograms, trace context propagation and OpenTelemetry, SLIs, SLOs and error-budget alerts, health checks and synthetic monitoring, and how to observe asynchronous systems without drowning in data.
Technology
14 min read
How systems survive failures of servers, availability zones and whole regions, and recover from data disasters. Covers failure domains, redundancy and failover, availability arithmetic with correlated failures, RPO and RTO, the four disaster-recovery strategies from backup-and-restore to active-active, multi-region write strategies, backups that actually restore, and safe deployments.
Technology
16 min read
How one slow dependency takes down a whole system, and the techniques that stop it: timeouts and deadlines, retry budgets, circuit breakers, bulkheads, rate limiting, load shedding, backpressure and graceful degradation, with a runnable circuit breaker and a degradation plan for a real page.
Technology
16 min read
When only one node may do something at a time: when you actually need a distributed lock and when you do not, locks for efficiency versus correctness, leases and why they need fencing tokens, Redis and database locks and their limits, leader election, and consensus (Raft, majorities, ZooKeeper and etcd) explained at interview depth.
Technology
16 min read
How to keep data consistent when one business action spans a database and a message broker, or several services. Covers the dual-write problem, the transactional outbox and change data capture, two-phase commit and why it blocks, and sagas with compensating transactions, choreography versus orchestration, pivot steps and isolation anomalies, with a runnable saga.
Technology
17 min read
Retries are necessary in distributed systems, and they create duplicates. Learn what idempotency means, where duplicates come from, how to build idempotency keys correctly, unique constraints and idempotent consumers, which errors to retry, exponential backoff with jitter, retry amplification, and what at-most-once, at-least-once and effectively-once delivery really promise.
Technology
15 min read
What "consistent" means when data is replicated, from linearizability through causal and session guarantees to eventual consistency; what the CAP theorem actually says and why "pick two" misleads; PACELC and the everyday latency trade-off; quorum reads and writes; resolving conflicts; and choosing consistency per feature instead of per system.
Technology
14 min read
What changes when work is spread over many machines: partial failure, messages that are lost, delayed, duplicated or reordered, timeouts with unknown outcomes, process pauses, and clocks that disagree. Learn why a timeout does not tell you what happened, why wall clocks cannot order events, how logical clocks help, and the design habits that follow.
Technology
15 min read
A trade-off-driven guide to choosing databases: relational, key-value, document, wide-column, graph, search, time-series and analytical stores, what each is good and bad at, query-first modelling for NoSQL, the myths ("NoSQL scales, SQL doesn't"), polyglot persistence, and a decision process you can use in interviews.
Technology
17 min read
When one database can no longer hold the data or absorb the writes, you split it. Learn vertical and horizontal partitioning, how to choose a partition key, range, hash, consistent-hashing and directory-based sharding, rebalancing with logical shards, hot partitions, cross-shard queries and secondary indexes, and why you should shard as late as possible.
Technology
15 min read
Why databases keep copies on several machines, and what those copies cost. Covers primary-replica replication, synchronous versus asynchronous replication, read replicas for scaling, replication lag and the read anomalies it causes, read-your-writes routing, failover and split brain, multi-leader and leaderless replication, and why replication is not a backup.
Technology
16 min read
What goes wrong when many requests touch the same rows at once: lost updates, double booking, write skew, dirty and non-repeatable reads. Learn isolation levels, MVCC, atomic conditional updates, row locks, optimistic concurrency with versions, constraints, deadlocks and hot rows, with a runnable simulation and worked examples.
Technology
15 min read
Why a query over millions of rows can take seconds or milliseconds depending on one index. Learn how B-tree indexes work, why they stay shallow, composite index column order, covering and partial indexes, selectivity, reading a query plan at a high level, why indexes are sometimes ignored, and what every index costs on writes.
Technology
17 min read
How to model data for a system design: tables, primary and foreign keys, constraints, one-to-many and many-to-many relationships, normalisation and deliberate denormalisation, ACID transactions, choosing id formats, and designing the model around access patterns. Also covers connection pooling, the N+1 problem and safe schema changes.
Technology
18 min read
Why queues exist and how they work: producers, consumers and brokers, acknowledgements and redelivery, visibility timeouts, retries, dead-letter queues, ordering, and delivery guarantees. Compares work queues, pub/sub and event streams such as Kafka, and shows how to design background workers that are safe to run twice.
Technology
17 min read
How large files are stored and delivered: object storage concepts (buckets, keys, durability, consistency, lifecycle), direct uploads with presigned URLs and multipart upload, and CDNs (edge caching, cache keys, TTLs, invalidation versus versioned URLs, static versus dynamic content, private content). Includes a compact file-storage-and-sharing design.
Technology
20 min read
Caching as a design decision: where caches live, hit ratios, cache-aside, read-through, write-through and write-back, TTLs and invalidation, LRU and other eviction policies, cache stampedes, hot keys, negative caching and distributed caches such as Redis, with the trade-off between faster reads, stale data and invalidation complexity.