---
title: "Articles — Case Studies & Technical Notes — Tran Manh Tuan"
description: "Production write-ups and reference implementations: what broke, how it was narrowed down, what the cause turned out to be, and what was put in place afterwards."
canonical: "https://tmtuan.dev/en/articles"
language: "en"
image: "https://tmtuan.dev/_img/og/default.5d198072-og.jpg"
tokens: 870
---

# Articles

Case studies and reference implementations

Production work written up in full: what broke, how it was narrowed down, what the cause turned out to be, and what was put in place so it would not happen unnoticed again.

These intentionally omit proprietary source code, internal repository information, cloud project identifiers and confidential client data.

- 2026-10-11 · System Design · Elasticsearch · Kubernetes · Message Queue · Search

  ## [How Discord indexes trillions of messages](https://tmtuan.dev/en/articles/discord-trillions-message-indexing)

  Discord replaced its Redis queue, split Elasticsearch into small cells and routed bulk writes by destination to operate search at trillion-message scale.

- 2026-10-11 · Payments · Ledger · System Design · Kafka · Data Consistency

  ## [Why an async payment platform still needs a strongly consistent ledger](https://tmtuan.dev/en/articles/uber-gulfstream-payments-ledger)

  Uber Gulfstream combines an asynchronous payment pipeline with immutable money orders, zero-sum validation and strongly consistent ledger balances.

- 2026-10-10 · System Design · Scalability · Caching · Database · Shopify

  ## [How Shopify handled 1.27 million requests per second during Black Friday](https://tmtuan.dev/en/articles/shopify-bfcm-risk-mitigation)

  System-design lessons from BFCM 2022: distribute load, protect the database, cache repeated reads and prepare for traffic spikes.

- 2026-10-09 · MySQL · Database Partitioning · Reliability · System Design

  ## [Partition Relational Databases Before You Move Data](https://tmtuan.dev/en/articles/partitioning-relational-databases-at-scale)

  Lessons from GitHub's MySQL partitioning: schema domains, boundary linters, consistency checks, cutover mechanics, and production rollout.

- 2026-10-08 · MySQL · Inventory · Concurrency · System Design

  ## [What Shopify's MySQL Inventory Reservation Migration Teaches](https://tmtuan.dev/en/articles/scaling-inventory-reservations)

  Lessons from Shopify's Redis-to-MySQL migration: bounded row pools, lock design, connection visibility, and a safer rollout strategy.

- 2026-09-25 · Knowledge Base · Context Graph · MCP · tree-sitter · AI Agent · Docs-as-code

  ## [Docs-as-code Knowledge Base + Context Graph for a 15-project portfolio](https://tmtuan.dev/en/articles/knowledge-base-docs-as-code-context-graph)

  Docs for 15 projects had drifted from the code. A docs-as-code KB, a context graph and an MCP server for AI agents, measured in 126 blind-graded sessions.

- 2026-09-18 · Next.js · Firebase Hosting · Cloud Run · SEO · Incident

  ## [How I Traced a Googlebot-only HTTP 500 Across Next.js, Cloud Run and the Hosting Edge](https://tmtuan.dev/en/articles/googlebot-500-firebase-hosting-nextjs)

  Users and every other crawler got 200 while Googlebot got 500 site-wide. The cause: a 404-path regression amplified by crawler verification at the hosting edge.

## Structured data (JSON-LD)

```json
{"@context":"https://schema.org","@graph":[{"@type":"CollectionPage","@id":"https://tmtuan.dev/en/articles#webpage","url":"https://tmtuan.dev/en/articles","name":"Articles — Case Studies & Technical Notes","description":"Production write-ups and reference implementations: what broke, how it was narrowed down, what the cause turned out to be, and what was put in place afterwards.","inLanguage":"en","isPartOf":{"@id":"https://tmtuan.dev/#website"},"about":{"@id":"https://tmtuan.dev/#person"}}]}
```
