System Design

System Design — Page 18 of 21

Browsing page 18 of 21 — 243 articles on system design.

Designing a Multi-Region Architecture: Active-Active, Active-Passive, and Data Sovereignty Tradeoffs
System Design ·

Designing a Multi-Region Architecture: Active-Active, Active-Passive, and Data Sovereignty Tradeoffs

A senior engineer's guide to multi-region architecture covering active-passive vs active-active patterns, synchronous and asynchronous replication, conflict resolution for concurrent writes, GDPR data sovereignty, DNS-based routing, and the real operational cost of going global.

Designing an Audit Log System: Immutable Events, Efficient Querying, and Compliance at Scale
System Design ·

Designing an Audit Log System: Immutable Events, Efficient Querying, and Compliance at Scale

Audit logs are a production requirement that most teams design too late. This guide covers append-only event storage, schema design for audit events, time-range and entity queries, retention policies, tamper-evidence, and what SOC 2 and HIPAA actually require from your audit trail.

Bloom Filters, Count-Min Sketch, and HyperLogLog: Probabilistic Data Structures for Production Systems
System Design ·

Bloom Filters, Count-Min Sketch, and HyperLogLog: Probabilistic Data Structures for Production Systems

When exact answers cost too much memory or too many round trips, probabilistic data structures trade a small, tunable error rate for massive space and speed savings. This article covers how Bloom filters, Count-Min Sketch, and HyperLogLog work internally, how to implement them in TypeScript, and how to tune them for real workloads.

Designing a Leaderboard System: Sorted Sets, Skip Lists, and Real-Time Rankings at Scale
System Design ·

Designing a Leaderboard System: Sorted Sets, Skip Lists, and Real-Time Rankings at Scale

A deep-dive into leaderboard system design for senior engineers. Covers the limits of SQL ORDER BY, Redis sorted set internals and skip list mechanics, sharded leaderboards for massive scale, time-windowed rankings, and tie-breaking strategies with TypeScript examples throughout.

Designing a Workflow Engine: State Machines, DAGs, and Durable Execution for Complex Business Logic
System Design ·

Designing a Workflow Engine: State Machines, DAGs, and Durable Execution for Complex Business Logic

Most teams model multi-step business logic as ad-hoc if/else chains and cron jobs, then spend months debugging skipped steps, duplicate side effects, and invisible process state. This article covers the three main approaches to workflow orchestration: state machines, DAG-based engines, and durable execution frameworks, with TypeScript implementations and a decision framework for choosing between them.

Leader Election in Distributed Systems: Algorithms, Fencing Tokens, and Production Pitfalls
System Design ·

Leader Election in Distributed Systems: Algorithms, Fencing Tokens, and Production Pitfalls

A production guide to leader election: compare Raft-style consensus, bully algorithm, and lease-based approaches, implement lease-based election with Redis in TypeScript, understand fencing tokens, handle split-brain scenarios, and choose the right algorithm for your constraints.

How to Design a Rate Limiter: Algorithms, Distributed Coordination, and Production Pitfalls
System Design ·

How to Design a Rate Limiter: Algorithms, Distributed Coordination, and Production Pitfalls

A practical guide to rate limiter system design covering fixed window, sliding window, and token bucket algorithms with TypeScript implementations, Redis-based distributed coordination, and the production pitfalls most tutorials skip.

Building a Real-Time Collaboration Engine: CRDTs, Operational Transform, and Conflict Resolution
System Design ·

Building a Real-Time Collaboration Engine: CRDTs, Operational Transform, and Conflict Resolution

Concurrent editing in distributed systems is hard to get right. This guide compares Operational Transform and CRDTs with honest tradeoffs, walks through a TypeScript CRDT implementation, and covers the production concerns that most tutorials skip: undo/redo, offline support, tombstone garbage collection, and awareness state.

Designing a Chat System: Real-Time Messaging, Presence, and Delivery Guarantees at Scale
System Design ·

Designing a Chat System: Real-Time Messaging, Presence, and Delivery Guarantees at Scale

A full architecture walkthrough of a real-time chat system: message data model, WebSocket fan-out, logical clocks for ordering, at-least-once delivery with deduplication, presence tracking, read receipts, group chat fan-out, and offline queuing. Covers tradeoffs production systems actually face.

Designing an API Gateway: Routing, Authentication, and Rate Limiting at the Edge
System Design ·

Designing an API Gateway: Routing, Authentication, and Rate Limiting at the Edge

Most teams use an off-the-shelf gateway without understanding what it actually does, or build a custom one that collapses under real traffic. This guide covers the core responsibilities of an API gateway, architectural patterns, TypeScript implementation, and production concerns like circuit breaking and graceful degradation.

Event Sourcing in Practice: Building an Append-Only Event Store with Projections and Snapshots
System Design ·

Event Sourcing in Practice: Building an Append-Only Event Store with Projections and Snapshots

A deep technical guide to event sourcing: why CRUD loses business history, how to build an append-only event store in TypeScript with Postgres, projections for read models, snapshots for performance, and the real production tradeoffs around schema evolution, eventual consistency, and debugging.

How to Design a Rate Limiter: From Interview Answer to Production Code
System Design ·

How to Design a Rate Limiter: From Interview Answer to Production Code

Most system design interviews stop at the algorithm. This guide goes further, covering token bucket, sliding window, and fixed window with TypeScript code, distributed rate limiting in Redis, race conditions, burst handling, and multi-tenant SaaS design.