🔥 0
0
Lesson 6 of 6 15 min +225 XP

🧠 Sharding Assessment

Answer all questions to complete the quiz and earn 225 XP.

1

Your e-commerce platform has 50 million users and 500 million orders. You want to shard the orders table. What's the best shard key?

2

You're using consistent hashing with 8 shards. You need to add 2 more shards. Approximately what percentage of data needs to move?

3

A social media app shards user posts by user_id. An admin needs to find all posts containing 'offensive keyword'. How should this be implemented?

4

Your sharded database has 16 shards. You notice Shard 7 has 3x more data than other shards. What's the likely cause?

5

You need to implement a global leaderboard showing top 100 players across all shards. With 50 shards, what's the minimum data you need to fetch?

6

Your orders table is sharded by user_id. You need to JOIN orders with products (not sharded). What's the best approach?

7

A messaging app shards conversations by conversation_id. Users can be in multiple conversations across different shards. How do you show 'all my conversations'?

8

During peak traffic, your sharded database sees this pattern: Shard 1: 1000 QPS, Shard 2: 950 QPS, Shard 3: 8500 QPS, Shard 4: 1050 QPS. What happened?

9

You're designing a multi-tenant SaaS. Each tenant has 100-100,000 users. What shard key strategy works best?

10

Your sharding setup uses modulo hashing. You have 4 shards and need to add capacity. Which change requires the LEAST data movement?

11

A reporting team needs daily aggregates: total orders, revenue by category, orders by region. The operational database is sharded. What's the best architecture?

12

After implementing sharding, developers complain that foreign key constraints no longer work across tables. Why?