Skip to content
SparkTime, home

Tagged #scalability

GuideTechnology

14 min read

Event-Driven Architecture, CQRS and Event Sourcing

When services communicate by publishing facts instead of calling each other: commands versus events, event notification versus event-carried state transfer, designing and versioning events, ordering, replay, and the two patterns often paired with events: CQRS read models and event sourcing, with honest guidance on when each is worth its complexity.

GuideTechnology

14 min read

Monolith vs Modular Monolith vs Microservices: How to Choose

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.

GuideTechnology

14 min read

Observability: Logs, Metrics, Traces, SLOs and Alerts

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.

GuideTechnology

14 min read

High Availability and Disaster Recovery: Redundancy, Failover, RPO, RTO and Multi-Region

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.

GuideTechnology

16 min read

Distributed Locks, Leases, Leader Election and Consensus

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.

GuideTechnology

16 min read

Distributed Transactions: Two-Phase Commit, the Outbox Pattern and Sagas

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.

GuideTechnology

17 min read

Idempotency, Retries and Message Delivery Guarantees

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.

GuideTechnology

15 min read

CAP Theorem and Consistency Models Explained Without the Myths

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.

GuideTechnology

14 min read

Why Distributed Systems Are Hard: Partial Failure, Timeouts and Clocks

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.

GuideTechnology

15 min read

SQL vs NoSQL: Data Models and How to Choose the Right Database

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.

GuideTechnology

17 min read

Database Sharding and Partitioning: How It Works and When You Need It

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.

GuideTechnology

15 min read

Database Replication: Primary-Replica, Read Replicas, Lag and Failover

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.

GuideTechnology

16 min read

Transactions, Isolation Levels and Concurrency Control: Preventing Race Conditions

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.

GuideTechnology

15 min read

Database Indexes and Query Performance: How to Make Reads Fast

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.

GuideTechnology

17 min read

Relational Databases and Data Modeling for System Design

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.

GuideTechnology

18 min read

Message Queues, Pub/Sub and Event Streams: How Asynchronous Systems Work

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.

GuideTechnology

17 min read

CDNs and Object Storage: Serving Files, Images and Video at Scale

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.