Google Associate Cloud Engineer Question 153
Select 2Google Cloud PlatformYou have been tasked with setting up a new Virtual Private Cloud (VPC) on Google Cloud Platform for a multi-tier web application. The application requires a front-end network accessible from the internet and a back-end network that is only accessible from the front-end network. How should you configure the subnets to meet these requirements?
- A
Create a single subnet and use firewall rules to separate front-end and back-end traffic.
- B
Create two subnets within the same VPC, one for the front-end with a public IP range, and another for the back-end with a private IP range.
- C
Create two separate VPCs, one for the front-end and another for the back-end, and use VPC Peering to connect them.
- D
Create two subnets within the same VPC, ensure the front-end subnet allows HTTP/HTTPS traffic from the internet, and the back-end subnet only allows traffic from the front-end subnet.
- E
Create a shared VPC and use dedicated interconnects for secure communication between the front-end and back-end networks.
Show answer and explanation
Correct answers: B, D
Explanation
The correct approach to setting up a VPC for a multi-tier application in Google Cloud is to use two subnets within the same VPC. This configuration allows for a clear separation of concerns, where the front-end subnet can be exposed to the internet while the back-end subnet remains private and only accessible from the front-end subnet. This setup ensures security and proper network segmentation as required by the scenario.
- A. Incorrect.
This option does not meet the requirement of separating front-end and back-end traffic at the subnet level, making it less secure.
- B. Correct.
Creating two subnets within the same VPC and assigning appropriate IP ranges allows for clear separation of front-end and back-end functions.
- C. Incorrect.
Using two separate VPCs and VPC Peering is unnecessarily complex for this scenario and not required to achieve the desired separation.
- D. Correct.
This configuration ensures that the front-end subnet is accessible from the internet while the back-end subnet is only reachable from the front-end subnet, aligning with the application's requirements.
- E. Incorrect.
A shared VPC and dedicated interconnects are not necessary for simple front-end to back-end communication within a single project.