exam questions

Exam AWS Certified Developer - Associate DVA-C02 All Questions

View all questions & answers for the AWS Certified Developer - Associate DVA-C02 exam

Exam AWS Certified Developer - Associate DVA-C02 topic 1 question 126 discussion

A developer is integrating Amazon ElastiCache in an application. The cache will store data from a database. The cached data must populate real-time dashboards.

Which caching strategy will meet these requirements?

  • A. A read-through cache
  • B. A write-behind cache
  • C. A lazy-loading cache
  • D. A write-through cache
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
MrTee
Highly Voted 2 years ago
Selected Answer: D
The best caching strategy for populating real-time dashboards using Amazon ElastiCache would be a write-through caching strategy. In this strategy, when new data is written to the database, it is also written to the cache. This ensures that the most current data is always available in the cache for the real-time dashboards to access, reducing the latency of the data retrieval. Additionally, using a write-through cache ensures that data consistency is maintained between the database and the cache, as any changes to the data are written to both locations simultaneously.
upvoted 16 times
...
sumanshu
Most Recent 3 months, 3 weeks ago
Selected Answer: D
A) Eliminated In a read-through cache, when an application tries to retrieve data: If the data is not available in the cache, the cache retrieves it from the database, stores it in the cache, and returns it to the application. If the data is available in the cache, it is returned directly. The cache is updated only when data is requested, which could result in outdated data being served to real-time dashboards if no recent read request has occurred.
upvoted 2 times
sumanshu
3 months, 3 weeks ago
B) Eliminated In a write-behind cache, data is written to the cache first, and the database is updated asynchronously (in the background). This caching strategy prioritizes write performance but risks data loss in the event of a failure because the cache may not yet have updated the database. For real-time dashboards, there is no guarantee that the cache is always up-to-date because the data is updated asynchronously.
upvoted 1 times
sumanshu
3 months, 3 weeks ago
C) Eliminated In a lazy-loading cache, the data is loaded into the cache only when requested. If the data is not in the cache (a "cache miss"), it is fetched from the database, loaded into the cache, and returned to the application. While this reduces unnecessary caching, it does not proactively update the cache. Therefore, data in the cache may become stale, which is unsuitable for real-time dashboards.
upvoted 1 times
sumanshu
3 months, 3 weeks ago
D) Correct In a write-through cache, every write operation to the database is immediately mirrored in the cache. This ensures that the cache always contains the most up-to-date data and is ideal for scenarios where real-time consistency is required, such as updating dashboards.
upvoted 1 times
...
...
...
...
Saudis
5 months, 3 weeks ago
Selected Answer: D
the keyword => real-time
upvoted 1 times
...
tirthyakamaldasgupta
8 months, 2 weeks ago
When using a write-through cache strategy, the cache is updated in real-time alongside the database. This ensures that the cached data remains consistent with the underlying database. According to AWS best practices, this approach pushes data into the cache at the time it is written to the database, reducing the risk of serving stale data. In contrast, option A (a read-through cache strategy) may result in stale data, particularly if the cache has a time-to-live (TTL) setting that allows data to remain in the cache longer than it remains accurate in the database. This can be problematic for real-time dashboards that require up-to-date information. For these reasons, I opted for option D. https://aws.amazon.com/caching/best-practices/#:~:text=Write%2Dthrough,also%20pushed%20into%20the%20cache. Please correct me if my understanding is incorrect, as I am still learning.
upvoted 1 times
...
65703c1
11 months, 1 week ago
Selected Answer: D
D is the correct answer.
upvoted 1 times
...
Walker17
1 year, 2 months ago
B. Write Behind Cache.
upvoted 1 times
...
SerialiDr
1 year, 3 months ago
Selected Answer: D
D. A write-through cache: A write-through caching strategy immediately writes data to both the cache and the database at the same time. This approach ensures that the cache always contains the most recent data, making it highly suitable for applications that require up-to-date information, such as real-time dashboards.
upvoted 2 times
...
tqiu654
1 year, 4 months ago
Selected Answer: C
ChatGPT:C
upvoted 1 times
...
Prem28
1 year, 10 months ago
ans- A Option D, a write-through cache, is incorrect because it would not meet the requirement of populating real-time dashboards. A write-through cache writes data to the cache and the database at the same time. This means that the data in the cache would always be up-to-date, but it would also mean that the cache would always be lagging behind the database. This would cause a delay in populating real-time dashboards.
upvoted 1 times
[Removed]
1 year, 4 months ago
I agree. I think it's A because D is better option when you need data to be consistent and highly available since data is always up to date but as Prem28 says it lags behind on latency when compared to read-through. What I get from the question is they need strategy for "real-time" dashboards --> reduction of latency not accuracy or consistent data
upvoted 1 times
...
...
loctong
1 year, 11 months ago
Selected Answer: D
A write-through cache strategy involves writing data to both the cache and the underlying database simultaneously. When data is updated or inserted into the database, it is also stored or updated in the cache to ensure that the cache remains up-to-date with the latest data.
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago