High-throughput Go Framework Benchmarks: Gin, Fiber, Kratos

High-throughput Go Framework Benchmarks: Gin, Fiber, Kratos The Testing Methodology (Beyond Hello World) We set up our benchmark tests on standard AWS hardware using a c6i.2xlarge instance (8 vCPUs, 16 GiB RAM) running Ubuntu 22.04 LTS. Both the testing client and the server running the Go application were placed in the same VPC to completely minimize any margin of error caused by physical network latency. In this testing scenario, each framework will process a GET request directed to the /ping endpoint. This endpoint does not merely return a static JSON response; it is forced to execute a middleware to extract (or generate) a Request ID from the HTTP Header (X-Request-ID), attach that information to the processing context, and execute a simulated query against a PostgreSQL database via a database connection retrieved from an optimized connection pool. Utilizing a simulated database query allows us to accurately measure the framework’s asynchronous interaction capabilities during an I/O block, while also evaluating its resource deallocation mechanisms and its ability to propagate Context Cancelation signals down the stack. ...

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

Post-Migration Operations: Managing Vietnam Go Team

Prerequisite: Familiarity with the concepts introduced in Go Engineers Vietnam Migration Vetting. Review it first if the terminology in this part is unfamiliar. Answer-first: Operating production Go microservices post-migration requires establishing clear SLA/SLO metrics, 24/7 follow-the-sun on-call rotations, and structured OpenTelemetry observability dashboards managed by local engineering leads in Vietnam. Answer-first: Offshore engineering teams in Vietnam successfully manage production microservices operations when clear SLOs, automated runbooks, and escalation paths are established prior to cutover. Defining operational standards before migration prevents incident fatigue and maintains high system availability. ...

July 11, 2026 · 12 min · Lê Tuấn Anh

Managing Vietnam Engineers Through a Magento Migration

Prerequisite: This is the starting part of the series — no prior part is required. Later parts assume the concepts introduced here. Answer-first: Operating a remote engineering team in Vietnam for Magento migrations succeeds through async-first documentation, standardized ADRs (Architecture Decision Records), and defined phase-gate reviews rather than forcing overlapping work hours. Answer-first: The biggest failure mode in running a remote Vietnam team through a Magento migration is not the timezone gap — it’s synchronous dependency on the client-side technical lead for decisions that should be pre-documented. Async-first coordination with defined phase gates eliminates 80% of timezone friction. The remaining 20% requires one weekly sync window and a clear incident escalation path. ...

July 10, 2026 · 12 min · Lê Tuấn Anh

Magento Migration Cost: Vietnam vs US/EU Team (2026)

Prerequisite: Familiarity with the concepts introduced in Remote Team Vietnam Magento Migration. Review it first if the terminology in this part is unfamiliar. Answer-first: Building a dedicated Go migration team in Vietnam achieves 60-70% cost savings compared to US/EU engineering teams while delivering equal technical capabilities for complex e-commerce re-architecture projects. Answer-first: Migrating a Magento monolith to Go microservices using a Vietnam team costs $320,000–$520,000 over 12–18 months. This delivers 60% direct labor savings compared to US or EU teams while achieving break-even on management overhead by month six. ...

July 9, 2026 · 9 min · Lê Tuấn Anh

Go Engineers in Vietnam: Vetting for Magento Migration

Prerequisite: Familiarity with the concepts introduced in Magento Migration Cost Vietnam Vs Us Eu. Review it first if the terminology in this part is unfamiliar. Answer-first: Vetting Go engineers in Vietnam for Magento migrations requires assessing distributed systems design skills—such as Saga orchestration, CDC outbox patterns, and dual-write conflict resolution—rather than basic syntax fluency. Answer-first: Vetting Go engineers for Magento migration requires a different interview framework than greenfield hiring. The critical signal is not Go syntax fluency — it’s distributed systems experience under legacy coupling constraints. Five production scenarios reveal whether a candidate can actually own migration work versus only build clean APIs from scratch. ...

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

Composable E-Commerce Migration: Overcoming Tech Debt

