0
0
HLDsystem_design~20 mins

Dead letter queues in HLD - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Dead Letter Queue Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding the purpose of Dead Letter Queues (DLQs)

What is the primary purpose of a Dead Letter Queue in a messaging system?

ATo prioritize urgent messages over regular ones
BTo capture messages that cannot be processed after multiple attempts
CTo store messages that have been successfully processed
DTo temporarily hold messages before processing
Attempts:
2 left
💡 Hint

Think about what happens to messages that repeatedly fail processing.

Architecture
intermediate
2:00remaining
Designing a system with Dead Letter Queues

In a distributed messaging system, where should the Dead Letter Queue be placed to ensure reliable message handling?

AInside the main queue to store all messages temporarily
BAs a backup storage for all processed messages
CBefore the main queue to filter messages
DAs a separate queue that receives messages after maximum retry attempts fail
Attempts:
2 left
💡 Hint

Consider when messages are moved to the DLQ in the processing lifecycle.

scaling
advanced
2:00remaining
Handling high volume of messages in Dead Letter Queues

What is the best approach to handle a sudden surge of messages landing in the Dead Letter Queue to avoid system overload?

AThrottle DLQ processing and prioritize messages based on failure reasons
BProcess all DLQ messages immediately in parallel without limits
CDelete all DLQ messages to free up space quickly
DMerge DLQ messages back into the main queue without filtering
Attempts:
2 left
💡 Hint

Think about controlled processing and prioritization to maintain stability.

tradeoff
advanced
2:00remaining
Tradeoffs in configuring retry policies before Dead Letter Queue routing

Which tradeoff is most relevant when deciding the number of retry attempts before sending a message to the Dead Letter Queue?

AUnlimited retries guarantee all messages are processed successfully
BFewer retries always improve system throughput without downsides
CMore retries increase processing latency but reduce message loss risk
DRetries have no impact on system resources or message handling
Attempts:
2 left
💡 Hint

Consider how retries affect processing time and resource use.

estimation
expert
2:00remaining
Estimating Dead Letter Queue storage requirements

A messaging system processes 1 million messages per hour. Historically, 0.1% of messages fail and are sent to the Dead Letter Queue. Each message averages 2 KB in size. What is the estimated storage needed for DLQ messages per day?

AApproximately 48 MB per day
BApproximately 4.8 GB per day
CApproximately 480 MB per day
DApproximately 4.8 MB per day
Attempts:
2 left
💡 Hint

Calculate failed messages per day and multiply by message size.