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.
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.
AA. Memcached, with three nodes spread across Availability Zones and the cart keys divided between them by the client's hashing.
BB. Redis OSS in cluster mode disabled, with a replica in another Availability Zone and automatic failover turned on.
CC. Redis OSS in cluster mode enabled, with one shard and no replicas, so that every cart is stored on a single node.
DD. Redis OSS with one primary and no replicas, plus an hourly snapshot that can be restored into a new cluster if the node fails.
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.
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 →