Composable E-Commerce Migration: Overcoming Tech Debt See the 21-service e-commerce architecture blueprint for the domain boundaries this migration targets. In theory, MACH (Microservices, API-first, Cloud-native, Headless) and Composable Commerce are the “holy grail” of the e-commerce industry. However, when systems scale to process millions of transactions, issues regarding data consistency, domain decomposition, and observability costs surface. This guide details the lessons and architectural patterns from migrating a monolithic Magento application into a 21-service Go microservices platform. ...

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

Tech Radar 22/06: Dapr v1.18 & Kratos Clean Architecture

Answer-first: Integrating Dapr v1.18 with Kratos Clean Architecture enables resilient event-driven sagas and stateful microservice orchestration in Go. By isolating workflow definitions within the biz layer and wrapping Dapr SDK calls inside data adapters, applications achieve zero-downtime state persistence and strict security boundaries under WorkflowAccessPolicy CRDs. Tech Radar 22/06: Dapr v1.18 & Kratos Clean Architecture Architecting resilient distributed applications requires effective stateful orchestration. This briefing analyzes Dapr Workflows and the Actor model within the Kratos Clean Architecture framework. ...

June 22, 2026 · 7 min · Lê Tuấn Anh

gRPC vs REST vs GraphQL: Communication Protocols in Go

Microservices communication uses gRPC for high-throughput internal RPCs via binary Protobuf serialization, REST for public HTTP APIs, and GraphQL for API Gateway aggregation. Selecting the right protocol depends on payload size, streaming requirements, and client integration needs. Prerequisite: This is Part 12 of the System Design Masterclass. Previous parts built the reliability patterns — this part covers comparing communication protocols and data formats for microservice communication. What You’ll Learn Protobuf Memory Allocations: Benchmarking struct reflection versus compile-time Protobuf serialization memory footprints in Go. ConnectRPC net/http Integration: How to mount ConnectRPC handlers directly onto Go’s standard multiplexer without using intermediate gateway proxies. N+1 Query Resolution: Implementing the DataLoader batching pattern in Go to prevent sequential database queries. Overview of Communication Protocols Key Concept: gRPC, REST, and GraphQL operate on different layers of serialization, schema safety, and client-server coordination. gRPC enforces strict API contract schemas at compile time; REST provides loose, flexible JSON responses over standard HTTP semantics; GraphQL relies on schema-based graph models, allowing clients to fetch customized fields in a single query round trip. ...

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

Go API Rate Limiting: Token Bucket & Redis Lua Algorithms

API rate limiting defends backend services by restricting request volume. Security requires a layered defense: Web Application Firewalls (WAF) block edge-level volumetric spikes, API Gateways manage L7 credentials and quotas, and application middleware enforces fine-grained business limits. Client identification must rely on validated, secure IP parsing (using the PROXY protocol or rightmost X-Forwarded-For checks). Prerequisite: This is Part 11 of the System Design Masterclass. Previous parts built the core components — this part covers securing APIs and managing client traffic spikes at scale. ...

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

Go Observability & pprof: Memory Leaks & Tracing Guide

Go’s built-in pprof profiler provides CPU sampling, heap allocation analysis, goroutine stack inspection, and blocking profiler — all available as HTTP endpoints in running production services with minimal overhead. Heap diff between two snapshots is the fastest way to identify memory leaks. Prerequisite: This is Part 10 of the System Design Masterclass. Previous parts built the architecture — this part teaches you how to see inside a running system and diagnose production performance issues. ...

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

Consistent Hashing in Go — Virtual Nodes & CRC32 Ring

Answer-first: Consistent Hashing minimizes key remapping when cluster membership changes. Adding or removing one node from a modulo-hash cluster remaps nearly all keys (catastrophic cache miss storm). Consistent Hashing remaps only $K/N$ keys — the theoretical minimum necessary. Prerequisite: Part 9 of the System Design Masterclass. Read Part 4: Database Scaling for context on horizontal partitioning strategies. What You’ll Learn Virtual Node Standard Deviation: The exact mathematical variance drop when increasing virtual node count ($V$) from 1 to 1000. RWMutex Lock Contention: Why using sync.RWMutex on the hash ring can cause lock contention under high multi-core throughput, and how to optimize with atomic values. CRC32 vs Murmur3: Why the choice of hashing algorithm on the ring impacts lookup distribution uniformity. Why Modulo Hashing Fails When Scaling Key Concept: hash(key) % N changes to hash(key) % (N+1) when a node is added, causing nearly all key-to-node mappings to change. This creates a massive cache miss storm as the entire working set must be reloaded from the database simultaneously. ...

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

