Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam Professional Cloud Developer All Questions

View all questions & answers for the Professional Cloud Developer exam

Exam Professional Cloud Developer topic 1 question 125 discussion

Actual exam question from Google's Professional Cloud Developer
Question #: 125
Topic #: 1
[All Professional Cloud Developer Questions]

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?

  • 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.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
ParagSanyashiv
Highly Voted 2 years, 10 months ago
Selected Answer: B
B is the correct answer in this case, A is wrong because according to the best practice and security purpose gcp doesn't allow public ip for redis server.
upvoted 6 times
...
thewalker
Most Recent 4 months, 1 week ago
Selected Answer: B
The most likely reason for the 502 Bad Gateway error and the inability to connect to Memorystore is B. You configured your Serverless VPC Access connector in a different region than your App Engine instance. Here's why: Serverless VPC Access and Regions: App Engine standard environment applications can only communicate with services outside of their environment (like Memorystore) through Serverless VPC Access connectors. These connectors act as a bridge between your App Engine application and your VPC network, where Memorystore resides. Crucially, the connector and the App Engine instance must be in the same region .
upvoted 1 times
thewalker
4 months, 1 week ago
Let's analyze why the other options are less likely: A. Memorystore without a Public IP: While Memorystore instances can be deployed without a public IP, this wouldn't prevent your App Engine application from connecting. Serverless VPC Access allows communication through private IPs. C. Firewall Rule Removal: While a firewall rule could prevent access, it's less likely to be the primary cause. If the firewall rule was removed, you'd likely see a different error message, not a 502 Bad Gateway. D. Different Subnet and Availability Zone: While using a different subnet or availability zone within the same region might introduce latency, it wouldn't completely prevent connectivity. The primary issue is the region mismatch between the connector and App Engine.
upvoted 1 times
...
...
alpha_canary
7 months, 1 week ago
Selected Answer: B
B: If you configured your Serverless VPC Access connector in a different region than your App Engine instance, this could cause connectivity issues. Serverless VPC Access connectors and the resources they connect to must be in the same region.
upvoted 1 times
...
theshant
8 months, 1 week ago
C. The firewall rule allowing a connection between App Engine and Memorystore was removed during an infrastructure update by the DevOps team. Here's why this scenario aligns with the error: 502 Bad Gateway: This error typically indicates that a server (in this case, App Engine) is unable to communicate with an upstream server (Memorystore for Redis) due to a configuration issue. Firewall Rule Removal: If a firewall rule previously allowed App Engine to connect to Memorystore, removing it would block communication and cause the connection failure.
upvoted 1 times
...
kldn
1 year, 2 months ago
Selected Answer: B
https://cloud.google.com/vpc/docs/configure-serverless-vpc-access In the Region field, select a region for your connector. This must match the region of your serverless service. If your service or job is in the region us-central or europe-west, use us-central1 or europe-west1.
upvoted 1 times
...
__rajan__
1 year, 2 months ago
Selected Answer: C
1 1 The most likely reason for the 502 Bad Gateway error is that the firewall rule allowing a connection between App Engine and Memorystore was removed during an infrastructure update by the DevOps team. This is because App Engine needs to be able to connect to Memorystore in order to retrieve the cached user information. If the firewall rule is removed, App Engine will not be able to connect to Memorystore and the application will fail.
upvoted 2 times
...
purushi
1 year, 3 months ago
Selected Answer: D
502 Bad gateway issue is common more in App Engine Flexible environments than Std due to memory issues. Here I go with option D since pointing connector to a different subnet than App engine instance could cause Bad Gateway issue. A is not correct, because even with the different region with the same subnet, App engine instance do not get issues while connecting to Memeorystore.
upvoted 1 times
...
zanhsieh
1 year, 5 months ago
Selected Answer: C
C. A: No. The public IP is not mandatory. B: No. App Engine instance region can be different with Serverless VPC Access connector. Link here: https://support.google.com/a/answer/10620692?hl=en . "We support VPC access connectors in 6 regions (us-central, us-west1, us-east1, asia-southeast1, asia-east1, and europe-west1). .... Note: Support for additional regions is coming soon." Although the document didn't mention directly, what if an app in App Engine in southamerica-east1-a would like to connect to Cloud SQL in us region? Note that the diagram here is REALLY mis-leading: https://cloud.google.com/vpc/docs/serverless-vpc-access#example_2 C: Yes. This is the only possible answer. D: No. Serverless VPC Access connector shall be configured with a different subnet. See: https://cloud.google.com/vpc/docs/configure-serverless-vpc-access#console "Every connector requires its own /28 subnet to place connector instances on. A subnet cannot be used by other resources such as VMs, Private Service Connect, or load balancers."
upvoted 2 times
...
telp
1 year, 10 months ago
Selected Answer: B
A is not correct because Cloud Run connects to Memorystore via the Serverless VPC Connector. Connections are over private networks. Public addresses are not required. B is correct. All of the components must be in the same region. C is not correct because for connectivity between Cloud Run and Memorystore all that is required is a Serverless VPN Connector. D is not correct. The Serverless VPC Connector is configured with a non-overlapping subnet that is not associated with the VPC.
upvoted 2 times
...
omermahgoub
1 year, 10 months ago
Selected Answer: D
While both B and D refer to the configuration of the Serverless VPC Access connector and could potentially cause issues with the application's ability to connect to Memorystore, they are slightly different. For B: Having the connector in a different region than the App Engine instance could result in increased latency and potential connectivity issues, but it would not necessarily prevent the App Engine instance from connecting to Memorystore. For D: This option is more specific and is indicating that if the connector is on different subnet or availability zone from App Engine instance it could cause issues with the application's ability to connect to Memorystore, it is less likely for this situation to cause latency or performance issues, but it will affect the connectivity of the App Engine to Memorystore. Both B and D refer to misconfiguration of the Serverless VPC Access connector, but option D is more specific and directly relates to connectivity issue and is more likely to be the root cause of the 502 Bad Gateway error encountered.
upvoted 2 times
...
zellck
1 year, 11 months ago
Selected Answer: B
B is the answer. https://cloud.google.com/vpc/docs/serverless-vpc-access#how_it_works Serverless VPC Access is based on a resource called a connector. A connector handles traffic between your serverless environment and your VPC network. When you create a connector in your Google Cloud project, you attach it to a specific VPC network and region. You can then configure your serverless services to use the connector for outbound network traffic.
upvoted 1 times
...
tomato123
2 years, 3 months ago
Selected Answer: B
B is correct
upvoted 2 times
...
akshaychavan7
2 years, 3 months ago
Selected Answer: B
Yes! This should be B
upvoted 1 times
...
scaenruy
2 years, 10 months ago
I vote B https://cloud.google.com/vpc/docs/configure-serverless-vpc-access
upvoted 4 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...