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

Go 1.26: Green Tea GC, Faster CGO & Goroutine Leak Detection Answer-First: Go 1.26 introduces the Green Tea garbage collector, replacing object-by-object graph walking with page-oriented marking to leverage spatial locality and AVX-512 vector acceleration. It reduces GC CPU overhead and tail latency while optimizing CGO transition paths and introducing a native goroutine leak profiler for production diagnostics. Performance metrics of garbage collection optimization in Go 1.26. Memory overhead trade-offs when calling CGO functions in high-throughput network threads. 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. ...

June 12, 2026 · 12 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 · 24 min · Lê Tuấn Anh

Golang gRPC Microservices: Protobuf, TLS & Middleware

Golang gRPC Microservices: Protobuf, TLS & Middleware Answer-First: Production Golang gRPC microservices achieve high throughput and security by using Protocol Buffers binary serialization, mutual TLS (mTLS) for zero-trust service authentication, interceptor middleware for cross-cutting concerns, and connection keep-alive tuning to eliminate idle TCP teardowns. Optimizing Protobuf serialization overhead in Go-based gRPC microservices. How to set up connection keep-alive parameters to prevent TCP connection drops during peak load. Why gRPC for Go Microservices? Selecting gRPC for inter-service communication in Go microservices offers significant performance benefits over traditional REST over HTTP/1.1 interfaces. Operating on HTTP/2 multiplexed streams with binary Protocol Buffer serialization reduces network payload sizes and lowers serialization overhead across high-throughput distributed microservice architectures. The comparison table below highlights these key protocol differences: ...

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

GraphHopper Distance Matrix: Self-Host, API & Alternatives

GraphHopper Distance Matrix: Production Self-Hosting & API Guide Answer-First: Self-hosting GraphHopper distance matrix via Docker and the /matrix API provides a cost-effective, high-throughput alternative to Google Maps for logistics routing. By caching OpenStreetMap (OSM) road networks in memory with H3 spatial indexing and Redis, engineering teams can compute 1,000x1,000 distance-time matrices in milliseconds to power last-mile Vehicle Routing Problem (VRP) algorithms. Setting up GraphHopper self-hosting routing engine with custom profile caches. Configuring RAM allocations to hold entire continental OpenStreetMap networks. How to Call the GraphHopper Matrix API (/matrix Endpoint) Running GraphHopper distance matrix in production requires configuring Docker deployment, the /matrix API endpoint, Custom Models for vehicle-specific routing (truck/motorcycle), H3-based Redis caching, and evaluating performance tradeoffs against OSRM, Valhalla, and Google Maps (for an in-depth analysis of routing engine selection, see our OSRM vs GraphHopper Architecture Comparison). ...

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

E-commerce Data Ingestion & Atomic Chunking Pipelines

Data Ingestion & Atomic Chunking Product Data: Semantic Catalog Pipelines In general document RAG applications, text splitting divides long articles into arbitrary token chunks (e.g., 512 tokens with 50-token overlap). Applying naive token splitting to e-commerce product catalogs is disastrous. A camera lens catalog page might contain technical specs for three different lens variants (24mm f/1.4, 50mm f/1.2, 85mm f/1.4). Naive character splitting shreds table rows across chunk boundaries, assigning the 24mm lens price to the 85mm lens embedding. ...

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

Agentic Search Architecture & Golang Orchestration Power

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. Golang Agentic Search Orchestration Sequence Golang orchestrators receive client queries, execute concurrent vector and relational queries, and aggregate results using lightweight goroutines and channels. ...

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

MySQL Scalability: Read Replicas, Sharding & TiDB

MySQL Scalability Guide: Read Replicas, Sharding, and Distributed SQL Answer-First: Scaling MySQL requires matching the solution to the bottleneck: tune InnoDB buffer pool (70–80% RAM) and ProxySQL pooling for initial gains; add async read replicas for read-heavy workloads; apply Vitess or GORM application-level sharding for write-heavy data (>1TB); or migrate to distributed NewSQL (TiDB) when cross-shard queries and manual re-sharding become unsustainable. Tuning InnoDB buffer pool size for high read/write ratio workloads. Why standard read replication fails to solve write bottlenecks and when toshard. 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. ...

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

