
Answer-first summary for fast verification
Answer: You configured your Serverless VPC Access connector in a different region than your App Engine instance.
The 502 Bad Gateway error in this scenario is most likely due to the Serverless VPC Access connector being configured in a different region than the App Engine instance. This misconfiguration prevents the App Engine from accessing the Memorystore for Redis instance, as both need to be in the same region for proper connectivity. While other options like the removal of a firewall rule (Option C) could also lead to connectivity issues, the regional misalignment of the VPC Access connector is a more fundamental and likely cause of the error in this context.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You are developing an e-commerce web application using App Engine standard environment with Memorystore for Redis. When a user logs in, the application caches their information (e.g., session, name, address, preferences) for quick retrieval during checkout.
During browser testing, you encounter a 502 Bad Gateway error and have identified that the application fails to connect to Memorystore. What is the cause of this error?
A
Your Memorystore for Redis instance was deployed without a public IP address.
B
You configured your Serverless VPC Access connector in a different region than your App Engine instance.
C
The firewall rule allowing a connection between App Engine and Memorystore was removed during an infrastructure update by the DevOps team.
D
You configured your application to use a Serverless VPC Access connector on a different subnet in a different availability zone than your App Engine instance.
No comments yet.