VIP 👤
🏠 হোম
বেঞ্চমার্ক
📊 সমস্ত বেঞ্চমার্ক 🦖 ডাইনোসর v1 🦖 ডাইনোসর v2 ✅ টু-ডু লিস্ট অ্যাপস 🎨 সৃজনশীল ফ্রি পেজ 🎯 FSACB - চূড়ান্ত শোকেস 🌍 অনুবাদ বেঞ্চমার্ক
মডেল
🏆 সেরা ১০টি মডেল 🆓 ফ্রি মডেল 📋 সমস্ত মডেল ⚙️ কিলো কোড
রিসোর্স
💬 প্রম্পট লাইব্রেরি 📖 এআই গ্লসারি 🔗 দরকারী লিঙ্ক 🔌 AI API ও রাউটার
Advanced

Horizontal Sharding Strategy for Social Graph

#database #sharding #scalability #sql

Develop a sharding strategy for a social media platform's database.

You are the Database Architect for a rapidly growing social network with 500 million users. The current monolithic Postgres instance is hitting I/O limits. Propose a horizontal sharding strategy for the 'Users', 'Posts', and 'Follows' tables. Your solution must address: 1. Choice of shard key and justification (e.g., hash-based vs range-based). 2. How to handle 'fan-out' queries (retrieving a user's timeline) efficiently across shards. 3. Strategies for rebalancing data when adding new nodes to the cluster with minimal downtime. 4. Handling cross-shard transactions for operations like sending a message.