Google

Associate Cloud Engineer Free Practice Questions — Page 13

Question 122

You are building a data lake on Google Cloud for your Internet of Things (IoT) application. The IoT application has millions of sensors that are constantly streaming structured and unstructured data to your backend in the cloud. You want to build a highly available and resilient architecture based on Google-recommended practices. What should you do?

A. Stream data to Pub/Sub, and use Dataflow to send data to Cloud Storage.
B. Stream data to Pub/Sub, and use Storage Transfer Service to send data to BigQuery.
C. Stream data to Dataflow, and use Dataprep by Trifacta to send data to Bigtable.
D. Stream data to Dataflow, and use Storage Transfer Service to send data to BigQuery.
Show Answer
Correct Answer: A
Explanation:
For a Google Cloud data lake ingesting high-volume IoT streams with both structured and unstructured data, the recommended architecture is Pub/Sub for scalable, resilient ingestion, Dataflow for stream processing, and Cloud Storage as the durable data lake. Storage Transfer Service is not used for streaming Pub/Sub ingestion, and BigQuery is a data warehouse rather than a data lake. Dataprep is not the streaming ingestion component for this use case.

Question 123

You are running a web application on Cloud Run for a few hundred users. Some of your users complain that the initial web page of the application takes much longer to load than the following pages. You want to follow Google’s recommendations to mitigate the issue. What should you do?

A. Set the minimum number of instances for your Cloud Run service to 3.
B. Set the concurrency number to 1 for your Cloud Run service.
C. Set the maximum number of instances for your Cloud Run service to 100.
D. Update your web application to use the protocol HTTP/2 instead of HTTP/1.1.
Show Answer
Correct Answer: A
Explanation:
The symptom describes Cloud Run cold starts: the first request to a newly started instance is slower, while subsequent requests are faster. Google's recommended mitigation is to configure a minimum number of instances greater than zero so warm instances are kept ready to serve traffic. Setting concurrency to 1 can increase the number of cold starts, increasing the maximum instances does not reduce startup latency, and switching to HTTP/2 may improve some networking characteristics but does not address Cloud Run cold starts.

Question 124

An external member of your team needs list access to compute images and disks in one of your projects. You want to follow Google-recommended practices when you grant the required permissions to this user. What should you do?

A. Create a custom role, and add all the required compute.disks.list and compute.images.list permissions as includedPermissions. Grant the custom role to the user at the project level.
B. Create a custom role based on the Compute Image User role. Add the compute.disks.list to the includedPermissions field. Grant the custom role to the user at the project level.
C. Create a custom role based on the Compute Storage Admin role. Exclude unnecessary permissions from the custom role. Grant the custom role to the user at the project level.
D. Grant the Compute Storage Admin role at the project level.
Show Answer
Correct Answer: A
Explanation:
The requirement is only to grant list access to compute images and disks while following least privilege. A custom role containing only compute.images.list and compute.disks.list grants exactly the required permissions. B inherits additional permissions from Compute Image User (such as using images to create resources), which exceeds the stated requirement. C and D are based on the broad Compute Storage Admin role and grant unnecessary administrative privileges.

Question 125

Your team is using Linux instances on Google Cloud. You need to ensure that your team logs in to these instances in the most secure and cost efficient way. What should you do?

A. Attach a public IP to the instances and allow incoming connections from the internet on port 22 for SSH.
B. Use the gcloud compute ssh command with the --tunnel-through-iap flag. Allow ingress traffic from the IP range 35.235.240.0/20 on port 22.
C. Use a third party tool to provide remote access to the instances.
D. Create a bastion host with public internet access. Create the SSH tunnel to the instance through the bastion host.
Show Answer
Correct Answer: B
Explanation:
Identity-Aware Proxy (IAP) TCP forwarding with `gcloud compute ssh --tunnel-through-iap` is Google's recommended secure approach for SSH access to Linux VM instances without exposing them directly to the internet. It avoids public IP exposure and the operational overhead of a bastion host. To use IAP TCP forwarding, firewall rules must allow ingress on TCP port 22 from the IAP IP range `35.235.240.0/20`.

Question 126

You are running out of primary internal IP addresses in a subnet for a custom mode VPC. The subnet has the IP range 10.0.0.0/20, and the IP addresses are primarily used by virtual machines in the project. You need to provide more IP addresses for the virtual machines. What should you do?

A. Add a secondary IP range 10.1.0.0/20 to the subnet.
B. Change the subnet IP range from 10.0.0.0/20 to 10.0.0.0/18.
C. Change the subnet IP range from 10.0.0.0/20 to 10.0.0.0/22.
D. Convert the subnet IP range from IPv4 to IPv6.
Show Answer
Correct Answer: B
Explanation:
Virtual machines receive their primary internal IP addresses from the subnet's primary IPv4 range. If you are running out of primary internal IPs, the correct solution is to expand the subnet's primary IPv4 CIDR range to a larger block that contains the existing range, such as changing 10.0.0.0/20 to 10.0.0.0/18. A secondary IP range is used for alias IPs, not to increase the pool of primary IP addresses for VM NICs. Shrinking the subnet (/22) reduces addresses, and converting to IPv6 does not solve the need for additional IPv4 primary internal addresses.

