
Answer-first summary for fast verification
Answer: The session variable is local to just a single instance
The problem is occurring because the session variable is local to just a single instance. Google App Engine automatically spins up new instances based on load. During peak traffic, requests from the same user may be served by different instances. Since the session data is stored locally within each instance's memory, it is not shared across instances. As a result, different instances will have different session data, leading to users seeing news articles they already viewed. To resolve this issue, the session data should be stored in a shared storage solution like Firestore or Memorystore to maintain consistency across instances.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
A news feed web service running on Google App Engine is experiencing an issue during peak load where users report that they are seeing news articles they already viewed. The application is built using a stateful Flask app, and the session data is stored in memory. What is the most likely cause of this problem?
A
The session variable is local to just a single instance
B
The session variable is being overwritten in Cloud Datastore
C
The URL of the API needs to be modified to prevent caching
D
The HTTP Expires header needs to be set to -1 stop caching
No comments yet.