Which of the following best describes a key advantage of using DynamoDB Streams over polling to detect data changes?
Think about how each method detects changes and the impact on latency and resource use.
DynamoDB Streams capture changes as they happen and allow applications to react quickly without repeatedly querying the database. Polling requires frequent queries, increasing latency and cost.
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?
Consider what a typical scan or query does when polling without change tracking.
Polling usually involves scanning or querying the table repeatedly, which reads all items and incurs high costs. Data freshness depends on the polling interval, so changes between polls may be missed.
You want to process only new changes from a DynamoDB Stream without reprocessing old records. Which approach ensures efficient and correct processing?
Think about how to avoid duplicate processing and missing data in a continuous stream.
By storing the last processed sequence number, you can resume reading the stream from that point, ensuring no duplicates or missed changes. Reading from the start every time is inefficient and causes duplicates.
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?
Consider what happens when scanning a large table repeatedly.
Polling by scanning the entire table every 10 seconds consumes a lot of read capacity and causes delays because the scan takes time. This leads to higher costs and slower updates.
For a real-time notification system that must react instantly to data changes with minimal cost, which approach is best and why?
Think about event-driven vs repeated querying and their impact on latency and cost.
DynamoDB Streams push changes as events, enabling instant reactions with less overhead. Polling repeatedly queries the database, increasing cost and latency, making streams better for real-time systems.