How Kuaishou’s Tianshou Platform Scales Front‑End Quality for Billions of Users

The article reviews the evolution of Kuaishou's Tianshou front‑end quality assurance platform, its layered architecture, distributed scheduler, quality models, measurement functions, DMAIC process, and lessons learned in scaling to billions of DAU, offering a blueprint for building robust front‑end engineering systems.

Kuaishou Frontend Engineering
Kuaishou Frontend Engineering
Kuaishou Frontend Engineering
How Kuaishou’s Tianshou Platform Scales Front‑End Quality for Billions of Users

Context

“Tianshou” is a front‑end engineering quality diagnosis platform created by Kuaishou’s main site technical department. By the end of 2024 it merged with the commercial department into the “Qingluan” platform, a white‑box solution for large‑scale front‑end metric diagnosis.

Design Overview

The platform is built on a layered architecture with a distributed scheduling engine. It separates concerns into user‑facing layers (Web UI, CLI, pipeline plugins), control layers (API server, task controller, task scheduler, database) and worker nodes that execute measurement functions.

Quality Model & Measurement Functions

A quality model aggregates weighted indicators to evaluate architecture features such as maintainability, reliability, security, and performance. Measurement functions ingest project metadata, source code, and build artifacts, then output scores, issue lists, and improvement suggestions.

Examples of measurement function categories include trigger‑based vs. continuous, static vs. dynamic, temporary, and domain‑specific functions.

import { BaseScanner, type Issue, type ScanOptions } from '@sky-dmaic/core'

export default class YourScanner extends BaseScanner {
    scan(options: ScanOptions): Promise<Issue[]> | Issue[] {
        const issueList: Issue[] = [];
        // TODO: implement scanning logic
        return issueList;
    }
    calculate(issueList: Issue[], options: ScanOptions): number {
        // TODO: scoring logic [0,100]
        return 0;
    }
    suggest(issueList: Issue[], negativeScore: number): string {
        // TODO: improvement suggestions
        return 'Your suggestions';
    }
}

DMAIC Model

The platform adopts the Six Sigma DMAIC (Define, Measure, Analyze, Improve, Control) cycle to continuously improve quality. It defines problems, measures metrics, analyzes root causes, implements improvements, and establishes controls.

Task Scheduling Engine

The scheduler follows a declarative design inspired by Kubernetes. It assigns ready tasks to the least‑loaded worker nodes, supports horizontal scaling, and isolates scheduling logic from task execution.

Worker nodes run tasks in isolated processes.

Task controller creates tasks and tracks dependencies.

Scheduler dispatches tasks based on resource status.

Key Lessons

Early prototype design enabled smooth evolution despite major refactors.

Clear, open API contracts fostered community contributions (≈50% of measurement functions are user‑contributed).

Maintaining pure declarative scheduling reduces hidden complexity.

Future Direction

The next generation, “Qingluan”, inherits Tianshou’s core principles while extending capabilities for AI‑driven analysis and broader engineering governance.

Architecture diagram
Architecture diagram
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.

architecturescalabilityMetricsquality assurancedmaic
Kuaishou Frontend Engineering
Written by

Kuaishou Frontend Engineering

Explore the cutting‑edge tech behind Kuaishou's front‑end ecosystem

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.