A news feed web service has the following code running on Google App Engine. During peak load, users report that they can see news articles they already viewed. What is the most likely cause of this problem?
Choose an answer
Tap an option to check your answer.
Correct answer: The session variable is local to just a single instance.
Why this is the answer
In Google App Engine, instances are ephemeral and requests can be routed to any available instance. If session data is stored in a local instance variable, subsequent requests from the same user might be served by a different instance, which would not have access to the previous session's state. This leads to the user seeing articles they've already viewed because the new instance doesn't know their viewing history. To fix this, session data should be stored in a shared, persistent storage like Cloud Datastore or Memorystore. Overwriting in Cloud Datastore is unlikely to be the primary cause of seeing old articles. Modifying the API URL or setting HTTP Expires headers are related to caching at the client or proxy level, not server-side session state management.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed