A shopping app keeps a cart for each anonymous visitor. Cart reads happen on every page view and must return in under a millisecond. If the cache restarts, shoppers can rebuild their carts, so the data does not need to survive a failure. Which managed service suits this?
Show answer and explanation
Answer: B
Memorystore for Redis is a managed in-memory store that serves reads in sub-millisecond time, which suits a session or cart cache. Because the cart data can be rebuilt after a restart, the lack of durable persistence is an acceptable trade-off. The other services are durable databases whose reads take longer per request, and paying for that durability buys nothing for disposable cart data.
Why the other options are wrong
- A. Spanner provides strong consistency and global scale, but it is a durable database with millisecond-level read latency. Its cost is unjustified for disposable cart data that only needs to be fast.
- C. Cloud SQL on SSD is a durable relational service. SSD improves disk performance, but reads still travel to a database over the network and take longer than an in-memory cache can serve.
- D. Bigtable is a durable wide-column store built for large analytical and time-series workloads. Its reads are typically in the millisecond range, not the sub-millisecond range this cart path requires.