Improving L‑D Stage Smoothness and Refactoring the Rebuild System for International Hotel Pricing

This article details how the L‑D stage of international hotel pricing was optimized through a new offline‑fetch scheduling mechanism, cache‑freshness calculations, and a comprehensive refactor of the rebuild system, resulting in lower latency, higher throughput, and a smoother user experience.

Qunar Tech Salon
Qunar Tech Salon
Qunar Tech Salon
Improving L‑D Stage Smoothness and Refactoring the Rebuild System for International Hotel Pricing

In continuation of the previous article on improving the L‑D stage smoothness, this piece explains the concrete actions taken to enhance the quoting process for international hotels.

(2) Offline Quote Fetch Scheduling Redesign

We introduced the concept of cache freshness (the time difference between quote usage and the last fetch) and linked it to cache time , which is controlled by the fetch frequency. Factors such as city/hotel popularity and agent differences affect cache time, guiding QPS allocation toward hotter quotes.

Weighted search volume is calculated as

past_n_days_searches × weight1 + past_1_day_searches × weight2

, and QPS for each minimal dimension is derived from the proportion of its search count to the total search volume.

With a reasonable cache time, an offline fetch mechanism updates quotes when the cache expires, completing the cache‑time closed loop.

(3) Rebuild System Refactor

The original rebuild system handled three main functions: processing quote counts, computing the lowest hotel‑level price for sorting, and filtering/packaging/pricing of base quotes. These functions were split across physical clusters, causing load spikes and GC pressure after the new scheduling was deployed.

To address the bottlenecks, we replaced the hotel‑level quote cache with a wrapper‑level cache, separating responsibilities and simplifying the processing pipeline. This change enables parallel reads of wrapper quotes, reduces payload size, and cuts serialization/GC overhead.

After the refactor, the new virtual‑machine cluster (20 nodes) handles 17k quote‑count messages with ample headroom, while latency improves dramatically (P95 from 80 ms to 35 ms, average from 30 ms to 10 ms). The codebase shrank from 1001 files to 171.

Overall, the combined efforts raised the international hotel service smoothness to 87%, significantly enhancing the Qunar user experience. The next article will discuss post‑sale service improvements.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

BackendperformanceSystem DesigncachingSchedulingrefactoring
Qunar Tech Salon
Written by

Qunar Tech Salon

Qunar Tech Salon is a learning and exchange platform for Qunar engineers and industry peers. We share cutting-edge technology trends and topics, providing a free platform for mid-to-senior technical professionals to exchange and learn.

0 followers
Reader feedback

How this landed with the community

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.