0
0
Microservicessystem_design~20 mins

Event replay in Microservices - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Event Replay Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
What is the primary purpose of event replay in microservices?

In a microservices architecture, event replay is often used. What is its main goal?

ATo rebuild the current state of a service by reprocessing past events
BTo send real-time notifications to users about new events
CTo delete old events from the event store to save space
DTo encrypt events before sending them to other services
Attempts:
2 left
💡 Hint

Think about why a service might need to process old events again.

Architecture
intermediate
2:00remaining
Which component is essential for enabling event replay in a microservices system?

To support event replay, which component must be part of the system design?

AA message queue that deletes events after delivery
BA load balancer to distribute incoming requests
CA cache to store the latest state snapshot only
DAn event store that persists all events in order
Attempts:
2 left
💡 Hint

Consider where events must be kept to allow replay.

scaling
advanced
2:00remaining
How to efficiently scale event replay when the event log grows very large?

When the event log becomes huge, replaying all events can be slow. Which approach best improves replay efficiency?

AUse snapshots to save intermediate states and replay only recent events
BDelete old events regularly to keep the log small
CReplay events on multiple services simultaneously without coordination
DReplay events only during off-peak hours to reduce load
Attempts:
2 left
💡 Hint

Think about saving partial progress to avoid replaying everything from the start.

tradeoff
advanced
2:00remaining
What is a key tradeoff when enabling event replay in microservices?

Choosing to keep all events for replay has benefits and drawbacks. What is a major tradeoff?

AReduced network traffic versus higher latency in event processing
BIncreased storage and complexity versus ability to recover and audit state
CSimpler codebase versus inability to handle failures
DFaster response times versus less accurate state reconstruction
Attempts:
2 left
💡 Hint

Consider what storing all events costs and what benefits it brings.

estimation
expert
3:00remaining
Estimate the storage needed for event replay given event size and volume

A microservice generates 1000 events per second. Each event is 1 KB in size. How much storage is needed to keep events for 30 days to support event replay?

AAbout 26 TB
BAbout 260 GB
CAbout 2.6 TB
DAbout 26 GB
Attempts:
2 left
💡 Hint

Calculate total events per day, multiply by event size, then by 30 days.