Designing Ctrip's Mobile Continuous Delivery Platform: Integration, Testing, Release, and Operations
This article details Ctrip's engineering practice of building a mobile continuous delivery platform that automates integration, testing, release, and operation of hundreds of native, hybrid, and React‑Native bundles, addressing scalability, efficiency, and quality challenges through message‑driven architecture, bundle splitting, automated testing, and gray‑release strategies.
Author Introduction Liu Lifeng, senior manager of Ctrip's wireless infrastructure engineering team, leads the development of the wireless delivery platform and core services, bringing over a decade of internet experience from companies such as eBay.
Background Most of Ctrip's orders now come from mobile apps, which host over 90 native bundles, 100 hybrid bundles, and 30+ React Native bundles. Hundreds of engineers deliver more than 4,000 app packages per month, with over 500 releases across Hybrid/ReactNative/HotFix/Bundle.
Need for a Platform Without an effective wireless continuous delivery platform, large‑scale integration and release cannot be completed within three days. Existing open‑source tools (Fastlane, TestFlight, Jenkins) required heavy customization, prompting Ctrip to build a platform from scratch.
1. Integration Platform
• 1.0 Phase : Manual Jenkins‑based packaging, heavy human involvement, long release cycles, and full‑code checkout for each build caused low efficiency.
• 2.0 Phase : Introduced the MCD (Mobile Continuous Delivery) concept, automating scheduled builds, allowing developers and testers to fetch packages via links or QR codes, and centralizing feedback.
Improvements included a message‑driven architecture to replace polling, and splitting the codebase into independent bundles to enable parallel builds and faster packaging.
2. Testing Platform
Challenges identified were conflicts between rapid verification and manual checks, inefficiencies in automated regression versus manual testing, and device scarcity. The solution added:
White‑screen detection for quick UI validation.
Automated regression testing covering Android, iOS, HTML5/Hybrid apps.
Portal for user interaction and reporting.
Invoker as the scheduling gateway.
Lab Center integrated with the open‑source STF device‑farm for device sharing.
The platform supports automated white‑screen tests, regression suites, and manual remote testing, and integrates a device‑sharing service to alleviate hardware shortages.
3. Release Platform
Focuses on static resource packages (Hybrid, React Native, HotFix, Bundle). Release strategies evolved from full‑package deployment to file‑string diff, binary diff (using bsdiff), and finally on‑demand diff that delivers only the necessary incremental updates after comparing client and server versions.
Gray‑release workflow includes a whitelist‑based rollout, monitoring download metrics, and safeguards such as modulo‑based user selection to avoid over‑exposing a single user as a test subject, as well as targeted rollback for only the affected clients.
4. Operation Platform
Provides centralized dashboards for operation, performance, and release monitoring, as well as dynamic configuration management (version, platform, channel, A/B) with separate dedicated and generic config packages. Crash management is built in, enabling rapid HotFix/Bundle deployment after issue detection.
Conclusion The MCD platform supports the full lifecycle of mobile app delivery at Ctrip, delivering integration, testing, release, and operation capabilities. While significant progress has been made, further work remains in multi‑app support, conditional releases, and continuous improvement of the wireless delivery pipeline.
Ctrip Technology
Official Ctrip Technology account, sharing and discussing growth.
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.