Why E-commerce Needs Agentic Search: Architecture Guide

Why E-commerce Needs Agentic Search? The Disruption of Keyword Queries Executive Summary & Quick Answer: 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

Real-Time Inventory: Kafka, CDC & Redis for E-Commerce

Real-Time Inventory Topology: CDC, Kafka, and Redis Answer-First: Building high-throughput real-time inventory systems requires a hybrid Speed & Truth architecture. Change Data Capture (Debezium) streams database stock updates into Apache Kafka, while atomic Redis Lua scripts handle instant sub-millisecond stock reservations with zero overselling during high-concurrency flash sales. Write-through caches configuration in Redis to prevent inventory drift. Lua scripting implementations in Redis that prevent double-reservations under peak load. Real-time inventory synchronization is the process of propagating stock count changes from the system of record (database) to all sales channels — web storefront, mobile app, WMS, ERP — in sub-second time. Instead of batch ETL jobs that run every hour, a CDC + Kafka pipeline streams every committed stock change as an event, eliminating overselling and stale stock displays. ...

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

Go Microservices Distributed Tracing Architecture (2026)

Go Microservices Distributed Tracing Architecture (2026) Answer-First: Distributed tracing in Go microservices relies on OpenTelemetry (OTel) SDKs to propagate W3C Trace Context across HTTP APIs, gRPC calls, and Kafka event streams. By implementing an OTel Collector Gateway with tail-based sampling, engineering teams maintain end-to-end transaction visibility and rapidly pinpoint latency bottlenecks without incurring prohibitive telemetry storage costs. OpenTelemetry collector tuning for low-overhead distributed tracing. Propagating span contexts over asynchronous Kafka messaging systems without breaking tracing chains. Monitoring complex Go microservices requires more than isolated logs. When a request traverses HTTP APIs, Kafka event streams, and asynchronous worker pools, you need absolute visibility to pinpoint latency bottlenecks and failures. ...

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

Enterprise MCP Strategy: Governance & Multi-Tenancy

Part 7 — Enterprise MCP Strategy & Multi-Tenancy Governance Executive Summary & Quick Answer: Scaling Model Context Protocol (MCP) across large enterprises requires an Enterprise Internal MCP Registry and strict Multi-Tenancy Governance. Enforcing exact semantic version pinning (v1.4.2 over :latest), MCP Server Cards metadata registration, and tenant database isolation prevents Shadow MCP deployments and cross-tenant data leaks. Key Takeaways: Internal MCP Server Registry: Centralized repository cataloging verified enterprise MCP tools, schemas, and security clearance levels. Strict Version Pinning: Forbids mutable :latest tags to prevent sudden breaking changes in AI agent tool behavior. Multi-Tenant Data Isolation: Binds tenant IDs to tool execution scopes to enforce Row-Level Security (RLS). By this stage in the series, you have built secure, observable MCP servers protected by a Gateway. However, scaling MCP across an organization spanning hundreds of engineering teams and thousands of tools introduces a new operational challenge: Enterprise Governance. ...

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

MCP Observability & Tracing: Auditing Control Planes

Part 6 — MCP Observability & Tracing: Auditing the Control Plane Executive Summary & Quick Answer: Operating Model Context Protocol (MCP) servers without telemetry logging creates compliance vulnerabilities (violating OWASP MCP08: Lack of Audit & Telemetry). Instrumenting MCP servers with vendor-agnostic OpenTelemetry (OTel) tracing captures JSON-RPC 2.0 tool execution durations, argument metadata, and error rates in real-time Prometheus dashboards. Key Takeaways: Compliance Audit Trail: Logs cryptographically signed execution traces for every MCP tool call to satisfy SOC2 Type II requirements. End-to-End W3C Trace Context: Propagates trace parent contexts across client hosts, gateways, and backend MCP microservices. No fmt.Println Stdio Pollution: Enforces dedicated OpenTelemetry exporters to prevent stdout log strings from corrupting stdio transport frames. When building command-line utilities or standard HTTP microservices, developers frequently log debug strings directly to stdout (fmt.Println() or print()). ...

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