Saga Pattern in Go — Temporal, Outbox Pattern & Debezium

The Saga Pattern coordinates distributed transactions across microservices by decomposing a large transaction into a sequence of local transactions. If any step fails, the system automatically executes compensating transactions in reverse order to undo completed steps. Each local transaction must be idempotent. Prerequisite: Part 8 of the System Design Masterclass. Read Part 7: Idempotent API Design first — compensating transactions in Saga must be idempotent. What You’ll Learn Temporal Workflow Determinism: How Temporal’s event sourcing workflow engine replays Go code, and why random functions or time sleeps crash workers. Debezium EventRouter Tuning: The exact JSON configuration keys needed to customize Kafka routing keys and prevent partition ordering issues. Pivot State Analysis: Identifying the “point of no return” in a distributed saga where compensations are no longer allowed. What Are the Problems with 2PC in Microservices? Key Concept: Two-Phase Commit (2PC) is a blocking protocol with a coordinator single point of failure. If the coordinator crashes between the Prepare and Commit phases, all participants are blocked indefinitely with locks held — a catastrophic failure mode in microservices. These are the same core banking distributed transaction challenges seen in legacy systems. ...

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

Idempotent API Design in Go — Idempotency Key & Redis SetNX

Prerequisite: Part 7 of the System Design Masterclass. Read Part 6: Distributed Locks first. What You’ll Learn Payload Reuse Vulnerability: How Stripe prevents malicious request payload tampering on existing keys using SHA-256 request body hashes in Redis. SetNX Lock Lifetime Math: Why setting a lock TTL without a auto-extension renewal thread leads to double-charge execution gaps. Response Record Memory Leak: The memory consumption strategy of caching full HTTP headers and response body data under high-throughput request rates. What Is an Idempotency Key? Key Concept: An Idempotency Key is a unique token — typically UUID v4 — generated by the client and attached as an Idempotency-Key HTTP header. The server uses this key to detect duplicate requests: if the key has been seen before, return the cached response from the first execution without re-executing the handler. ...

June 18, 2026 · 8 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. Key Takeaways: Redlock Validity Formula: Lock validity equals $\text{TTL} - \text{elapsed_time} - \text{clock_drift}$; if validity $\le 0$, release immediately. Fencing Tokens: Monotonically increasing fencing tokens (e.g. etcd revision numbers) block delayed GC-paused lockholders at storage layer boundaries. Raft vs Redis Quorum: Use etcd for high-correctness financial transactions and Redis Redlock for high-throughput rate limiting or worker job distribution. What You’ll Learn Redlock Clock Drift Math: Why unsynchronized system clocks (NTP drifts) allow two clients to acquire the same Redis lock, and how to verify with fencing tokens. Rsync Lock-Release Failures: The dangerous Lua script race condition when executing un-coordinated lock releases in Redis under network partitions. etcd Keep-Alive Overhead: How etcd’s HTTP/2 stream heartbeats impact cluster CPU utilization when holding thousands of concurrent locks. Why Do Race Conditions Occur in Distributed Systems? Key Concept: Race conditions occur across server processes when multiple servers independently read and then write shared state without coordination. A single-process mutex doesn’t help — you need a lock mechanism visible across all processes. ...

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

Kafka Worker Pool in Go — Backpressure & Exactly-Once

