0
0
Microservicessystem_design~20 mins

Data consistency challenges in Microservices - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Data Consistency Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Eventual Consistency in Microservices

In a microservices system using asynchronous messaging, what is the main characteristic of eventual consistency?

AData is never synchronized between services.
BAll services have the same data instantly after an update.
CServices may temporarily have different data but will converge eventually.
DServices update data only when manually triggered.
Attempts:
2 left
💡 Hint

Think about how data synchronization happens over time in distributed systems.

Architecture
intermediate
2:00remaining
Choosing a Data Consistency Model for Inventory Service

You design an inventory microservice that must reflect stock changes immediately to avoid overselling. Which consistency model suits best?

AEventual consistency with asynchronous updates.
BManual reconciliation after batch updates.
CNo consistency, allow stale reads.
DStrong consistency with synchronous database transactions.
Attempts:
2 left
💡 Hint

Consider the risk of selling items that are not in stock.

scaling
advanced
2:30remaining
Scaling a Microservices System with Consistency Constraints

When scaling a microservices system that requires strong consistency, what is a common tradeoff?

AUnlimited throughput without delays.
BHigher latency due to synchronous coordination.
CNo need for distributed locks or consensus.
DInstant data replication without network overhead.
Attempts:
2 left
💡 Hint

Think about what synchronous coordination requires across services.

tradeoff
advanced
2:30remaining
Tradeoffs Between Eventual and Strong Consistency

Which statement correctly describes a tradeoff between eventual and strong consistency in microservices?

AEventual consistency provides lower latency but may show stale data temporarily.
BStrong consistency always improves system availability.
CEventual consistency requires synchronous database transactions.
DStrong consistency eliminates all network delays.
Attempts:
2 left
💡 Hint

Consider latency and data freshness differences.

estimation
expert
3:00remaining
Estimating Impact of Consistency Model on System Throughput

A microservices system processes 10,000 requests per second. Using strong consistency with synchronous commits adds 10ms latency per request. Estimate the maximum throughput impact compared to eventual consistency with near-zero latency.

AThroughput reduces to about 100 requests per second due to latency.
BThroughput remains at 10,000 requests per second with no impact.
CThroughput reduces to about 1,000 requests per second due to latency.
DThroughput doubles because of synchronous commits.
Attempts:
2 left
💡 Hint

Calculate how latency affects requests per second capacity.