MCP Security Engineering: Isolation & Defense-in-Depth

Part 5 — MCP Security Engineering & Isolation: Defense-in-Depth Executive Summary & Quick Answer: Operating Model Context Protocol (MCP) servers exposes infrastructure to novel AI security risks, including Path Traversal in Resource URIs, Indirect Prompt Injections in Tool Descriptions, and Shadow Parameter Manipulation. Implementing container sandboxing, gVisor container isolation, and AST path sanitization protects enterprise backends against full system compromise. Key Takeaways: Zero Path Traversal Vulnerabilities: Strict path sanitization blocks directory traversal (../) in resource URIs. Description Injection Scanning: Sanitizes server description strings before forwarding manifests to AI client hosts. gVisor Container Sandboxing: Isolates MCP server execution environments to prevent host kernel exploits. Allowing an autonomous AI agent to discover and execute tools across enterprise infrastructure creates an unprecedented attack surface. ...

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

MCP Gateway Architecture: Intelligent Dynamic Routing

Part 4 — MCP Gateway Architecture & Routing Executive Summary & Quick Answer: Operating multiple independent MCP servers across an enterprise creates point-to-point management sprawl and security leaks. An MCP Gateway acts as a centralized reverse proxy control plane, handling dynamic tool routing, rate limiting, authentication enforcement, and circuit breaking for all downstream MCP server microservices. Key Takeaways: Centralized Control Plane: Eliminates point-to-point connections by proxying all AI agent tool requests through a single gateway. Dynamic Tool Aggregation: Aggregates disparate backend tools/list responses into a unified tool directory for client hosts. Resilient Circuit Breaking: Protects downstream database and microservice MCP servers from agent traffic spikes. In early enterprise AI deployments, every development team built their own standalone MCP server. Soon, an organization operating 30 engineering teams found itself managing 30 distinct MCP server URLs, each requiring separate authentication configs, firewall rules, and observability integrations. ...

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

MCP Identity & Auth Engineering: OAuth2, PKCE & mTLS

Part 3 — Identity & Authentication: OAuth2, PKCE & mTLS Executive Summary & Quick Answer: Hardcoding static API keys in AI agent code creates severe security liabilities. Production MCP architectures enforce Zero Trust authentication using OAuth 2.1 with PKCE for user identity propagation and SPIFFE/SPIRE mTLS X.509 certificates for workload-to-workload identity verification across microservice meshes. Key Takeaways: Zero Hardcoded Secrets: Replaces static API keys with short-lived OAuth 2.1 tokens (15-minute expiration). Workload Identity (SPIFFE/SPIRE): Cryptographically verifies that only authorized agent container binaries can connect to target MCP servers. Human-in-the-Loop Auth Elevation: Triggers interactive OAuth authorization prompts when tools request high-risk capabilities. In early agentic software development, engineers frequently stored long-lived master API keys in local environment variables or configuration files. ...

June 6, 2026 · 6 min · Lê Tuấn Anh

Building Production-Grade MCP Servers in Go & Python

Part 2 — Building Production-Grade MCP Servers in Go/Python Executive Summary & Quick Answer: Building production-grade MCP servers requires adhering to Domain-Driven Design (DDD) bounded contexts, stateless scaling, and structured JSON-RPC error handling. By using Go memory buffer pools (sync.Pool) and context cancellation timeouts, production MCP servers process high-concurrency tool calls with sub-15ms execution latency. Key Takeaways: DDD Bounded Context Isolation: Microservice MCP servers isolate domain tools (Billing, K8s, Database) to restrict security blast radius. Graceful Tool Error Handling: Setting isError: true in tool result payloads allows AI agents to self-correct invalid arguments without crashing. 100% Stateless Horizontal Scaling: Externalizes all session state to Redis, enabling Kubernetes Horizontal Pod Autoscaling (HPA). Building a quick MCP server prototype for local testing is simple. However, deploying an Enterprise Production MCP Server serving thousands of concurrent AI agent queries across a Kubernetes cluster demands rigorous engineering discipline. ...