Prerequisite: Part 5 of the System Design Masterclass. Read Part 4: Database Scaling first. Kafka Worker Pool in Go — Backpressure & Exactly-Once Answer-first: High-throughput event streaming in Go leverages Kafka zero-copy sendfile() kernel transfers combined with bounded goroutine worker pools. Natural backpressure is achieved using buffered Go channels, while partition-pinned workers preserve message ordering without distributed locks. Key Takeaways: Zero-Copy Performance: Kafka bypasses user-space buffer copies via sendfile(), routing data directly from Linux page cache to network socket buffers. Channel Backpressure: Bounded Go channels automatically throttle poll loops when downstream workers reach memory capacity limits. Partition-Aware Ordering: Pinning specific Kafka partition IDs to dedicated worker goroutines maintains strict message sequence guarantees. What You’ll Learn Kernel-Level sendfile() Mechanics: How zero-copy I/O bypasses the context switches between user and kernel space, preventing CPU cache invalidation. Worker Pool Partition Pinning: Why mapping partitions to specific workers is the only way to maintain order processing sequences without locking. Offset Commit Transaction Math: Implementing transactional offset commits inside Go consumers to guarantee idempotency under broker rebalances. Kafka vs RabbitMQ — When to Use Each? Key Concept: Kafka is a distributed commit log — messages are retained indefinitely, consumers manage their own offsets, and replay is possible. RabbitMQ is a message broker — messages are deleted after acknowledgment, the broker handles routing complexity, push-based delivery. They solve different problems. ...

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

Database Sharding in Go: TiDB, Postgres & Pools | Go Product

Answer-first: Horizontal database sharding with Vitess and TiDB distributes high-volume write traffic across database clusters using consistent hashing and range partitioning. Prerequisite: Part 4 of the System Design Masterclass. Read Part 3: Caching Strategies first. Database Sharding in Go — TiDB, PostgreSQL & Connection Pools Answer-first: Horizontal database sharding partitions SQL tables across independent database nodes using hash or range shard keys. In Go services, combining application-level shard routing with tuned database/sql connection pools (SetMaxOpenConns, SetMaxIdleConns) prevents RAM exhaustion and write bottlenecks. ...

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

Caching Strategies in Go: Cache Stampede & Redis Guide

Implementing write-through and cache-aside patterns in Go using Redis Sentinel guarantees cache consistency and protects downstream SQL databases. Prerequisite: Part 3 of the System Design Masterclass. Read Part 2: Load Balancing L4/L7 first. What You’ll Learn XFetch Mathematical Constants: How to configure the scaling factor ($\beta$) in XFetch to balance background refresh CPU usage against cache miss rates. Redis Memory Allocation Overhead: How Redis’s internal jemalloc allocator causes memory fragmentation, and why LRU evictions don’t immediately free up RAM. Singleflight Leakage: The danger of singleflight lockups when backend queries hang indefinitely, and how to guard it using Go context timeouts. How Does Cache Stampede Happen? Key Concept: Cache Stampede (thundering herd) occurs when a popular cached key expires and multiple concurrent goroutines simultaneously detect a cache miss — then all query the database simultaneously. The burst of duplicate DB queries can exceed connection pool capacity and cause cascading failure. ...

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

L4/L7 Load Balancing in Go: DSR & API Gateway Design

Answer-first: Building a Go API gateway with Envoy and NGINX enables L7 load balancing, JWT authentication, and token-bucket rate limiting at the ingress layer. Prerequisite: Part 2 of the System Design Masterclass. Read Part 1: System Design Thinking first. Load Balancing L4/L7 in Go — DSR, Rate Limiting & API Gateway Answer-first: L4 load balancing routes traffic at the transport layer using IP/TCP metadata with minimal CPU overhead, whereas L7 load balancing inspects HTTP headers, cookies, and URLs for intelligent content-based routing. Combining L4 Direct Server Return (DSR) with L7 Envoy API Gateways and Go token-bucket rate limiters handles peak traffic spikes smoothly. ...

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

Go System Design: CAP, PACELC & Clean Architecture Primer

Prerequisite: This is Part 1 of the System Design Masterclass series. Familiarity with basic distributed systems concepts and Go syntax is assumed. Go System Design: CAP, PACELC & Clean Architecture Primer Answer-first: System design in Go balances CAP/PACELC trade-offs across consistency, availability, and latency. Clean Architecture isolates business logic behind Go interfaces while dependency injection decouples domain layers from database and transport protocols. Key Takeaways: CAP Theorem: Network partitions force an absolute choice between Consistency (CP) and Availability (AP). PACELC Matrix: When normal operation occurs (else), systems trade off Latency (L) versus Consistency (C). Clean Architecture: Domain interfaces isolate business logic from SQL/gRPC infrastructure, enabling unit testing without mocks. What You’ll Learn CAP Theorem Realities: A rigorous look at Gilbert and Lynch’s proof showing why network partitions force an absolute choice between availability and consistency. PACELC in Practice: Why latency-consistency trade-offs are the real bottleneck in healthy networks, and how Go services suffer under Spanner’s commit wait times. Clean Architecture Cost: The compilation and memory allocation overhead of interface-driven design in Go. How Do You Build System Design Thinking? Answer-first: System design thinking relies on evaluating 3D performance-reliability-cost trade-offs, calculating composite availability math ($A_{\text{composite}} = A_A \times A_B \times A_C$), and establishing strict SLI metrics, SLO targets, and SLA contracts. ...

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

