Bird
Raised Fist0
HLDsystem_design~20 mins

Why database scaling handles data growth in HLD - Challenge Your Understanding

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
Database Scaling Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
How does vertical scaling improve database capacity?

Imagine you have a small shop and you want to serve more customers. You decide to buy a bigger cash register that can handle more transactions at once. In database terms, this is called vertical scaling.

Which of the following best explains how vertical scaling helps handle data growth?

ABy creating multiple copies of the database to improve read speed but not increase storage capacity.
BBy splitting the database into smaller parts and storing them on different servers to distribute the load.
CBy adding more powerful hardware like CPU and RAM to the existing database server to handle more data and queries.
DBy compressing the data to reduce its size without changing the hardware.
Attempts:
2 left
💡 Hint

Think about upgrading the size of one machine versus adding more machines.

❓ Architecture
intermediate
2:00remaining
What is horizontal scaling in databases?

Suppose your shop is growing fast and one big cash register is not enough. You decide to open more cash registers to serve customers in parallel. This is similar to horizontal scaling in databases.

Which option best describes horizontal scaling?

AUpgrading the existing server with better hardware components.
BAdding more servers to share the database load by splitting data across them.
CBacking up the database regularly to prevent data loss.
DUsing a faster network connection to speed up data transfer.
Attempts:
2 left
💡 Hint

Think about adding more machines instead of making one machine bigger.

❓ scaling
advanced
2:00remaining
Which challenge is unique to horizontal scaling compared to vertical scaling?

When scaling databases, vertical and horizontal scaling have different challenges. Which of the following is a challenge unique to horizontal scaling?

AManaging data consistency across multiple servers.
BUpgrading the CPU and memory of a single server.
CIncreasing disk space on the existing server.
DReducing the size of database indexes.
Attempts:
2 left
💡 Hint

Think about what happens when data is spread over many machines.

❓ tradeoff
advanced
2:00remaining
What is a tradeoff when choosing vertical scaling over horizontal scaling?

Choosing between vertical and horizontal scaling depends on tradeoffs. Which of the following is a tradeoff when choosing vertical scaling?

ALimited by the maximum hardware capacity of a single server, making future growth harder.
BComplexity in splitting data and queries across many servers.
CHigher network latency due to data being spread over multiple machines.
DNeed to manage multiple database instances and synchronization.
Attempts:
2 left
💡 Hint

Think about the limits of one machine versus many machines.

❓ estimation
expert
2:00remaining
Estimate the number of servers needed for horizontal scaling

Your database currently runs on one server handling 1000 queries per second. You expect traffic to grow to 10,000 queries per second. Each server can handle 1500 queries per second before performance degrades.

How many servers do you need to handle the expected load with horizontal scaling?

A5 servers
B6 servers
C8 servers
D7 servers
Attempts:
2 left
💡 Hint

Divide total expected queries by capacity per server, then round up.

Practice

(1/5)
1. Why do systems use database scaling when data grows larger?
easy
A. To keep data access fast and reliable
B. To reduce the amount of data stored
C. To make data harder to access
D. To delete old data automatically

Solution

  1. Step 1: Understand the purpose of scaling

    Database scaling is used to handle more data without slowing down or losing reliability.
  2. Step 2: Identify the correct goal

    The main goal is to keep data access fast and reliable as data grows.
  3. Final Answer:

    To keep data access fast and reliable -> Option A
  4. Quick Check:

    Scaling improves speed and reliability [OK]
Hint: Scaling keeps databases fast despite growth [OK]
Common Mistakes:
  • Thinking scaling reduces data size
  • Believing scaling deletes old data
  • Assuming scaling makes data harder to access
2. Which of the following is a correct example of vertical scaling in databases?
easy
A. Adding more servers to share the load
B. Upgrading a server with a faster CPU and more RAM
C. Splitting data into smaller parts across servers
D. Copying data to multiple servers for backup

Solution

  1. Step 1: Define vertical scaling

    Vertical scaling means improving one server's hardware like CPU or RAM.
  2. Step 2: Match the option to vertical scaling

    Upgrading a server with better CPU and RAM fits vertical scaling.
  3. Final Answer:

    Upgrading a server with a faster CPU and more RAM -> Option B
  4. Quick Check:

    Vertical scaling = better single server [OK]
Hint: Vertical scaling upgrades one server's hardware [OK]
Common Mistakes:
  • Confusing vertical with horizontal scaling
  • Thinking adding servers is vertical scaling
  • Mixing sharding with vertical scaling
3. Given a database system that uses sharding, what happens when data grows beyond one shard's capacity?
medium
A. The system slows down because all data is on one server
B. Replication copies data to the same shard
C. Data is deleted to keep the shard size small
D. New shards are added to distribute the data load

Solution

  1. Step 1: Understand sharding

    Sharding splits data across multiple servers or shards to spread load.
  2. Step 2: What happens when one shard is full?

    New shards are added to hold more data and keep performance.
  3. Final Answer:

    New shards are added to distribute the data load -> Option D
  4. Quick Check:

    Sharding adds shards as data grows [OK]
Hint: Sharding adds servers to handle more data [OK]
Common Mistakes:
  • Thinking data is deleted when shard is full
  • Believing replication happens on same shard
  • Assuming system slows down without adding shards
4. A database uses replication to improve read speed and backup. If replication is misconfigured, what problem might occur?
medium
A. Data inconsistency between primary and replicas
B. Faster writes on the primary database
C. Automatic deletion of all replicas
D. Sharding data across replicas

Solution

  1. Step 1: Understand replication purpose

    Replication copies data to replicas for speed and backup.
  2. Step 2: Identify misconfiguration effects

    If replication is wrong, replicas may not match primary, causing inconsistency.
  3. Final Answer:

    Data inconsistency between primary and replicas -> Option A
  4. Quick Check:

    Replication errors cause inconsistency [OK]
Hint: Misconfigured replication causes data mismatch [OK]
Common Mistakes:
  • Thinking replication speeds up writes
  • Assuming replicas get deleted automatically
  • Confusing sharding with replication
5. A company expects its user data to grow rapidly. Which combination of scaling techniques best handles this growth while ensuring fast reads and fault tolerance?
hard
A. Vertical scaling only, upgrading server hardware
B. Replication only, copying data to multiple servers
C. Horizontal scaling with sharding and replication
D. Deleting old data regularly to reduce size

Solution

  1. Step 1: Analyze growth and requirements

    Rapid data growth needs spreading data and fast access with backups.
  2. Step 2: Match techniques to needs

    Horizontal scaling adds servers; sharding splits data; replication copies data for speed and fault tolerance.
  3. Step 3: Evaluate other options

    Vertical scaling alone can't handle rapid growth well; replication alone doesn't split data; deleting data loses information.
  4. Final Answer:

    Horizontal scaling with sharding and replication -> Option C
  5. Quick Check:

    Sharding + replication = scalable and reliable [OK]
Hint: Combine sharding and replication for growth and speed [OK]
Common Mistakes:
  • Relying only on vertical scaling for big growth
  • Using replication without sharding for large data
  • Deleting data instead of scaling
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard