You need to deploy an application with stateful sessions that must survive VM restarts. What storage should you use?

  1. Ephemeral storage
  2. Memory only
  3. Local SSD
  4. Cloud Firestore or Cloud Spanner ✓

Correct answer: Cloud Firestore or Cloud Spanner

Option D is correct because Cloud Firestore and Cloud Spanner are fully managed, durable, globally distributed databases that persist data independently of the VM lifecycle, meaning session state survives VM restarts, replacements, or scale-down events. Option A is incorrect because ephemeral storage is tied to the VM instance's lifecycle and is erased when the VM stops or restarts, making it unsuitable for stateful sessions that must survive restarts. Option B is incorrect because memory is volatile and cleared on every restart, so any session data held only in RAM will be lost as soon as the VM reboots. Option C is incorrect because Local SSD provides fast local block storage but is also instance-local and not guaranteed to persist across VM restarts or instance replacements in managed groups.

Topic: · cloud firestore, cloud spanner, stateful sessions, persistent storage

Practice Google Cloud Professional Cloud Architect Questions Free