VIP 👤
🏠 Início
Avaliações
📊 Todos os Benchmarks 🦖 Dinossauro v1 🦖 Dinossauro v2 ✅ Aplicações To-Do List 🎨 Páginas Livres Criativas 🎯 FSACB - Showcase Definitivo 🌍 Benchmark de Tradução
Modelos
🏆 Top 10 Modelos 🆓 Modelos Gratuitos 📋 Todos os Modelos ⚙️ Kilo Code
Recursos
💬 Biblioteca de Prompts 📖 Glossário de IA 🔗 Links Úteis 🔌 APIs e roteadores
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.