Question 127

Your company has multiple projects linked to a single billing account in Google Cloud. You need to visualize the costs with specific metrics that should be dynamically calculated based on company-specific criteria. You want to automate the process. What should you do?

A. In the Google Cloud console, visualize the costs related to the projects in the Reports section.
B. In the Google Cloud console, visualize the costs related to the projects in the Cost breakdown section.
C. In the Google Cloud console, use the export functionality of the Cost table. Create a Looker Studio dashboard on top of the CSV export.
D. Configure Cloud Billing data export to BigQuery for the billing account. Create a Looker Studio dashboard on top of the BigQuery export.
Show Answer
Correct Answer: D
Explanation:
Exporting Cloud Billing data to BigQuery provides an automated, continuously updated dataset that supports custom SQL-based calculations and company-specific metrics. Looker Studio can connect directly to BigQuery to build dynamic dashboards. The built-in Reports and Cost breakdown views are limited to predefined visualizations, and exporting a CSV from the Cost table is not an automated solution.

Question 128

You are building a multi-player gaming application that will store game information in a database. As the popularity of the application increases, you are concerned about delivering consistent performance. You need to ensure an optimal gaming performance for global users, without increasing the management complexity. What should you do?

A. Use Cloud SQL database with cross-region replication to store game statistics in the EU, US, and APAC regions.
B. Use Cloud Spanner to store user data mapped to the game statistics.
C. Use BigQuery to store game statistics with a Redis on Memorystore instance in the front to provide global consistency.
D. Store game statistics in a Bigtable database partitioned by username.
Show Answer
Correct Answer: B
Explanation:
Cloud Spanner is designed for globally distributed applications requiring strong consistency, horizontal scalability, high availability, and predictable performance with minimal operational overhead. These characteristics fit a global multiplayer gaming application. Cloud SQL does not provide the same global scalability, BigQuery is an analytics database rather than an OLTP datastore, and Bigtable offers high throughput but not the relational, strongly consistent global database capabilities needed for this use case.

Question 129

You are building an application that stores relational data from users. Users across the globe will use this application. Your CTO is concerned about the scaling requirements because the size of the user base is unknown. You need to implement a database solution that can scale with your user growth with minimum configuration changes. Which storage solution should you use?

A. Cloud SQL
B. Firestore
C. Cloud Spanner
D. Bigtable
Show Answer
Correct Answer: C
Explanation:
Cloud Spanner is a globally distributed relational database designed for horizontal scalability with strong consistency. It supports SQL and relational schemas while scaling transparently across regions with minimal configuration changes, making it the best fit for an unknown global user base. Cloud SQL is relational but scales vertically with more operational constraints, Firestore is NoSQL rather than relational, and Bigtable is a wide-column NoSQL database.

Question 130

You deployed an application on a managed instance group in Compute Engine. The application accepts Transmission Control Protocol (TCP) traffic on port 389 and requires you to preserve the IP address of the client who is making a request. You want to expose the application to the internet by using a load balancer. What should you do?

A. Expose the application by using an external TCP Network Load Balancer.
B. Expose the application by using a TCP Proxy Load Balancer.
C. Expose the application by using an SSL Proxy Load Balancer.
D. Expose the application by using an internal TCP Network Load Balancer.
Show Answer
Correct Answer: A
Explanation:
Use an external TCP Network Load Balancer (passthrough Layer 4) because it exposes the service to the internet while preserving the original client source IP address. TCP Proxy and SSL Proxy load balancers terminate and proxy connections, so they do not preserve the client IP by default. An internal TCP Network Load Balancer is not internet-facing.

Question 131

You have an application that runs on Compute Engine VM instances in a custom Virtual Private Cloud (VPC). Your company’s security policies only allow the use of internal IP addresses on VM instances and do not let VM instances connect to the internet. You need to ensure that the application can access a file hosted in a Cloud Storage bucket within your project. What should you do?

A. Enable Private Service Access on the Cloud Storage Bucket.
B. Add storage.googleapis.com to the list of restricted services in a VPC Service Controls perimeter and add your project to the list of protected projects.
C. Enable Private Google Access on the subnet within the custom VP
D. Deploy a Cloud NAT instance and route the traffic to the dedicated IP address of the Cloud Storage bucket.
Show Answer
Correct Answer: C
Explanation:
VM instances without external IP addresses that need to access Google APIs and services such as Cloud Storage should use Private Google Access on the subnet. Private Service Access is for privately consuming supported managed services and does not apply to Cloud Storage. VPC Service Controls restricts access but does not provide network connectivity. Cloud NAT enables outbound internet access for VMs without external IPs, but Cloud Storage access does not require NAT when Private Google Access is enabled.

$19

Get all 323 questions with detailed answers and explanations

  • Instant download HTML + PDF delivered the moment payment clears.
  • Secure Stripe checkout we never see or store your card details.
  • 7-day refund if files are defective see our refund policy.