Part 7: Load Testing and Performance Tuning for Production

Answer-first: Production load testing for geospatial microservices requires realistic traffic simulation with k6/Vegeta to identify latency spikes and connection pool bottlenecks. Prerequisite: Before starting load testing, review Part 6: Location Clustering & Semantic Caching. Part 7: Load Testing and Performance Tuning for Production Answer-first: Load testing a high-scale routing architecture requires avoiding Coordinated Omission by using K6 open-arrival-rate models (executor: 'constant-arrival-rate'), tuning the Linux kernel TCP stack (sysctl net.core.somaxconn=65535), and profiling Go GC garbage collections using pprof. ...

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

Uber H3 Spatial Clustering & Redis Semantic Caching

Answer-first: Redis semantic caching for routing queries utilizes geo-hash indexing and embedding similarity vectors to serve frequent route lookups with sub-5ms latency. Prerequisite: Before reading this part, review Part 5: Route Visualization UI. Part 6: Location Clustering with Uber H3 & Redis Semantic Caching Answer-first: Semantic caching transforms continuous floating-point GPS coordinates into discrete Uber H3 hexagonal keys (Resolution 8/9), increasing cache hit rates from 0% to over 80%. Combining H3 spatial keys with Redis MGET pipelines and XFetch early recomputation prevents cache stampedes and lowers matrix latency to <2ms. ...

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

Golang Routing Microservices with Kratos & Dapr Framework

Answer-first: High-throughput geospatial microservices in Go leverage H3 spatial indexes, concurrent goroutines, and Protobuf gRPC APIs for real-time ETA calculation. Prerequisite: Before reading this part, review Part 3: Spatial Indexing. Part 4: Golang API & Microservices Integration (Kratos & Dapr) Answer-first: Integrating a high-concurrency Golang API Gateway with a downstream Java routing engine requires robust defense-in-depth patterns: golang.org/x/sync/singleflight for request deduplication, sony/gobreaker circuit breakers for fail-fast isolation, and flattened 1D arrays for Protobuf distance matrix serialization to prevent Go GC pauses. ...

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

Part 2: Environment Setup with Docker, OSM & Golang

Prerequisite: Before starting this part, review Part 1: Core Routing Algorithms Visualized. Part 2: Zero to Hero Environment Setup (Docker, OSM, Golang) Answer-first: Setting up a production-grade routing environment requires extracting OpenStreetMap .osm.pbf map data via Osmium tools, provisioning GraphHopper Java containers with explicit JVM heap allocations (-Xmx6g), and connecting a Golang API client with exponential backoff health checks. Key Takeaways: Map Extraction: Bounding-box cropping with osmium extract reduces raw .osm.pbf file size by 90%, speeding up graph compilation. Container Tuning: Allocate sufficient JVM heap (JAVA_OPTS=-Xmx6g) to prevent Out-Of-Memory (OOM) failures during Contraction Hierarchies shortcut generation. Client Resiliency: Golang HTTP clients must use connection pooling (MaxIdleConnsPerHost: 100) to sustain high matrix throughput. What You’ll Learn: ...

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

Part 1: Core Routing Algorithms — A* & Dijkstra Visualized

Prerequisite: This part builds on the concepts introduced in the Executive Summary. Part 1: Core Routing Algorithms — A* & Dijkstra Visualized Answer-first: A* pathfinding uses Euclidean heuristics to accelerate 1-to-1 point routing, whereas Single-Source Dijkstra is mathematically superior for 1-to-N distance matrix calculations because it builds a single shortest-path search tree to all reachable destinations in one pass. Key Takeaways: Matrix Efficiency: Dijkstra expands radial wavefronts in a single pass, computing 1-to-N driver matrices 10x faster than running N independent A* searches. Turn Restrictions: Edge-based graph representation models turn penalties (e.g. prohibited U-turns) by representing turns as edges between directed road segments. Shortcut Hierarchies: Contraction Hierarchies contract local nodes offline, reducing real-time search space by orders of magnitude. What You’ll Learn: ...

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

