Event Sourcing & CQRS: Immutable Ledger for Microservices

Executive Summary & Quick Answer: Building an immutable ledger with Event Sourcing and CQRS decouples high-throughput command processing from complex query analytics. By projecting domain event streams asynchronously into optimized read models, banking platforms serve customer balance dashboards with zero command-side database locks. Answer-first: Event sourcing and CQRS separate write-heavy transaction streams from read-heavy queries. By appending immutable events to a journal and projecting them asynchronously to specialized read databases, core banking systems achieve millisecond-level response times and complete audit trails. ...

June 18, 2026 · 13 min · Lê Tuấn Anh

Banking Microservices Architecture: Event Sourcing, CQRS & Saga Patterns in Go (2026)

Executive Summary & Quick Answer: Modernizing legacy core banking monoliths requires transitioning to event-driven microservices using Event Sourcing, CQRS, and the Saga Pattern. By emitting immutable domain events for every ledger change, banking platforms achieve decoupled scaling and sub-millisecond query responses. Prerequisite: Part 3: Transaction Isolation and ACID Guarantees on database lock behaviors. Series context (Part 4 of 8): This article assumes familiarity with ACID transactions and database concurrency. Understanding why consistency guarantees are hard at the database layer is essential context before introducing distributed patterns here. ...

May 6, 2026 · 9 min · Lê Tuấn Anh

Building High-Throughput Event-Driven Microservices in Go with NATS JetStream and CQRS

Answer-first: Building high-throughput event-driven microservices in Go using NATS JetStream and CQRS separates write mutators from read projections via a Raft-backed log. NATS JetStream provides sub-millisecond latency, native message deduplication (Nats-Msg-Id), stream retention, and durable pull consumers. Microservices achieve >100,000 ops/sec, eliminating database write contention and ensuring at-least-once delivery guarantees. Section 1: Architectural Rationale: Why Go + NATS JetStream for Event-Driven Microservices In modern cloud-native architectures, scaling distributed systems beyond tens of thousands of transactions per second (TPS) exposes severe bottlenecks in conventional request-response paradigms. Traditional microservices built around synchronous HTTP/REST or gRPC backplanes frequently encounter database write contention, connection pool exhaustion, and cascading latency spikes whenever traffic bursts hit downstream storage layers. When a single database handles both complex mutation transactions (commands) and heavy analytical join queries (reads), row-level locks and index maintenance stall throughput, inflating p99 latencies from milliseconds to seconds. ...

July 23, 2026 · 16 min · Lê Tuấn Anh