Part 3: Golang + Kratos v2 — Microservice Framework Internals

For engineers coming from Magento PHP, the shift to Go microservices isn’t just a language change — it’s a fundamentally different way of organizing code. Magento has controllers, models, blocks, helpers, and plugins. Go with Kratos v2 has exactly five layers, each with a precisely defined responsibility. Answer-first: A production Go microservice on this platform follows the Kratos v2 directory convention (api/ → cmd/ → internal/biz/ → internal/data/ → internal/server/), uses Google Wire for compile-time dependency injection, exposes both HTTP and gRPC simultaneously on different ports (8xxx/9xxx), and imports a shared common library at v1.9.5 that provides outbox, caching, worker, metrics, and logging — standardized across all 21 services. ...

April 22, 2026 · 11 min · Lê Tuấn Anh

Part 10: ADR Walkthrough — 24 Architecture Decisions Explained

21 services. 24 decisions. 3.5 months of deliberation captured in Architecture Decision Records. An ADR (Architecture Decision Record) is a short document that answers the question: “Why did we choose X when Y and Z were also options?” Without ADRs, architectural knowledge lives in engineers’ heads. When they leave, the knowledge leaves too — and the next team rewrites the same component in the way that was already tried and rejected. ...

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

Part 4: Golang API & Microservices Integration (Kratos & Dapr)

Building a simple API that calls Graphhopper via http.Get is easy. Building a Principal-level API Gateway that survives 10,000 concurrent riders requesting routes without crashing is a masterclass in Distributed Systems. Answer-first: Graphhopper is a heavily CPU-bound downstream service. If your Golang API blindly accepts traffic and forwards it, a slight slowdown in Graphhopper will cause your Goroutines to pile up, exhausting your server’s RAM and triggering a cascading failure. You must implement a “Defense in Depth” strategy using Concurrency Bounding, Circuit Breakers, and Asynchronous Pub/Sub. ...

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

Tech Radar, April 14, 2026: Safer Code Evolution, Runtime Recovery, and Framework Hardening

The selected items for pipeline run 6 form a coherent picture of where mature platform engineering is heading. After fetching and reading the full source content directly from the original URLs, the common theme is clear: strong systems are not defined only by what they can do, but by how safely they evolve, how predictably they recover, and how much accidental complexity they remove from the teams building on top of them. ...

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

Architecting 21-Service E-commerce with Golang & DDD

Answer-first: We decompose the monolith into 21 microservices using Domain-Driven Design (DDD) to isolate business boundaries. Implementing the Kratos framework in Go enables strong structural subtyping for clean layer segregation, while Dapr Workflows handle distributed transactions asynchronously via the Saga pattern to avoid race conditions. What You’ll Learn That AI Won’t Tell You The exact performance overhead of using Go’s structural subtyping versus manual dependency injection in high-throughput microservices. Why scoping database transactions to a single Aggregate root is critical, and how we resolved out-of-order event delivery using Kafka partition keys. Scaling an e-commerce platform past 10,000+ orders per day containing multiple SKUs across dynamic warehouses is where naive architecture breaks down. Hardware scaling ceases to be a magic bullet when distributed transactions, race conditions, and eventual consistency are involved. ...

April 12, 2026 · 8 min · Lê Tuấn Anh