Google Cloud Professional Cloud Developer — Question 112

You are developing an ecommerce web application that uses App Engine standard environment and Memorystore for Redis. When a user logs into the app, the application caches the user's information (e.g., session, name, address, preferences), which is stored for quick retrieval during checkout.
While testing your application in a browser, you get a 502 Bad Gateway error. You have determined that the application is not connecting to Memorystore. What is the reason for this error?

Answer options

Correct answer: B

Explanation

The correct answer is B because if the Serverless VPC Access connector is in a different region than the App Engine instance, they cannot communicate, leading to the connection failure. Option A is incorrect since a private IP can still be used by App Engine if properly configured. Option C is not necessarily the cause unless specifically stated, and option D would not cause a 502 error if the VPC connector is correctly set up within the same region.