June 6, 2026 · 6 min · Lê Tuấn Anh

MCP Protocol Engineering: Transport Evolution & Specs

Part 1 — MCP Core Protocol Architecture & Transport Evolution Executive Summary & Quick Answer: Model Context Protocol (MCP) relies on dual-transport abstractions (stdio for zero-overhead local process IPC and SSE for remote network RPCs) transmitting JSON-RPC 2.0 messages. Understanding the protocol state machine ensures sub-20ms message framing across distributed AI agent tool servers. Key Takeaways: Dual Transport Abstraction: stdio provides local desktop IPC with zero network overhead; SSE provides HTTP network streaming. Bi-Directional JSON-RPC 2.0: Enables servers to initiate notification requests back to client hosts during long-running tool execution. Strict Capabilities Negotiation: Ensures clients and servers negotiate supported features (resources, tools, prompts) during initialization. The Model Context Protocol (MCP) is built upon a layered architecture designed to isolate application business logic from underlying transport communication channels. ...

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

MCP Architecture: Model Context Protocol Production Guide

Executive Summary — Model Context Protocol in Production: The Control Plane of AI Executive Summary & Quick Answer: Model Context Protocol (MCP) establishes an open, vendor-agnostic JSON-RPC 2.0 standard for connecting AI agents to enterprise data sources, tools, and prompts. Replacing ad-hoc custom integrations with production MCP Gateways enforces 100% data isolation, mTLS identity verification, and central telemetry auditing across enterprise microservices. Key Takeaways: Unified JSON-RPC Standard: Eliminates custom API integration glue code across LLM frameworks (Claude, Cursor, LangChain). Zero Trust Identity Enforcement: Uses OAuth 2.1 PKCE and SPIFFE/SPIRE mTLS certificates to authenticate AI agent tool calls. Sub-20ms Transport Overhead: High-performance SSE and stdio transport layers minimize communication latency. Before the introduction of the Model Context Protocol (MCP), connecting AI agents to enterprise data stores was fragmentation chaos. Every developer built custom glue code to connect LLMs to PostgreSQL databases, JIRA APIs, internal GitHub repos, and Kubernetes clusters. ...

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

Generative UI Migration Playbook: Legacy to AI Frontend

Part 7 — Migration Playbook to Generative UI: Legacy to AI-Native Frontend Executive Summary & Quick Answer: Migrating a legacy React codebase to a Generative UI architecture does not require a complete application rewrite. By following a structured 4-Phase Strangler Fig Migration Playbook—Auditing UI Components (Phase 1), Extracting Component Registry Schemas (Phase 2), Deploying Edge SSE Stream Routers (Phase 3), and Incrementally Rolling Out Generative Views (Phase 4)—engineering teams migrate legacy applications safely without downtime. ...

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

Go pprof CPU & Memory Profiling: Production Tutorial

Go pprof CPU & Memory Profiling: Production Tutorial Answer-First: Profiling Go services in production requires exposing net/http/pprof endpoints securely over private management ports or authenticated sidecars. By capturing CPU profiles, flame graphs, and memory profiles (inuse_space vs. alloc_space) via go tool pprof, developers can diagnose performance bottlenecks and memory leaks without restarting pods. Reading memory profiles to identify slow allocations in performance hot paths. Analyzing flame graphs to detect lock contention on global mutexes. Prerequisite: This guide covers how to profile and diagnose complex performance issues in production. If you are specifically dealing with unbounded goroutine growth, ensure you first understand the foundational concepts in Goroutine Leak Detection and Fix in Production Go Services. ...

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

Alipay Double 11: 544,000 TPS Architecture Explained

