Question-40: App Engine is a platform for the development and hosting of scalable web apps that is completely managed and does not need a server. In order to construct your applications, you have the option of selecting from a number of widely used programming languages, libraries, and frameworks. After that, you can hand off the task of provisioning servers and scaling your application instances to App Engine. The following code is now being executed on Google App Engine as part of a news feed web service. Users have reported that they are able to access previously viewed news items even while peak loads are in effect. What is the most probable reason why this issue has arisen?
A. The session variable is only accessible within a single instance of the program.
B. In Cloud Datastore, the session variable is being repeatedly overwritten.
C. A change needs to be made to the URL of the API in order to prevent caching.
D. The HTTP Expires header must be changed to read -1 in order to disable caching.
Correct Answer

Get All 340 Questions and Answer for Google Professional Cloud Architect

: 1 Explanation: The number of running containers is dynamically adjusted by AppEngine based on the demand. During periods of high demand, it is possible that HTTP requests coming from the same user will be handled by multiple containers. 'sessions' is a variable that is regenerated for each container, therefore the data that it stores might be different for each container. The fact that this Flask app is stateful is the source of the issue. The status of this application may be seen in the'sessions' variable. Additionally, the use of stateful variables in AppEngine, Cloud Run, and Cloud Functions might provide some challenges. One possible option is to save the session in a database (like Firestore or Memorystore, for example) and then retrieve it from that location. In this manner, the application would be stateless since it would get the session from a single location. It is conceivable that Uttar will connect via a different session when traffic is really heavy, and since sessions are defined locally, this would cause them to overwrite any previously seen films.