0
0
DynamoDBquery~20 mins

Stream vs polling comparison in DynamoDB - Practice Questions

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
DynamoDB Stream vs Polling Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding DynamoDB Streams vs Polling

Which of the following best describes a key advantage of using DynamoDB Streams over polling to detect data changes?

AStreams only work for batch updates, while polling detects individual item changes instantly.
BPolling requires less infrastructure setup and automatically scales better than streams.
CStreams provide near real-time change data capture without continuous querying, reducing latency and cost.
DPolling is event-driven and pushes changes to clients, while streams require manual fetching.
Attempts:
2 left
💡 Hint

Think about how each method detects changes and the impact on latency and resource use.

query_result
intermediate
2:00remaining
Polling Query Result Behavior

Given a DynamoDB table with 1000 items, if you poll the table every 5 seconds to detect changes, what is the expected behavior regarding data freshness and cost?

APolling returns the entire table each time, causing high read costs and potential stale data between polls.
BPolling triggers DynamoDB Streams internally to fetch only changes, reducing cost.
CPolling automatically caches changes, so costs remain low and data is always fresh.
DPolling every 5 seconds returns only changed items, minimizing read costs.
Attempts:
2 left
💡 Hint

Consider what a typical scan or query does when polling without change tracking.

optimization
advanced
2:00remaining
Optimizing Change Detection with Streams

You want to process only new changes from a DynamoDB Stream without reprocessing old records. Which approach ensures efficient and correct processing?

AStore the last processed sequence number and use it to continue reading from the stream where you left off.
BRead the entire stream from the beginning every time to avoid missing any changes.
CPoll the table for changes and ignore the stream to reduce complexity.
DUse a random starting point in the stream to balance load and avoid duplicates.
Attempts:
2 left
💡 Hint

Think about how to avoid duplicate processing and missing data in a continuous stream.

🔧 Debug
advanced
2:00remaining
Identifying Polling Issues in DynamoDB

You implemented polling every 10 seconds on a large DynamoDB table to detect changes. Users report delays and high AWS costs. What is the most likely cause?

APolling triggers Lambda functions too frequently, causing throttling.
BPolling uses DynamoDB Streams internally, which is slower than direct queries.
CPolling caches results locally, causing stale data to be shown to users.
DPolling scans the entire table each time, causing high read throughput and delayed detection.
Attempts:
2 left
💡 Hint

Consider what happens when scanning a large table repeatedly.

🧠 Conceptual
expert
2:00remaining
Choosing Between Streams and Polling for Real-Time Applications

For a real-time notification system that must react instantly to data changes with minimal cost, which approach is best and why?

AUse frequent polling because it is simpler to implement and scales better for real-time needs.
BUse DynamoDB Streams because they provide event-driven, near real-time updates with lower read costs than polling.
CUse a combination of polling and streams to balance cost and latency equally.
DUse polling with a long interval to reduce costs and accept delayed notifications.
Attempts:
2 left
💡 Hint

Think about event-driven vs repeated querying and their impact on latency and cost.