Course menuDVA-C03

Exams / DVA-C03 / Caching and specialized data stores / Question 1

DVA-C03 practice question: Caching and specialized data stores

Development with AWS Services A free question from our original DVA-C03 practice exam. Try it, then open the answer to see why each option is right or wrong.

Last verified against current AWS documentation ·How we write our questions

A retailer will store shopping carts in Amazon ElastiCache.

A cart must survive the loss of one cache node, and the cache must fail over automatically to a copy in another Availability Zone, so that customers keep their items during a node failure. Cart writes are frequent, and the team wants the simplest configuration that meets these needs.

Which configuration should the developer choose?

Choose one answer.

  1. A. Memcached, with three nodes spread across Availability Zones and the cart keys divided between them by the client's hashing.
  2. B. Redis OSS in cluster mode disabled, with a replica in another Availability Zone and automatic failover turned on.
  3. C. Redis OSS in cluster mode enabled, with one shard and no replicas, so that every cart is stored on a single node.
  4. D. Redis OSS with one primary and no replicas, plus an hourly snapshot that can be restored into a new cluster if the node fails.
Show the answer and explanation

Answer: B

  • A. Wrong: Memcached has no replication or automatic failover. When a node is lost, the keys stored on that node are lost too. Learn more: Choosing an ElastiCache engine (opens in a new tab)
  • B. Right: Correct. Redis OSS supports replicas. With automatic failover on, a replica is promoted when the primary fails, so the carts survive a node loss. Learn more: Choosing an ElastiCache engine (opens in a new tab)
  • C. Wrong: With no replica there is nothing to fail over to. Losing the node loses the carts stored on it, and the cache is unavailable until a replacement node is ready.
  • D. Wrong: Snapshots help you restore data after a failure, but they do not provide automatic failover. Customers would see an outage until the restore is complete.

Explanation

Replication and automatic failover are what let a cache survive a node failure. Memcached has neither. Redis OSS has both, so a replica in another Availability Zone, with automatic failover turned on, takes over when the primary fails and the cart data is kept.

Study

Keep practicing

Answer questions with a score at the end, or practice just this topic with the explanation after each one. No sign-up needed.

Want more on Caching and specialized data stores? The 5 full-length practice sets have 5 more Caching and specialized data stores questions, 390 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets