Skip to content
Tech Interview Prep home
Technical interview guide

Database Scaling (Sharding & Replication)

Splitting data across machines (sharding) and copying it across machines (replication) — solving two different scaling problems.

Read
24 min
Practice MCQs
25
Interview QA
25
Edition
v3
Editorial status
Reviewed

Scope: Vendor-neutral distributed-systems principles; current AWS architecture guidance.

Interview QA

Treat each question like a live interview question: answer out loud first (structure, assumptions, tradeoffs), then open the model answer to spot gaps and rehearse a tighter follow-up.

Curated: · Written: · Reviewed:

QA-1

Walk through how you would approach a database that is running out of capacity.

QA-2

Explain read replicas: what they solve and what they break.

QA-3

When would you shard, and how would you choose the shard key?

QA-4

How does caching help database scaling, and where does it go wrong?

QA-5

How do you detect, mitigate, and architect around replication lag in read-heavy database clusters?

QA-6

Compare partitioning within one database against sharding across several.

QA-7

How would you scale a write-heavy workload?

QA-8

What are the trade-offs between directory-based routing and algorithmic hash or range routing when you have to dynamically reshard a database?

QA-9

Explain the trade-offs between synchronous and asynchronous replication.

QA-10

How would you handle one tenant that is far larger than all the others?

QA-11

What would you do if a database migration is too slow to complete in a maintenance window?

QA-12

How do you decide between scaling the database and changing the application?

QA-13

Explain what happens to a database as data volume grows, even without more traffic.

QA-14

How would you scale a system where reads and writes have very different requirements?

QA-15

What questions would you ask before approving a sharding project?

QA-16

How would you reduce database load without changing the schema?

QA-17

Explain how connection pooling affects database scaling.

QA-18

What is the role of archiving in database scaling?

QA-19

How would you test that a scaling change actually worked?

QA-20

Explain what you would do if a single query is bringing down the database.

QA-21

How would you plan database capacity for a product expecting rapid growth?

QA-22

What does it mean that scaling steps trade something away, and how do you decide what to trade?

QA-23

How would you explain a scaling decision and its cost to non-technical stakeholders?

QA-24

What is the relationship between database scaling and availability?

QA-25

How would you decide whether a slow report should be optimised, moved, or precomputed?