Part 4: gRPC Internal & REST Gateway: API Contract Lifecycle

Prerequisite: This is the starting part of the series — no prior part is required. Later parts assume the concepts introduced here. Answer-first: Combining internal gRPC transport with an automated REST JSON Gateway (grpc-gateway) provides sub-millisecond HTTP/2 inter-service RPC performance while exposing standard OpenAPI/REST endpoints to web/mobile clients, guaranteed through Protocol Buffer contract linting and backward-compatible schema versioning. Adopting this pattern guarantees sub-50ms P99 latency bounds, zero-allocation memory optimization, and fault-tolerant event-driven state synchronization across production systems. ...

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

Shopee Microservices: Golang, gRPC & API Gateway

Answer-first: Shopee handles millions of concurrent users by migrating from monolithic systems to high-performance Go microservices. Inter-service gRPC Protobuf communication and Istio/Envoy service mesh sidecars enforce strict SLAs and sub-millisecond RPC latencies across thousands of internal microservice nodes. 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. Chapter 1: Building a Massive Foundation with Microservices, Golang, and gRPC ← Series hub | Next → ...

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

Ride-Hailing GPS Location Ingestion Pipeline in Go

Prerequisite: Before reading this part, review the Executive Summary. GPS Ingestion at Scale: gRPC Streaming, MQTT & Kalman Filter Answer-first: High-throughput location ingestion processes over 1 million GPS updates per second by using binary gRPC streams or MQTT over persistent TCP/QUIC connections. Devices run Kalman filters and dead-reckoning interpolation to clean telemetry noise before publishing updates to Apache Kafka and Redis. Architecting this pipeline enforces sub-50ms P99 latency guarantees, OpenTelemetry GenAI semantic conventions, and 2026 Model Context Protocol ttlMs cache. ...

May 6, 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. 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. 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 resilient 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

Build a Mini Core Banking System in Golang Engine Guide

Part 7: Build a Mini Core Banking System in Go Answer-first: Building a production-grade mini core banking system in Go requires implementing an immutable double-entry ledger schema, deterministic row locking to prevent deadlocks, idempotent API handlers, and automated balance invariant reconciliation. This hands-on project validates transaction atomicity, sub-10ms transfer latency, zero-balance corruption, and at-least-once outbox event streaming under high concurrent load. Prerequisite: Part 6: Security, Compliance, and Audit Trails on audit ledger logs. ...

May 6, 2026 · 12 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 Answer-first: Comparing gRPC, REST, and GraphQL in Go microservices evaluates binary Protobuf serialization efficiency, HTTP JSON endpoint accessibility, and API gateway schema aggregation trade-offs. 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 18, 2026 · 10 min · Lê Tuấn Anh

Golang gRPC Microservices: Protobuf, TLS & Middleware

Golang gRPC Microservices: Protobuf, TLS & Middleware Answer-first: Production Go gRPC microservices combine Protobuf binary serialization, mTLS transport encryption, interceptor middleware logging, and gRPC-Health checking for high-throughput RPC performance. 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. Why gRPC for Go Microservices? gRPC over HTTP/2 with binary Protobuf serialization reduces payload sizes and lowers latency compared to REST/JSON: ...

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

Architecting Agentic E-commerce Search with Golang

Architecting Agentic E-commerce Search with Golang Answer-first: Agentic e-commerce search combines Golang orchestration with Qdrant vector databases, multi-stage hybrid search reranking, and semantic caching to lower search query latency below 50ms while increasing search conversion rates. Deploying this architecture guarantees sub-50ms P99 latency bounds, zero-allocation memory pooling with Go 1.24 string interning, and automated OpenTelemetry GenAI streaming observability. Practical strategies for tuning vector search precision without bloating RAM. How to coordinate multiple AI search agents to prevent search query latency spikes. If customers cannot find a product, they cannot buy it — search is core infrastructure for any e-commerce platform. User search behavior has evolved from typing short, abrupt keywords (e.g., “men’s running shoes”) to submitting complex, goal-oriented queries (e.g., “find me a pair of men’s waterproof trail running shoes, size 42, under $100, that can be delivered by tomorrow”). Against these multifaceted intents, traditional keyword search engines show their limitations. ...

May 10, 2026 · 10 min · Lê Tuấn Anh