Backend Development 30 min read

High‑Availability Architecture for JD.com Product Detail Pages

This article describes how JD.com redesigned its product detail page system from a static, cache‑heavy architecture to a fully dynamic, multi‑level cached service using Nginx+Lua, JIMDB, and asynchronous workers, addressing scalability, performance, and high‑availability challenges for billions of daily page views.

High Availability Architecture
High Availability Architecture
High Availability Architecture
High‑Availability Architecture for JD.com Product Detail Pages

JD.com’s product detail page is a critical entry point handling a large portion of traffic and orders; traditional static rendering could not keep up with rapidly changing business requirements, prompting a shift to a high‑performance, real‑time dynamic template solution.

The earliest version (Architecture 1.0) was a simple IIS + C# + SQL Server setup that relied on direct database queries and a single memcached layer, which quickly showed instability and scaling limits.

Subsequent iterations (Architecture 2.0 and 2.1) introduced static page generation with MQ‑driven updates, HTML fragment generation, and Nginx SSI merging, but they suffered from massive fragment counts, slow full‑page rebuilds, and inability to respond swiftly to business changes.

The current Architecture 3.0 consists of three subsystems: the Product Detail Page System , the 统一服务系统 (Unified Service System) handling dynamic parts such as real‑time inventory, and the 动态服务系统 (Dynamic Service System) providing data services to internal systems. Data changes are propagated via MQ, workers perform heterogeneous data ingestion into JIMDB (a Redis‑based KV store with persistence), and aggregated data is served to the front‑end using Nginx+Lua templating.

Key design principles include a closed data loop, dimension‑based storage, stateless worker tasks, asynchronous and concurrent processing, multi‑level caching (browser, CDN, Nginx shared dict, distributed Redis/JIMDB), dynamic rendering, elasticity via Docker containers, graceful degradation switches, multi‑datacenter active‑active deployment, and comprehensive load‑testing strategies.

Specific challenges addressed were SSD performance instability, KV storage engine selection (LevelDB, RocksDB, LMDB), JIMDB synchronization bottlenecks, shard configuration using Twemproxy, high‑volume inventory and price APIs, network jitter handling with timeout tuning, and traffic spikes mitigated by proxy cache, request throttling, and pre‑fetching techniques.

The Q&A section reinforces these solutions, covering topics such as emergency JS‑based static blocking, service exposure methods (HTTP/2, custom RPC), MQ persistence, Lua‑based template compilation, and the rationale for choosing JIMDB over alternatives.

distributed systemsbackend architectureHigh Availabilitycachingnginx luajimdbproduct detail page
High Availability Architecture
Written by

High Availability Architecture

Official account for High Availability Architecture.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.