Cloud Native 10 min read

Tencent Docs Leveraging Serverless Architecture for Scalability and Efficiency

Tencent Docs was completely rebuilt on a modular, serverless architecture that integrates micro‑services such as SSR, OCR and plugin back‑ends, enabling automatic scaling for traffic spikes, versioned gray releases, pay‑per‑use cost savings, and faster development cycles for its tens‑of‑millions‑user base.

Tencent Cloud Developer
Tencent Cloud Developer
Tencent Cloud Developer
Tencent Docs Leveraging Serverless Architecture for Scalability and Efficiency

In recent years, a wave of document‑oriented SaaS products has emerged in China. Tencent Docs, originally an online document module of the TIM collaboration IM, grew from an open‑source‑based architecture that eventually could not meet rapid business growth and accumulated technical debt.

The team decided to rebuild the system from the ground up, modularly refactoring the entire technical stack and exploring mature industry solutions. Various micro‑services (image recognition, SSR, screenshot, document preview, etc.) were integrated, and the team began to adopt Tencent Cloud Serverless architecture to achieve scalability, maintainability, and reduced development cost.

Scenario 1 – Handling Traffic Peaks and Valleys – Office‑type products exhibit clear traffic tides. Traditional VM‑based scaling requires hours of provisioning, which cannot match rapid traffic spikes. Serverless functions automatically allocate execution environments based on load, providing dynamic scaling and pre‑warmed instances to eliminate cold‑start latency.

Scenario 2 – SSR Front‑End Rendering – With tens of millions of monthly active users, direct HTML rendering in the browser caused high server CPU usage and slow first‑paint times. By encapsulating SSR logic in Serverless functions, front‑end developers no longer need to manage server deployment, operation, or scaling, greatly reducing operational overhead.

Scenario 3 – OCR Image Recognition for Slides – External OCR services only accept server‑side requests. The team wrapped the OCR API with a Cloud Function (SCF) to proxy requests, removing the front‑end limitation and saving backend development resources.

Scenario 4 – Plugin Center – Third‑Party Service Integration – The original Plugin 1.0 tightly coupled with the front‑end SDK, leading to technical debt. Plugin 2.0 shifts integration to the backend via Cloud Functions, providing service isolation, versioned upgrades, and reduced coupling.

Scenario 5 – Gray Release & Environment Isolation – To ensure stability during version rollouts, the team uses Cloud Function versioning for gradual traffic shifting and isolates test and production environments via API gateway routing.

Benefits of the Serverless Approach

• Improved Development Efficiency : CI/CD pipelines trigger automatic deployment; developers focus on business logic while the platform handles logging, monitoring, gray release, and rollback.

• Cost Savings : Pay‑per‑use billing with millisecond granularity eliminates idle resources and reduces infrastructure costs.

• High Flexibility : Multi‑version support enables customized processing and easy coexistence of different service versions.

• Accelerated Business Iteration : Reduced operational burden allows teams to quickly validate features and iterate on the product.

Overall, Serverless solutions have become the preferred architectural choice for Tencent Docs, enabling rapid development, low‑cost deployment, and the ability to respond swiftly to unexpected events while supporting future micro‑service expansion.

backendfrontendserverlessMicroservicesscalabilityCloud FunctionsTencent Docs
Tencent Cloud Developer
Written by

Tencent Cloud Developer

Official Tencent Cloud community account that brings together developers, shares practical tech insights, and fosters an influential tech exchange community.

0 followers
Reader feedback

How this landed with the community

login 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.