0
0
HLDsystem_design~20 mins

Data replication strategies in HLD - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Replication Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding replication consistency models

Which data replication consistency model ensures that all replicas return the most recent write for a given data item?

AEventual consistency
BCausal consistency
CStrong consistency
DRead-your-writes consistency
Attempts:
2 left
💡 Hint

Think about the model that guarantees immediate visibility of writes across all replicas.

Architecture
intermediate
2:00remaining
Choosing replication topology for low latency

You want to design a data replication system for a global application that requires low read latency for users worldwide. Which replication topology is best suited?

ASingle primary with multiple asynchronous replicas distributed globally
BSingle primary with multiple synchronous replicas
CMulti-primary (master-master) replication
DNo replication, single centralized database
Attempts:
2 left
💡 Hint

Consider a topology that allows fast reads worldwide but may tolerate some delay in writes.

scaling
advanced
2:00remaining
Scaling write throughput with replication

Which replication strategy best helps scale write throughput in a distributed database system?

AMulti-primary (master-master) replication
BNo replication, single node writes
CSingle primary with asynchronous replicas
DSingle primary with synchronous replicas
Attempts:
2 left
💡 Hint

Think about allowing multiple nodes to accept writes simultaneously.

tradeoff
advanced
2:00remaining
Tradeoffs in synchronous vs asynchronous replication

What is the main tradeoff when choosing synchronous replication over asynchronous replication?

AAsynchronous replication guarantees no data loss but increases write latency
BSynchronous replication improves write latency but risks data loss
CAsynchronous replication improves write latency and guarantees strong consistency
DSynchronous replication guarantees no data loss but increases write latency
Attempts:
2 left
💡 Hint

Consider how waiting for replicas affects write speed and data safety.

estimation
expert
2:00remaining
Estimating replication lag impact on read freshness

A system uses asynchronous replication with an average replication lag of 200ms. If the system receives 1000 writes per second, what is the expected number of writes not visible on a replica at any moment?

AApproximately 50 writes
BApproximately 200 writes
CApproximately 100 writes
DApproximately 500 writes
Attempts:
2 left
💡 Hint

Calculate lag in seconds multiplied by writes per second.