Infrastructure Costs Analysis for Social Platforms
Original Thread
Thanks for the thoughtful question, let's brainstorm a bit while I'm getting bored waiting for my doctor. Reddit definitely masuk karena usage patternnya typical web app yang mana reads itu 100x lipat lebih frequent dibanding writes. WhatsApp is slightly different karena 1️⃣ butuh realtime broadcast dan 2️⃣ nature messagingnya peer to peer.
Typically ini butuh server yang buka & maintain live connection ke clients, serta routing messages dari satu koneksi ke koneksi lain, dan most likely antar server juga.
Back of napkin calc, a standard 128 vCPU w/ 512GB RAM cloud instance that costs $3600/month should be able to reliably manage & route about 20K live concurrent connections at any given time.
Assuming a 50% load factor is realistic because users kept their app on in the background most of the time, all the above translates to 9¢/user/month estimates, which sounds about right. (i.e., more expensive than the 5¢/user/month standard, but not outrageously so)
Actual WhatsApp servers would of course be managed and operated by Meta directly instead of using someone else's cloud, and can therefore be 1-2 orders of magnitude cheaper.
Now let's check Twitter. The proportion of writes to reads should be close to 100:1 like what Reddit typically faces, but they also have the need to do message fanouts within seconds like in WhatsApp's case, and in some cases the scale of the fanouts can be much more extreme. (Tens of thousands of Twitter followers instead of 256 max for a WhatsApp group)
There are also tons of analytics that Twitter needs to compute and serve, complicating the situation. I would say they're kinda having the worst of both worlds in terms of tech complexity, so I'll ballpark their cost/user to be Reddit + WhatsApp combined. (5¢+9¢ = 14¢/user/month)
Most live streaming products are utilizing existing livestream infra providers instead of homebuilt. I have to go to see the doctor now, but Akamai is one popular provider and we can check their pricing later on in the following posts.
— Ibrahim Arief (@ibamarief) · June 13, 2024
In response to:
Wah mantep banget, thank you! Kalau use case yg heavy dengan user-generated content (but mostly texts) kayak WhatsApp/Twitter/Reddit masih masuk 5cents? Additionally, kalau datanya mulai ada streaming audio/video kyk Tiktok Shop etc how much more infra cost should we expect?
Stats:
- 3 replies
- 30 reposts
- 199 likes
- 179 bookmarks
- 30.4K views
AI Summary
This comprehensive thread analyzes infrastructure costs for different social media platforms, breaking down the technical requirements and associated costs per user. The analysis covers:
- Reddit's read-heavy pattern (100:1 read/write ratio)
- WhatsApp's real-time messaging infrastructure ($0.09/user/month)
- Twitter's hybrid challenges combining high read/write ratios with massive fanout requirements ($0.14/user/month)
- Brief mention of live streaming platforms using third-party providers like Akamai
The thread provides detailed technical insights and cost estimates based on cloud infrastructure requirements, making it valuable for understanding scaling costs in social platforms.
Keywords
- Infrastructure Costs
- Cloud Computing
- Social Platforms
- Scalability
- Real-time Communication
- User Engagement
- System Architecture
- Performance
- Cost Analysis
- Technical Infrastructure