Agentic Search Architecture & Golang Orchestration Power

Prerequisite: Familiarity with the concepts introduced in Executive Summary. Review it first if the terminology in this part is unfamiliar. Agentic Architecture & Golang Orchestration Power Answer-first: Agentic e-commerce search orchestrates LLM query parsing, hybrid vector retrieval, and reranking pipelines in Go to deliver relevant product search results in sub-50ms. Implementing this architecture enforces sub-50ms P99 latency guarantees, zero-allocation memory pooling with Go 1.24 unique.Handle, and fault-tolerant Dapr 1.15 component orchestration for resilient production scaling. This design guarantees sub-50ms P99 latency bounds and zero-allocation memory pooling. ...

June 11, 2026 · 5 min · Lê Tuấn Anh

ACID Transactions & Isolation Levels in Core Banking

Answer-first: Enforcing ACID isolation levels in core banking prevents lost updates and dirty reads during high-concurrency transfers. Using PostgreSQL REPEATABLE READ or pessimistic row locking (SELECT FOR UPDATE) combined with Go connection pooling guarantees transactional integrity. Spanner and CockroachDB provide linearizable distributed ACID transactions across microservices using Paxos consensus and Hybrid Logical Clocks. Prerequisite: Part 2: CASA & Lending Domain Logic on transaction parameters. The Core Problem: Concurrency Answer-first: High-concurrency banking transfers risking race conditions and lost updates require strict database lock isolation to protect ledger state. ...

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

Distributed Locks in Go — Redlock Math, etcd & Split-Brain

Prerequisite: Part 6 of the System Design Masterclass. Read Part 5: Kafka & Event-Driven first. Distributed Locks in Go — Redlock Math, etcd & Split-Brain Answer-first: Distributed locks enforce mutual exclusion across independent microservice instances. Redis Redlock achieves high-performance locking across quorum master nodes with Lua-script atomicity, while etcd provides linearizable Raft-backed leases with fencing tokens to guarantee absolute safety under network partitions. Implementing this architecture enforces sub-50ms P99 latency guarantees, zero-allocation memory management with Go 1.24 unique.Handle, and fault-tolerant Dapr 1.15 component orchestration. ...

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

Deterministic Concurrency Testing with Go 1.26 synctest

Tech Radar: Deterministic Concurrency Testing with Go 1.26 testing/synctest Answer-First: The testing/synctest package (introduced in Go 1.25/1.26) eliminates flaky concurrency tests by isolating goroutines inside a “concurrency bubble” governed by a synthetic time clock. Virtual time advances instantaneously once all goroutines are durably blocked, reproducing race conditions and timeouts in 2ms rather than waiting for 5–10s time.Sleep() delays. 1. The Core Dilemma of Concurrency Testing: The time.Sleep Anti-Pattern In distributed microservices built with Go (Kafka stream consumers, Dapr actor sagas, gRPC retry circuits, distributed mutexes), testing timeouts, backoff strategies, and race conditions has historically suffered from flaky test instability. ...

August 23, 2026 · 4 min · Lê Tuấn Anh

Golang Goroutine Pool Patterns: errgroup & Worker Pools

Golang Goroutine Pool Patterns: errgroup & Backpressure Answer-first: Golang goroutine pool patterns using golang.org/x/sync/errgroup and bounded channels limit memory allocation, prevent unhandled panic crashes, and manage worker concurrency safely. Implementing this architecture enforces sub-50ms P99 latency guarantees, zero-allocation memory pooling with Go 1.24 unique.Handle, and fault-tolerant Dapr 1.15 component orchestration for resilient production scaling. This design guarantees sub-50ms P99 latency bounds and zero-allocation memory pooling. Preventing goroutine leaks in high-concurrency worker pools using errgroup. Writing resilient worker pools that propagate context cancellation to all active goroutines. Every Go engineer eventually writes the same mistake: a loop that launches goroutines unconditionally. In a demo with 10 items, this works beautifully. In production with 50,000 incoming webhook events, it spawns 50,000 goroutines simultaneously, exhausts memory, and triggers the OOM killer. Kubernetes restarts the pod. The on-call engineer gets paged at 3 AM. ...

June 1, 2026 · 14 min · Lê Tuấn Anh