Alipay Double 11: 544,000 TPS Architecture Explained Answer-First: Alipay reached a reported peak of 544,000 payment transactions per second (TPS) during Double 11 by migrating from a monolithic architecture to Local Deployment Center (LDC) cell-based unitization, OceanBase distributed Paxos database clusters, and RocketMQ 2-phase transactional messaging. Executive Summary & Research Baseline Two different Double 11 peak figures circulate widely, and they measure different layers of the stack — conflating them is the most common error in write-ups on this topic: ...

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

Cloudflare D1 & Durable Objects: Build Real-Time Cart

Cloudflare D1 + Durable Objects: Building a Real-Time Cart Answer-First: Building a real-time e-commerce cart on Cloudflare combines Durable Objects for strongly consistent, single-threaded in-memory session state across active browser tabs with Cloudflare D1 (edge SQLite) for long-term order persistence. This edge-native architecture eliminates Redis clusters and centralized database bottlenecks, enabling sub-50ms worldwide cart synchronization with zero cold starts. How to design cart locking mechanisms in Durable Objects without deadlocks. Tuning sub-request allocations to stay within Cloudflare’s free-tier runtime boundaries. The traditional shopping cart architecture is a familiar set of tradeoffs: Redis for session storage, PostgreSQL for order data, and a backend API tier that coordinates between them. It works, but it introduces latency proportional to the distance between the user and your datacenter, requires operational overhead for Redis cluster management, and struggles with globally concurrent cart edits from the same user across multiple devices. ...

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

Dapr Workflow Go Tutorial: Orchestrated Saga Pattern

Dapr Workflow Go Tutorial: Orchestrated Saga Pattern Answer-First: Dapr Workflow implements Orchestrated Sagas in Go using replay-based durable execution, where a single orchestrator function owns the entire multi-step transaction lifecycle. It automatically records event history in a state store, surviving process restarts without duplicate execution and executing compensation handlers in sequence if any step fails. Compensation handlers configuration in Dapr to guarantee atomic rollback. How to handle transient workflows when the orchestrator instance restarts mid-transaction. Most Go developers building microservices know the Choreography Saga pattern: service A emits an event, service B reacts, service C reacts to B, and so on. If step C fails, services emit “compensation” events in reverse order. The pattern works elegantly for simple flows, but breaks down as the number of steps grows: debugging a failed saga requires tracing events across five message broker topics, and implementing compensation logic requires every service to understand the full saga’s state. ...

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

Flash Sale Architecture: Rate Limiting & Redis

Flash Sale Architecture: Rate Limiting & Redis Answer-First: High-concurrency flash sale architectures handle millions of concurrent requests (C10M scale) by using kernel bypass networking (DPDK/eBPF), edge rate limiting via atomic Redis Lua token buckets, pre-warmed in-memory inventory decrementing, and asynchronous Kafka queue leveling before persisting to distributed TiDB/MySQL database clusters. Executive Summary & System Design Foundations High-concurrency systems handling millions of concurrent requests (C10M scale) must push load shedding and admission control as close to the network edge as possible. Four design baselines drive the rest of this architecture: ...

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

Go pprof in Kubernetes: Remote Profiling & Flame Graphs

Go pprof in Kubernetes: Remote Profiling & Flame Graphs Answer-First: Remote profiling Go microservices in Kubernetes combines net/http/pprof endpoints with kubectl port-forward or continuous profilers like Pyroscope. This captures production CPU, heap, and goroutine profiles under real load with negligible overhead (<1% CPU) without exposing internal debug ports publicly. Production port forwarding configuration to profile CPU without service downtime. Decoding complex memory profiles and locating garbage collection allocation hot paths. You’ve instrumented your Go service with net/http/pprof, run go tool pprof locally against the development binary, and spotted the hot path in your flame graph. Then you deploy to Kubernetes and the bottleneck disappears — because the workload profile in Kubernetes differs from local testing (different request mix, connection pool pressure, GC behavior under actual memory pressure, scheduler interference from co-located pods). ...

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

