Evolution of Ctrip’s Office IM and the Architecture of the TripPal Open Platform
This article chronicles the development of Ctrip’s internal office IM from its 2016 inception to the current TripPal open platform, detailing its architectural evolution, high‑availability and performance optimizations across gateway, identity, microservice, and IM layers, and outlines future directions for open‑platform services.
Jim, a senior R&D manager at Ctrip, introduces the background of Ctrip's internal office IM project, which started in 2016 and has evolved from a simple IM service to an integrated open‑platform for enterprise efficiency.
What is IM
Instant Messaging (IM) provides real‑time message transmission over the network, becoming essential in the mobile‑Internet era and a core requirement for most large‑scale internet applications.
Development History
Early on, Ctrip used Microsoft Lync and a self‑developed IM tool CtripTeam, which suffered from maintainability and scalability issues. Around 2017, the Cchat project based on ejabberd+Erlang was created, integrating IM with office functions such as phone, leave requests, attendance, and OA.
In 2019, the TripPal transformation project was launched to build a mini‑program platform and service accounts, laying the foundation for subsequent derivative services. By mid‑2020, the platform shifted toward an open architecture to support external scenarios, raising new challenges for architecture, security, and scalability.
TripPal Open Platform Practice
3.1 Overall Architecture
3.1.1 Gateway Layer
Service routing
Centralized rate‑limiting, risk control, and logging
Identity Service (IDS) verification and header propagation of user ID and token
3.1.2 IDS (Identity Service)
Supports multiple token types, issues tokens, and provides RBAC‑based interface permission control. Two authentication modes for open mini‑programs are offered: standard OAuth third‑party integration and OAuth + platform signature.
3.1.3 Microservice Layer
Three categories of microservices:
Internal TripPal platform services (access after authentication)
Open APIs for external consumption (OAuth + RBAC)
First‑party mini‑program backend services (OAuth + module permissions)
Currently 28 core microservices serve over 500 business applications, with more than 20,000 daily active C‑side users and billions of daily requests.
3.2 IM Service
The IM service is a fully self‑developed Java‑based system following an ejabberd‑style architecture and using the XMPP protocol for communication.
Extensive optimizations have been made at the database, transport, and core messaging layers, migrating the transport stack from Erlang to Java, which improved reliability, elasticity, security, and performance.
3.3 Derived Services
Smart Approval Platform
Integrates Ctrip’s native approval system with a custom configuration service, allowing users to define complete approval flows.
Role Service
Provides flexible role definition, dynamic management, and automatic integration with the approval platform.
The service defines four core concepts: Scope, Base Role, Fixed Role, and Abstract Role, each with specific management models.
Online Document Service
Offers real‑time collaborative editing using CRDT algorithms for conflict‑free merging and ensures high availability and fault tolerance, allowing offline work even when the server is down.
High‑Availability Practice
TripPal is deployed across three data centers (one public cloud, two private clouds). The architecture follows a multi‑region deployment with cross‑region DRC for data, enabling service continuity even if any two data centers fail.
Future Architecture and Evolution
The platform aims to simplify developer onboarding through front‑end trust, low‑code, and Serverless solutions, while enhancing user experience, data security, and service discovery. Standardization and interoperability across open platforms are also highlighted as long‑term goals.
Conclusion
The IM open platform provides core capabilities of service integration, open application access, high performance, and high availability, forming a solid foundation for Ctrip’s enterprise efficiency ecosystem.
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.