How MaFengWo Scaled Its Custom Travel Platform with Multi‑Order Grabbing and Real‑Time Matching
The article explains how MaFengWo built a custom travel transaction system that uses multi‑order distribution, a grab‑pool message queue, concurrency‑controlled locking, and long‑connection notifications to efficiently match personalized travel requests with multiple suppliers, boosting conversion rates and platform performance.
Custom travel has become a mainstream model in the tourism industry, driving the need for personalized itineraries that traditional group tours and free‑travel products cannot satisfy. In response, MaFengWo launched a custom travel transaction system in June 2018 that supports multi‑order grabbing, connecting consumers directly with suppliers and travel designers.
The initial one‑to‑one matching approach suffered from human capacity limits and resource control issues, especially during off‑season periods. To address this, the development team introduced a multi‑order system and later added a grab‑pool feature for popular destinations, allowing multiple designers to compete for the same request.
When a user submits a customized travel request—specifying origin, destination, dates, budget, etc.—the system uses algorithmic matching based on user, supplier, and designer attributes. Up to three suppliers can simultaneously propose travel plans, and the user selects the preferred one.
Key benefits of the grab system include increased merchant responsiveness, reduced business‑development workload, higher overall conversion rates, and the ability for suppliers to choose requests that match their strengths.
The core technical design focuses on two aspects: a message queue for the grab pool to handle concurrency, and a notification service to promptly inform designers. The system limits each request to three concurrent designers, with only one designer per enterprise allowed to grab.
Concurrency control is achieved through:
Designer grading and delayed messaging: Designers are classified into levels, and a delayed message bus notifies them according to their grade.
Fine‑grained lock management: The system uses either file locks (Ko_Tool_Lock.php) or Redis locks (Ko->bSetNX) to prevent deadlocks, with automatic expiration and recovery mechanisms.
Message notifications rely on long‑connection technology, delivering real‑time alerts via PC pop‑ups and WeChat template messages. Optimizations include:
Long‑connection reuse across browser tabs, sharing a single connection ID.
Broadcasting messages to all active tabs when a specific tab does not listen.
A retry mechanism that handles network interruptions with exponential back‑off.
Lua coroutines replacing PHP processes to reduce memory consumption for long‑running connections.
In summary, the grab functionality has fostered healthy competition among suppliers, enabled dynamic allocation based on service capacity, and boosted the platform's revenue conversion rate by over 70%. Future plans include expanding the grab model, automating designer rating feedback loops, and further system enhancements.
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.
Mafengwo Technology
External communication platform of the Mafengwo Technology team, regularly sharing articles on advanced tech practices, tech exchange events, and recruitment.
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.