Golang Goroutine Pool Patterns: errgroup & Worker Pools

Golang Goroutine Pool Patterns: errgroup & Backpressure Answer-First: Production Go applications manage high concurrency using golang.org/x/sync/errgroup with bounded semaphores or channel-backed worker pools. These patterns enforce backpressure, propagate context cancellation on first error, and prevent uncontrolled goroutine spawning and out-of-memory crashes. Preventing goroutine leaks in high-concurrency worker pools using errgroup. Writing robust 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

GraphRAG vs Naive RAG: Enterprise Architecture Guide

GraphRAG vs Naive RAG: Enterprise Architecture Guide Answer-First: Enterprise GraphRAG extends Naive RAG by extracting entities and relationships into a knowledge graph layer alongside vector embeddings. This multi-hop topology retrieval resolves complex domain queries across interconnected documents where isolated vector similarity searches fail, with PostgreSQL WAL streaming CDC maintaining real-time graph synchronization. Schema design for knowledge graphs that speed up global enterprise RAG. Syncing GraphRAG knowledge bases in real-time using PostgreSQL WAL events. Most RAG (Retrieval-Augmented Generation) implementations look the same: chunk documents, embed them into vectors, store them in a vector database, retrieve by cosine similarity, and inject the top-K chunks into the LLM context. This works for simple document Q&A. It fails systematically for enterprise knowledge bases where the answer to a question depends not on a single document chunk, but on the relationships between dozens of interconnected entities. ...

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

Order Fulfillment Algorithm: Warehouse to Last-Mile

Order Fulfillment Algorithm: Warehouse to Last-Mile Answer-First: An e-commerce order fulfillment algorithm selects warehouses and routes last-mile delivery using a 5-step pipeline: Available-to-Promise (ATP) stock checks, cost/proximity scoring, split vs. consolidation trade-offs, anticipatory inventory positioning (e.g. Amazon CONDOR), and Vehicle Routing Problem (VRP) solving with tools like OR-Tools or GraphHopper. Executive Summary & Fulfillment Fundamentals When an order is confirmed, the fulfillment system executes a multi-step decision pipeline to optimize inventory allocation and transit SLA: ...

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

PayPay Architecture: Scaling Payments to 70M Users

PayPay Architecture: Scaling to 70M Users & 100k Peak TPS Answer-First: PayPay scales payment infrastructure to 70M+ users and 100k+ peak TPS using a Kubernetes microservices stack backed by TiDB for ACID-compliant ledger storage and Kafka for event sourcing. Reliability is enforced through GitOps workflows, automated chaos engineering fault injection, and asynchronous event decoupling to isolate checkout processes from banking outages. Running chaos engineering scripts in TiDB payment systems. How event sourcing with Kafka isolates PayPay checkout routes from legacy bank outages. PayPay launched in October 2018 and grew to 10 million users in just 3 months — a growth rate that no Japanese fintech had ever seen. By 2025, the platform had crossed 70 million registered users and processed 7.8 billion payments per year. Behind this growth is an engineering team that has had to scale not just their infrastructure, but their entire engineering culture: from service standardization and GitOps-driven deployments to chaos engineering and AI-powered fraud detection. ...

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

Prompt Engineering vs Fine-Tuning: 2026 AI Decision Guide

Prompt Engineering vs Fine-Tuning vs RAG: Complete 2026 Decision Guide Answer-First: Choose Prompt Engineering for rapid prototyping on broad tasks, RAG for accessing dynamic real-time knowledge, and Fine-Tuning (LoRA/QLoRA) for strict output formatting, specialized domain style, and reducing per-request token costs. Combining Small Language Models (SLMs) with RAG and LoRA delivers frontier-level accuracy on specialized tasks at significantly lower compute costs. Executive Summary & SLM Playbook Architecture Small Language Models (SLMs, 1B–8B parameters) combined with fine-tuning and local inference (vLLM) rival proprietary frontier LLMs on specialized domain tasks at a fraction of the cost. The playbook below rests on three architectural choices: ...

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