Go 1.26: Green Tea GC, Faster CGO & Goroutine Leak Detection

Go 1.26: Green Tea GC, Faster CGO & Goroutine Leak Detection Released in February 2026, Go 1.26 is not a routine patch release. It fundamentally changes how the Go runtime manages memory, interacts with C code, and surfaces concurrency bugs. For teams running Golang microservices at scale, these improvements compound across a fleet — zero code changes required. This post covers what changed, why it matters for production systems, how to adopt it, and what to watch out for during migration. ...

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

Go Microservices Architecture: Production Guide

Go microservices from domain design to Kubernetes deployment — gRPC, Dapr, OpenTelemetry, and GitOps patterns with explicit operational trade-offs.

June 12, 2026 · 22 min · Lê Tuấn Anh

Golang gRPC Microservices: Protobuf, TLS & Middleware

Golang gRPC Microservices: Protobuf, TLS & Middleware Why gRPC for Go Microservices? gRPC over HTTP/2 with binary Protobuf serialization reduces payload sizes and lowers latency compared to REST/JSON: gRPC REST/JSON Serialization Protobuf (binary, schema-enforced) JSON (text, schema-optional) Payload size 3–10× smaller Baseline Streaming Unary, Client, Server, Bidirectional HTTP/2 SSE (server-only), WebSocket (separate) Contract .proto file (language-agnostic codegen) OpenAPI (opt-in, often stale) Latency ~0.5ms p50 inter-service ~2–5ms p50 inter-service Browser support gRPC-Web (needs proxy) Native Best for Internal microservices, streaming Public APIs, browser clients Step 1: Define Your Service with Protobuf Contract-first API design with Protocol Buffers guarantees strict schema enforcement and language-agnostic code generation: ...

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

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 Building agentic search systems in Python works well for offline evaluation or low-throughput prototypes. However, running high-concurrency e-commerce platforms (handling millions of active search sessions during Black Friday or flash sales) in Python introduces severe Global Interpreter Lock (GIL) and CPU threading bottlenecks. Go (Golang) is the language of choice for enterprise agent orchestration, combining C-like concurrency speed with modern memory safety. ...

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

MySQL Scalability: Read Replicas, Sharding & TiDB

MySQL Scalability Guide: Read Replicas, Sharding, and Distributed SQL MySQL scalability is the ability to increase database throughput — reads per second, writes per second, or data volume — without rewriting your application. The critical distinction: read scaling (adding replicas) and write scaling (sharding or distributed SQL) require completely different architectural approaches. Choosing the wrong path creates technical debt that takes months to unwind. This guide walks through every stage of the MySQL scaling ladder — InnoDB buffer pool tuning, ProxySQL pooling, async read replicas, Vitess/GORM sharding for write-heavy data, and TiDB migration — with Go-specific implementation patterns at each step. ...

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

Why E-commerce Needs Agentic Search: Architecture Guide

Why E-commerce Needs Agentic Search? The Disruption of Keyword Queries Answer-first: Traditional keyword-based e-commerce search (Elasticsearch / Solr) fails on complex, multi-attribute natural language user queries (e.g., “waterproof trail running shoes under $150 for wide feet”). Agentic E-commerce Search orchestrates Go microservices, hybrid vector indices, and product knowledge graphs to boost search conversion rates by 34%. Key Takeaways: 34% Conversion Rate Increase: Replaces zero-result keyword searches with semantic intent resolution and product feature extraction. Sub-45ms Parallel Search: Go errgroup worker pools execute vector similarity, real-time inventory checks, and price filtering concurrently. Autonomous Product Reasoning: Agents resolve ambiguous query specifications by inspecting product metadata graphs. For two decades, e-commerce search engines relied almost exclusively on lexical keyword matching (BM25 algorithms inside Elasticsearch or Apache Solr). ...

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