
Answer-first summary for fast verification
Answer: 1. Create a subnetwork in the same VPC, in europe-west2. 2. Create the new instance in the new subnetwork and use the first instance‘s private address as the endpoint
A is correct because the new instance needs to communicate with the old instance, so both of them need to be in the same VPC. A new subnet needs to be created in the europe-west2 region for the new instance. It follows the best practice of creating a subnetwork in the same VPC as the existing inventory-management service. This allows for better organization and management of resources within the same project. Additionally, using the first instance‘s private address as the endpoint ensures secure communication between the two services. B is incorrect because there is no need for an external load balancer in this case. It suggests provisioning a new VPC and subnetwork in the europe-west2 region. This would create unnecessary complexity and duplication of resources. It is preferable to utilize the same VPC for better resource management. C is incorrect because there is no need to create a Cloud VPN for this use case. It suggests using Cloud VPN to connect the two subnetworks. While this may provide connectivity between the two services, it adds unnecessary complexity and can introduce potential performance and security issues. It is better to utilize the same VPC and subnetwork for better resource management and security. D is incorrect because both instances need to be in the same VPC. It suggests creating a new VPC and subnetwork in the europe-west2 region and peering the two VPCs. This would again create unnecessary complexity and duplication of resources. It is preferable to utilize the same VPC and subnetwork for better resource management. Links: https://cloud.google.com/vpc/docs/vpc https://serverfault.com/questions/792441/google-cloud-communication-between-2-computing-instance NOTE: Networks and subnets– The terms subnet and subnetwork are synonymous. They are used interchangeably in the Google Cloud console, gcloud commands, and API documentation.– A subnet is not the same thing as a (VPC) network. Networks and subnets are different types of resources in Google Cloud.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
You have developed an inventory-management microservice on Compute Engine in a single subnetwork in the us-central1-a region. Your VPC currently has only 1 subnetwork. Another team is planning to deploy a payment service in the same project in the europe-west2 region. The payment service needs access to the inventory-management service. You want to follow GCP‘s best practices. What should you do?
A
B
C
D