Content Column System Architecture and Practices for a Danmaku Video Community Platform

    This article describes a general architecture and key engineering practices for building a content column system in a video community. It covers business characteristics, layered architecture, content modeling and rich-text storage, content safety filtering, distribution and caching, interaction design, and stability and observability. Readers can learn how structured content models, multi-level caching, asynchronous processing, and layered moderation support UGC publishing, review, distribution, and engagement.

    In video content communities, text-and-image columns are an important content format for creators, in addition to videos themselves. A typical column system needs to support the full chain of content creation, publishing review, distribution and recommendation, and interactive comments. From a technical perspective, this article outlines the general architecture design and key practices for such systems.

    1. Business Characteristics of a Column System

    Compared with an ordinary CMS, a column system has several notable differences:

    1. Strong UGC attributes: Content is generated by users, and quality varies widely, so comprehensive moderation and risk control mechanisms are required.
    2. Rich media resources: Articles often embed images, video clips, external references, and other multimedia elements, making storage and loading strategies complex.
    3. Long interaction chain: Likes, favorites, comments, danmaku jumps, and other interactions are deeply coupled with the video ecosystem.
    4. Large traffic fluctuations: When high-quality content is recommended, it may produce instantaneous high-concurrency reads, so the system needs elastic scaling capabilities.

    2. Overall Layered Architecture

    A typical layered architecture is as follows:

    • Access layer: The gateway uniformly handles authentication, rate limiting, and routing.
    • Application layer: Content service, moderation service, interaction service, and distribution service are deployed independently.
    • Data layer: A relational database stores metadata, object storage hosts static resources such as images, and a search engine supports full-text retrieval.
    • Middleware layer: Message queues asynchronously decouple the moderation and distribution processes, and cache clusters accelerate reads of hot content.

    This layered design allows each module to iterate and scale independently, reducing system coupling.

    3. Content Model and Rich-Text Storage

    3.1 Content Model Design

    The core metadata of a column article usually includes article ID, author ID, title, summary, cover, status, category tags, creation and update time, and so on. State machine design is especially critical:

    1. Draft → Pending review → Under review → Published / Rejected
    2. ↓
    3. Taken down (compliance handling)

    All state transitions should be validated server-side to avoid privilege escalation risks caused by clients directly driving state changes.

    3.2 Rich-Text Approach Selection

    There are two common approaches in the industry:

    1. Rich-text HTML storage: The editor outputs HTML, and the server performs strict tag whitelist filtering and XSS sanitization before storing it in the storage layer. The advantage is flexible display; the disadvantages are more security risks and poor rendering consistency across clients.
    2. Structured JSON storage: Content is abstracted into paragraph blocks (text blocks, image blocks, video reference blocks, etc.), and the frontend renders according to the protocol. The advantages are good cross-platform consistency and easier content understanding and recommendation feature extraction; the disadvantage is higher editor development cost.

    Mainstream content platforms tend to favor the structured approach because it naturally facilitates machine understanding and can significantly improve recommendation and search results.

    3.3 Content Safety Filtering

    All user-submitted content must go through multiple layers of processing:

    • Text: sensitive word matching + model-based semantic review;
    • Images: OCR recognition + image classification models;
    • Referenced resources: validate the legitimacy of external links to prevent phishing and hotlinking.

    The moderation flow should combine synchronous and asynchronous processing: low-risk content is released synchronously, questionable content enters an asynchronous manual review queue, and the publishing result is notified through a message queue.

    4. Distribution and Caching Strategies

    4.1 Multi-Level Cache

    The read path for hot articles should use multi-level caching:

    1. Client local cache (short TTL, invalidated with a version number);
    2. CDN cache for static resources (images, covers);
    3. Server-side Redis cache for article metadata and rendered structure, with TTL set with random jitter to prevent cache avalanches;
    4. The database as the final data source, with the cache asynchronously refreshed through binlog.
    1. Request → Gateway → Content Service → Redis (hit returns)
    2. ↓ miss
    3. DB query → write back to cache

    4.2 Cache Consistency

    Use the strategy of “update the database first, then delete the cache,” and subscribe to data change events for compensation retries of cache deletion, keeping the inconsistency window at the millisecond level.

    5. Interaction System Design Points

    Likes, favorites, and comments are the core interactions of a column. Design points include:

    • Independent counting service: Like counts and view counts are aggregated by a counting service, with periodic batch persistence to avoid high-frequency writes overwhelming the database;
    • Comments use pagination + floor tree structure: Support pinned hot comments and second-level replies; hot comment ranking usually combines like count, reply count, and a time decay factor;
    • Anti-abuse mechanisms: Combine device fingerprints, behavior frequency, and risk control rules to rate-limit and deduplicate abnormal interactions.

    6. Stability and Observability

    1. Rate limiting and degradation: Set multi-dimensional rate limiting for content detail APIs, and hot articles can return static snapshots;
    2. Capacity elasticity: During distribution peaks, rely on the container platform’s auto-scaling capability to quickly expand capacity;
    3. Full-link monitoring: Integrate logging services and monitoring and alerting systems, covering core metrics such as API latency, cache hit rate, and moderation queue backlog;
    4. Gray release: New features (such as a new editor) are validated gradually through gray rollout to reduce the risk of global failures.

    7. Conclusion

    The technical essence of a column system is the closed loop of “UGC content production—moderation—distribution—interaction.” The core of architecture design is to use a structured content model to support multi-client consistency and intelligent distribution, use multi-level caching and asynchronous methods to handle traffic fluctuations, and use multi-layer moderation and risk control systems to ensure content compliance. This general approach also applies to content sections in various text-and-image communities and knowledge platforms. Developers can tailor modules and middleware choices according to their own business scale.