This challenge builds on Social Feed 2 - Going Viral. Complete it first for the best experience.
Chirper is now a global platform with 500 million users across 100+ countries. It has evolved beyond text to support images and short video clips (up to 60 seconds). Key challenges:
- Media pipeline - users upload images and videos that need to be transcoded into multiple resolutions/formats, stored durably, and served via CDN. The system processes 2 million media uploads per day.•Content moderation - AI-based screening must flag harmful content within 30 seconds of upload, before it appears in anyone's feed. False positive rate must be < 1%.•Global latency - users in any country should see their timeline within 200 ms. This requires multi-region data centers with intelligent routing.•Data sharding - the post database has grown to petabytes. Determine an effective sharding strategy.•Observability - with hundreds of microservices, you need distributed tracing, metrics, and alerting to keep the platform healthy.
Scale to 500 M users, add video/image uploads, content moderation, and multi-region deployment. Build this architecture under realistic production constraints, then validate tradeoffs in the design lab simulation.
Request path: The solution keeps ingress, service logic, and stateful dependencies separated so each layer can scale independently.
Reference flow: Web Clients -> DNS -> CDN Edge -> Load Balancer -> Core Service -> Primary NoSQL DB -> Replica SQL DB -> Message Queue