Scaling Haier’s E‑Commerce: SOA, Dubbo, and a High‑Performance Product Query Engine
Facing massive traffic spikes during events like Double‑11, Haier’s e‑commerce platform adopted a SOA architecture built on Dubbo, designed a flexible product service with a DSL‑driven query engine, and achieved high performance, linear scalability, and extensibility across diverse product categories.
SOA Architecture on the Shoulders of Giants
As e‑commerce traffic and sales grow exponentially, Haier adopted a Service‑Oriented Architecture (SOA) to keep the system clear and logical. By encapsulating services and separating concerns, the platform achieves high scalability and easier business adjustments.
Dubbo, an open‑source RPC framework from Alibaba, serves as the core of Haier’s SOA. Service providers register with a registry, maintain long‑living connections, and consumers obtain the provider list from the registry, then call services directly, avoiding bottlenecks. Load‑balancing and fault‑tolerance are handled by the consumer side, while a monitoring center records call statistics.
Balancing Product Service Design
Challenges
High load: product retrieval accounts for a large share of traffic, especially during peak events, requiring high availability, performance, and scalability.
Great product diversity: different categories have varied attributes, demanding a flexible and generic data model.
Comprehensive search and sorting: users need fast, multi‑dimensional search, including keyword, category, and attribute filters, sometimes with complex combination logic and real‑time analytics.
Static page generation reduces backend load but sacrifices control for advanced personalization; therefore Haier focuses on improving service performance and scalability.
Solution
At the database layer a fine‑grained relational model stores complex product data, while a simple logical model is exposed to clients via a domain‑specific language (DSL).
The DSL resembles SQL WHERE clauses, easy for developers to use. Clients send DSL expressions to the server, which compiles them into an abstract syntax tree (using Antlr), executes matching, and applies a smart ranking engine based on a product competitiveness model. Results are assembled according to requested fields.
Product data is cached in memory; updates are pushed via MQ messages to keep the cache fresh.
Product Service Architecture
Services are deployed in separate clusters for web and internal use, eliminating database pressure even under extreme traffic. Adding servers to the web cluster during peaks achieves linear scalability.
Results
Performance: peak 260 million requests per day, average 60 ms per request.
Scalability: near‑linear scaling without additional design for performance bottlenecks.
Generality: the logical model can be reused for internal management systems and other online services.
Extensibility: decoupling the logical model from the physical schema reduces maintenance effort.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
21CTO
21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
