Architecture Practices for Recommendation Feed Systems in Video Content Communities
This article describes the system architecture of a recommendation feed for a video content community homepage under high-concurrency reads, multi-source data fusion, strict real-time requirements, and strong safety constraints. It covers scenario abstraction and design goals, layered architecture and request/data flows, content entity and card protocol modeling, multi-route recall, ranking and reranking, real-time features and cache consistency, moderation and compliance, experimentation and observability, capacity governance, degradation, disaster recovery, and an engineering checklist. Readers can learn how to build a stable, controllable, observable recommendation feed through coordinated data modeling, recall coverage, ranking and reranking, safety filtering, cache consistency, canary releases, and closed-loop experimentation rather than relying on a single ranking model.
1. Scenario Abstraction and Design Goals
The homepage recommendation feed of a content community is a typical system with high-concurrency reads, multi-source data fusion, strict real-time requirements, and strong safety constraints. The page usually includes top channel navigation, entries such as messages and favorites, recommendation content cards, a live entry, series content updates, campaign operation slots, and a creator entry. Within a limited request time, the system must complete candidate generation, filtering, ranking, reranking, and card assembly while ensuring content safety, fairness in the author ecosystem, user experience diversity, and multi-client consistency.
The design goals can be summarized as relevance, timeliness, diversity, controllability, stability, and observability.
- Relevance: user interests and content must match.
- Timeliness: new content and live streams must enter the feed promptly.
- Diversity: excessive concentration of the same author or the same channel should be avoided.
- Controllability: operations pinning, frequency control, blocking, and takedown must be supported.
- Stability: when dependencies fail, the system should still return a usable feed.
- Observability: recall misses, feature delays, ranking anomalies, and moderation blocks should be diagnosed quickly.
Engineering challenges include large content scale, long-tail cold start, real-time feature updates, moderation status propagation, cache consistency, and multi-client protocol compatibility.
2. Overall Architecture and Request Path
The system can be divided by responsibility:
- The access layer handles authentication, rate limiting, parameter validation, and multi-client protocol adaptation.
- The recommendation service orchestrates recall, features, ranking, reranking, and assembly.
- The content service maintains content metadata, author relationships, and series relationships.
- The feature service provides user, content, context, and cross features.
- The model service provides ranking scores.
- The moderation service maintains safety statuses and risk labels.
- The experimentation platform handles bucketing and configuration.
- Logging and monitoring handle behavior logs, trace tracking, and alerts.
The request path is as follows: the client carries a user identifier, cursor, channel, device, and network context; the access layer validates the request and calls the recommendation service; the recommendation service runs parallel multi-route recall and applies unified deduplication and filtering; the feature service fills in real-time features; the ranking model outputs multi-objective scores and performs calibrated fusion; the reranking layer applies diversity, frequency control, pinning, and seen-content filtering; the assembly layer converts content entities into card views and writes a pagination cursor; the cache layer stores hot results and content details; before returning the response, the system performs safety fallback and degradation checks.
The data path is as follows: after content ingestion, content goes through moderation, content understanding, tag and vector generation, and index construction; behavior logs flow back for feature updates, model training, and metric statistics; content change events are propagated through a message queue and trigger index updates and cache invalidation.
3. Data Modeling and Card Protocol
Content entities and card views should be separated. A content entity describes stable attributes: content identifier, media type, title, cover, duration, author, channel, publish time, series relationship, statistics, safety status, and takedown status. A card view describes fields required for page display: card type, jump parameters, display copy, interaction count display strategy, duration format, live status, campaign badge, and creator entry marker.
Multi-channel navigation is an independent configuration entity that supports channel order, icons, default filters, and canary strategies. Live cards need fields such as status, start time, and room identifier; series content needs update episode counts and follow relationships; campaign slots need configurable assets and effective time. Protocol design should follow backward compatibility: new fields are optional, enum values are extensible, and clients ignore unknown fields. Card assembly should not directly expose internal features, so as to avoid leakage and coupling. An illustrative pseudocode example is shown below:
function buildFeed(user, context):channels = loadChannelConfig(context.channel, context.client)candidates = multiRecall(user, context, channels)candidates = filter(candidates, safety, downrank, block, seen)features = joinFeatures(candidates, user, context)scores = rank(features)ranked = fuse(scores, calibration)final = rerank(ranked, diversity, frequency, pinned, exploration)return assembleCards(final, cursor)
An example card is shown below:
{"card_type": "content","content_id": "c_001","media_type": "video","title": "Sample title","cover_ref": "cover_ref_001","duration_sec": 120,"author_ref": "author_001","channel_id": "ch_01","stats": {"play": 0, "like": 0},"safety_status": "reviewed","jump_params": {"page": "detail"}}
The fields above are illustrative only; the actual protocol depends on the business contract.
4. Multi-Route Recall Design
The recall layer aims to improve relevant candidate coverage at controllable cost. Common routes may include interest recall, trending recall, subscription or follow recall, series update recall, live recall, regional and freshness recall, cold-start recall, and exploration recall. Each recall route needs quotas, timeouts, and degradation. Recall results are unified and deduplicated by content identifier, author identifier, and topic tag. Content that fails moderation, has been taken down, is blocked by the user, has been seen, or violates frequency control should be filtered out.
More recall is not always better: too many candidates increase feature and ranking costs, while too few candidates can hurt diversity. In engineering practice, parallel recall, per-route timeouts, result merging, and fallback recall can be used. For long-tail content, content understanding tags and vector similarity can be used for expansion. For new content, small-traffic exploration can be used and feedback should be recorded. Recall quality should be observed through coverage, deduplication rate, moderation interception rate, downstream ranking benefit, and diversity metrics. Recall misses also need to be handled: each route’s latency, return volume, filtered volume, and degradation status should be logged for diagnosis.
5. Ranking and Reranking
The ranking layer is usually divided into coarse ranking and fine ranking. Coarse ranking uses lightweight features to quickly reduce candidates, while fine ranking uses richer features to predict objectives such as clicks, duration, interactions, and negative feedback. Multi-objective fusion needs calibration to avoid inconsistent scales across objectives. Negative feedback should be treated as a constraint or penalty, and signals such as reports, blocks, and “not interested” should carry high weight.
The reranking layer is responsible for business and experience constraints: limiting consecutive exposure of the same author, controlling the share of the same channel, mixing media types, controlling duration distribution, filtering seen content, applying frequency control, and inserting pinned items and campaign slots. Reranking also needs to consider position bias and exposure fairness to avoid the strong getting stronger. Quotas, rotation, and exploration mechanisms can give small creators and fresh content opportunities. Rule interventions must be configurable, auditable, and rollback-capable to avoid online incidents caused by hard coding. There should be a clear score and rule interface between ranking and reranking. Rules should not directly modify internal model features, so as to preserve explainability and rollback capability.
6. Real-Time Features and Cache Consistency
Features are divided into user features, content features, context features, and cross features. Real-time features include recent interactions, real-time popularity, live status, content moderation status, and session context; offline features include long-term interests, author quality, and content tags. The feature service must ensure time consistency, and feature definitions used in training and inference must be consistent to avoid feature leakage.
Caching is layered: client and edge caches are used for static resources and channel configuration; server-side local caches are used for hot configuration and blocklists; distributed caches are used for hot feed results, content details, and features. Cache consistency is critical for content changes: moderation status, takedown, title and cover modifications, and live start or stop must trigger invalidation through event propagation. A pagination cursor should be bound to a result version to avoid duplicates or omissions when content changes during paging. Cache can only accelerate access and cannot be the only data source; after a cache hit, safety fallback and takedown filtering are still required. During degradation, the system can fall back to trending, subscription, or editor-selected results and mark the degradation source.
7. Moderation, Safety, and Compliance
Content safety is a precondition for the recommendation feed. The process includes content ingestion validation, machine moderation, human review, risk labels, takedown, and appeal rollback. The recommendation service only consumes safety status and does not determine content compliance by itself. Content under review should have exposure limited according to policy, and high-risk content should be filtered immediately with cache invalidation triggered.
On the user side, block, report, “not interested,” and negative feedback entries are required, and feedback should enter real-time features and the moderation queue. Compliance also involves minor protection, privacy minimization, log redaction, and audit trails. Safety policies should be configurable, canary-ready, and rollback-capable to avoid one-size-fits-all impacts on normal content. Moderation status propagation delay should be monitored to prevent taken-down content from continuing to be exposed through caches.
8. Experimentation, Observability, and Capacity Governance
The experimentation system uses bucketing and layered experiments to ensure that the same user is stably bucketed across different experiments. Experiment metrics include click-through rate, completion rate, consumption duration, interaction rate, negative feedback rate, diversity, moderation interception rate, API latency, and degradation rate. The observability system includes end-to-end trace tracking, latency and return volume for each recall route, feature missing rate, ranking score distribution, reranking rule hit rate, cache hit rate, error codes, and timeout rate. The logging service collects behavior and trace logs, and monitoring alerts set thresholds based on SLOs. Data quality validation covers feature delays, content status inconsistency, and experiment traffic anomalies.
Capacity governance focuses on hot events, live starts, and campaign peaks. Stability can be improved through rate limiting, circuit breaking, timeout budgets, asynchronous processing, and warm-up. Any model or rule launch should support canary release, rollback, and shadow evaluation.
9. Degradation, Disaster Recovery, and Engineering Checklist
Degradation strategies are layered by dependency: recall failure falls back to trending or subscription; feature service timeout uses cached features or default values; ranking failure falls back to rule-based ranking; reranking failure applies only safety filtering; cache unavailability queries the content service directly but requires rate limiting. The timeout budget is allocated from the entry point downward to avoid a single dependency dragging down the whole system. Circuit breaking and rate limiting protect downstream services, and degradation results should be marked with their source in the response for observability.
The engineering implementation checklist includes API contracts and version compatibility, idempotency and retry boundaries, cursor pagination and deduplication, content state machines, cache invalidation events, configuration auditing, canary switches, load testing and fault drills, data redaction and permission control, and online incident rollback plans.
In summary, the core of a recommendation feed system for a video content community is not a single ranking model but systems engineering that covers data modeling, recall coverage, ranking and reranking, safety filtering, cache consistency, and observability. Only by implementing configuration, canary release, degradation, and a closed experimentation loop can the system reliably deliver a high-quality feed under high concurrency and strong safety constraints.
