Storypilot
Personalized Video Feeds
A backend system design for delivering personalized video content at scale.
Built to handle 3,000 requests per second with sub-250ms latency while maintaining privacy and multi-tenant flexibility.
The Problem
Traditional video feed platforms show the same content to every user. This leads to low engagement, poor user experience, and missed opportunities for content creators to reach their target audience.
The Solution
A personalization engine that analyzes user behavior (watch history, engagement) and serves tailored content to each individual. Built with scalability, privacy, and flexibility as core principles.
Non-Negotiable Constraints & Solutions
Each constraint is met through specific architectural decisions. Click to learn more.
Scale
Peak 3,000 RPS to feed endpoint
Average ~600 RPS
How we achieve it:
Redis caching (95%+ hit rate), stateless horizontal scaling, database sharding
Latency
p95 < 250ms
p99 < 600ms for 20-item feed
How we achieve it:
Aggressive caching (60s TTL), pre-computed user signals, optimized database queries
Freshness
New content visible in ≤60s
User signals lag ≤5 minutes
How we achieve it:
60s cache TTL for feeds/videos, 5min TTL for user signals, async event processing
Privacy
Hashed user IDs only
90-day data retention
How we achieve it:
SHA-256 hashing in SDK, no PII in VNet, TTL-based retention, encrypted at rest
Multi-Tenant
120 tenants supported
Per-tenant ranking weights
How we achieve it:
Tenant-scoped configs in DB, customizable ranking weights, isolated data partitions
Rollout
Feature flag control
Safe kill switch to fallback
How we achieve it:
3-level flags (global/tenant/percentage), instant kill switch, graceful fallback
Explore the Design
Architecture →
System components, data flows, and caching strategy
API Contract →
Endpoint specifications, request/response schemas, and examples
Data Model →
Database schemas, indexes, and retention policies
Implementation →
Technical decisions, trade-offs, and future improvements
Rollout & Observability →
Feature flags, monitoring, and gradual deployment strategy
AI Usage →
How AI tools were used in this project and lessons learned