Modular Monolith Guide: Prime Video & Monolith Revival

Prerequisite: This is the executive summary and introductory overview of the Modular Monolith Architecture series. No prior reading is required to start here. Part 0: Executive Summary — How Amazon Prime Video Saved 90% on Infrastructure Costs Answer-first: Amazon Prime Video reduced infrastructure costs by 90% by consolidating their audio/video monitoring service from serverless AWS Lambda/Step Functions into a single modular monolith. This transition eliminated high-frequency state transition fees and S3 network egress bottlenecks, demonstrating that in-memory data processing outperforms distributed microservices for high-throughput workloads. Implementing this architecture enforces sub-50ms P99 latency guarantees, strict component isolation, and automated. ...

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

Part 2: Golang vs. PHP/Laravel in High-Concurrency E-Commerce: Architectural Trade-Offs, 50k RPS Benchmarks, and Zero-Downtime Strangler-Fig Blueprint

← Previous Chapter: Part 1 — HTTP/REST vs. gRPC | Series hub | Next Chapter: Part 3 — Primary Key Showdown: UUIDv7 vs. Snowflake vs. BIGINT → Answer-first: For transactional hotspots (>=5,000 RPS flash-sale checkout, inventory locks), Golang is mandatory, delivering 86.3% lower AWS compute costs ($189,411.48/yr savings at 50,000 RPS) with sub-5ms P99 latency. For backoffice CRM, catalog, and ERP workflows, Laravel 11 with Filament remains vastly superior, making the Strangler-Fig Hybrid Architecture the optimal enterprise design. ...

August 16, 2026 · 25 min · Lê Tuấn Anh

Part 3: Primary Key Showdown: UUIDv7 vs. Snowflake ID vs. BIGINT in High-Throughput Distributed Systems

← Previous Chapter: Part 2 — Golang vs. PHP/Laravel | Series hub | Next Chapter: Part 4 — MariaDB vs. MySQL → Answer-first: For distributed write-heavy architectures (≥10,000 writes/s) on MySQL/InnoDB, Snowflake ID (64-bit) is optimal, eliminating the 50% secondary index multiplier tax while preserving B-tree locality. For PostgreSQL, client-generated keys, or coordinate-free distributed topologies, UUIDv7 (RFC 9562) delivers 98% sequential page packing without dedicated coordinator nodes, overcoming random UUIDv4 page thrashing and IOPS cliff failures. ...

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

Monolith FinOps: Reducing Infrastructure Cloud Costs

Prerequisite: Before reading this part, please review Part 1: Architectural Decision Framework. Part 2: FinOps Cost Reality - The “Hidden Tax” of Microservices Answer-first: The true cost of microservices lies in hidden infrastructure charges: sidecar proxy memory overhead, cross-AZ data transfer egress fees, NAT Gateway processing fees, and high-cardinality logging ingestion. A modular monolith co-locates processing within the same private subnet and container task, bypassing these multi-thousand-dollar cloud bills entirely. Implementing this architecture enforces sub-50ms P99 latency guarantees, strict component isolation, and automated observability. ...

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

Part 4: MariaDB vs. MySQL: Storage Engines & Thread Pool Showdown

← Previous Chapter: Part 3 — Primary Key Showdown: UUIDv7 vs. Snowflake | Series Hub | Next Chapter: Part 5 — Sharded MySQL vs. TiDB NewSQL → Part 4: MariaDB vs. MySQL: Storage Engines & Thread Pool Showdown Answer-first: MariaDB is no longer a drop-in replacement for MySQL. MySQL 8.4/9.0 dominates Cloud-Native ecosystems (AWS Aurora) with InnoDB tuning, binary JSONB O(1) updates, and Vector AI. Conversely, MariaDB 11.x excels on Bare-Metal/Kubernetes via native ThreadPool (50k+ conns), Galera 4 zero-lag multi-master, and MyRocks LSM storage compressing disk by 70%. ...

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

Part 5: Sharded MySQL (Vitess) vs. TiDB NewSQL Showdown

← Previous Chapter: Part 4 — MariaDB vs. MySQL | Series Hub Part 5: Sharded MySQL (Vitess) vs. TiDB NewSQL: Distributed ACID, Scale-Out Limits & Latency Penalties Answer-first: Sharded MySQL (Vitess) delivers unmatched sub-2ms write latency and isolated failure blast radius for clean single-shard workloads (tenant_id/user_id). Conversely, TiDB NewSQL is the definitive architecture for unpartitionable relational schemas and cross-shard queries via zero-touch 96MB Region auto-splits, trading off an 8–15ms write latency floor due to Google Percolator 2PC and Raft consensus hops. ...

August 21, 2026 · 8 min · Lê Tuấn Anh