ExamGecko
Home Home / Google / Professional Cloud Developer

Google Professional Cloud Developer Practice Test - Questions Answers, Page 12

Question list
Search
Search

List of questions

Search

Related questions











You support an application that uses the Cloud Storage API. You review the logs and discover multiple HTTP 503 Service Unavailable error responses from the API. Your application logs the error and does not take any further action. You want to implement Google-recommended retry logic to improve success rates. Which approach should you take?

A.
Retry the failures in batch after a set number of failures is logged.
A.
Retry the failures in batch after a set number of failures is logged.
Answers
B.
Retry each failure at a set time interval up to a maximum number of times.
B.
Retry each failure at a set time interval up to a maximum number of times.
Answers
C.
Retry each failure at increasing time intervals up to a maximum number of tries.
C.
Retry each failure at increasing time intervals up to a maximum number of tries.
Answers
D.
Retry each failure at decreasing time intervals up to a maximum number of tries.
D.
Retry each failure at decreasing time intervals up to a maximum number of tries.
Answers
Suggested answer: C

Explanation:

https://cloud.google.com/storage/docs/retry-strategy

You need to redesign the ingestion of audit events from your authentication service to allow it to handle a large increase in traffic. Currently, the audit service and the authentication system run in the same Compute Engine virtual machine. You plan to use the following Google Cloud tools in the new architecture:

Multiple Compute Engine machines, each running an instance of the authentication service

Multiple Compute Engine machines, each running an instance of the audit service

Pub/Sub to send the events from the authentication services.

How should you set up the topics and subscriptions to ensure that the system can handle a large volume of messages and can scale efficiently?

A.
Create one Pub/Sub topic. Create one pull subscription to allow the audit services to share the messages.
A.
Create one Pub/Sub topic. Create one pull subscription to allow the audit services to share the messages.
Answers
B.
Create one Pub/Sub topic. Create one pull subscription per audit service instance to allow the services to share the messages.
B.
Create one Pub/Sub topic. Create one pull subscription per audit service instance to allow the services to share the messages.
Answers
C.
Create one Pub/Sub topic. Create one push subscription with the endpoint pointing to a load balancer in front of the audit services.
C.
Create one Pub/Sub topic. Create one push subscription with the endpoint pointing to a load balancer in front of the audit services.
Answers
D.
Create one Pub/Sub topic per authentication service. Create one pull subscription per topic to be used by one audit service.
D.
Create one Pub/Sub topic per authentication service. Create one pull subscription per topic to be used by one audit service.
Answers
E.
Create one Pub/Sub topic per authentication service. Create one push subscription per topic, with the endpoint pointing to one audit service.
E.
Create one Pub/Sub topic per authentication service. Create one push subscription per topic, with the endpoint pointing to one audit service.
Answers
Suggested answer: A

Explanation:

https://cloud.google.com/pubsub/docs/subscriber 'Multiple subscribers can make pull calls to the same 'shared' subscription. Each subscriber will receive a subset of the messages.'

You are developing a marquee stateless web application that will run on Google Cloud. The rate of the incoming user traffic is expected to be unpredictable, with no traffic on some days and large spikes on other days. You need the application to automatically scale up and down, and you need to minimize the cost associated with running the application. What should you do?

A.
Build the application in Python with Firestore as the database. Deploy the application to Cloud Run.
A.
Build the application in Python with Firestore as the database. Deploy the application to Cloud Run.
Answers
B.
Build the application in C# with Firestore as the database. Deploy the application to App Engine flexible environment.
B.
Build the application in C# with Firestore as the database. Deploy the application to App Engine flexible environment.
Answers
C.
Build the application in Python with CloudSQL as the database. Deploy the application to App Engine standard environment.
C.
Build the application in Python with CloudSQL as the database. Deploy the application to App Engine standard environment.
Answers
D.
Build the application in Python with Firestore as the database. Deploy the application to a Compute Engine managed instance group with autoscaling.
D.
Build the application in Python with Firestore as the database. Deploy the application to a Compute Engine managed instance group with autoscaling.
Answers
Suggested answer: A

You have written a Cloud Function that accesses other Google Cloud resources. You want to secure the environment using the principle of least privilege. What should you do?

A.
Create a new service account that has Editor authority to access the resources. The deployer is given permission to get the access token.
A.
Create a new service account that has Editor authority to access the resources. The deployer is given permission to get the access token.
Answers
B.
Create a new service account that has a custom IAM role to access the resources. The deployer is given permission to get the access token.
B.
Create a new service account that has a custom IAM role to access the resources. The deployer is given permission to get the access token.
Answers
C.
Create a new service account that has Editor authority to access the resources. The deployer is given permission to act as the new service account.
C.
Create a new service account that has Editor authority to access the resources. The deployer is given permission to act as the new service account.
Answers
D.
Create a new service account that has a custom IAM role to access the resources. The deployer is given permission to act as the new service account.
D.
Create a new service account that has a custom IAM role to access the resources. The deployer is given permission to act as the new service account.
Answers
Suggested answer: D

You are a SaaS provider deploying dedicated blogging software to customers in your Google Kubernetes Engine (GKE) cluster. You want to configure a secure multi-tenant platform to ensure that each customer has access to only their own blog and can't affect the workloads of other customers. What should you do?

A.
Enable Application-layer Secrets on the GKE cluster to protect the cluster.
A.
Enable Application-layer Secrets on the GKE cluster to protect the cluster.
Answers
B.
Deploy a namespace per tenant and use Network Policies in each blog deployment.
B.
Deploy a namespace per tenant and use Network Policies in each blog deployment.
Answers
C.
Use GKE Audit Logging to identify malicious containers and delete them on discovery.
C.
Use GKE Audit Logging to identify malicious containers and delete them on discovery.
Answers
D.
Build a custom image of the blogging software and use Binary Authorization to prevent untrusted image deployments.
D.
Build a custom image of the blogging software and use Binary Authorization to prevent untrusted image deployments.
Answers
Suggested answer: B

You have decided to migrate your Compute Engine application to Google Kubernetes Engine. You need to build a container image and push it to Artifact Registry using Cloud Build. What should you do? (Choose two.)

A)

Run gcloud builds submit in the directory that contains the application source code.

B)

Run gcloud run deploy app-name --image gcr.io/$PROJECT_ID/app-name in the directory that contains the application source code.

C)

Run gcloud container images add-tag gcr.io/$PROJECT_ID/app-name gcr.io/$PROJECT_ID/app-name:latest in the directory that contains the application source code.

D)

In the application source directory, create a file named cloudbuild.yaml that contains the following contents:

E)

In the application source directory, create a file named cloudbuild.yaml that contains the following contents:

A.
Option A
A.
Option A
Answers
B.
Option B
B.
Option B
Answers
C.
Option C
C.
Option C
Answers
D.
Option D
D.
Option D
Answers
E.
Option E
E.
Option E
Answers
Suggested answer: A, D

Explanation:

https://cloud.google.com/sdk/gcloud/reference/builds/submit

https://cloud.google.com/artifact-registry/docs/configure-cloud-build

You are developing an internal application that will allow employees to organize community events within your company. You deployed your application on a single Compute Engine instance. Your company uses Google Workspace (formerly G Suite), and you need to ensure that the company employees can authenticate to the application from anywhere. What should you do?

A.
Add a public IP address to your instance, and restrict access to the instance using firewall rules. Allow your company's proxy as the only source IP address.
A.
Add a public IP address to your instance, and restrict access to the instance using firewall rules. Allow your company's proxy as the only source IP address.
Answers
B.
Add an HTTP(S) load balancer in front of the instance, and set up Identity-Aware Proxy (IAP). Configure the IAP settings to allow your company domain to access the website.
B.
Add an HTTP(S) load balancer in front of the instance, and set up Identity-Aware Proxy (IAP). Configure the IAP settings to allow your company domain to access the website.
Answers
C.
Set up a VPN tunnel between your company network and your instance's VPC location on Google Cloud. Configure the required firewall rules and routing information to both the on-premises and Google Cloud networks.
C.
Set up a VPN tunnel between your company network and your instance's VPC location on Google Cloud. Configure the required firewall rules and routing information to both the on-premises and Google Cloud networks.
Answers
D.
Add a public IP address to your instance, and allow traffic from the internet. Generate a random hash, and create a subdomain that includes this hash and points to your instance. Distribute this DNS address to your company's employees.
D.
Add a public IP address to your instance, and allow traffic from the internet. Generate a random hash, and create a subdomain that includes this hash and points to your instance. Distribute this DNS address to your company's employees.
Answers
Suggested answer: B

Explanation:

https://cloud.google.com/blog/topics/developers-practitioners/control-access-your-web-sites-identity-aware-proxy

Your development team is using Cloud Build to promote a Node.js application built on App Engine from your staging environment to production. The application relies on several directories of photos stored in a Cloud Storage bucket named webphotos-staging in the staging environment. After the promotion, these photos must be available in a Cloud Storage bucket named webphotos-prod in the production environment. You want to automate the process where possible. What should you do?

A)

Manually copy the photos to webphotos-prod.

B)

Add a startup script in the application's app.yami file to move the photos from webphotos-staging to webphotos-prod.

C)

Add a build step in the cloudbuild.yaml file before the promotion step with the arguments:

D)

Add a build step in the cloudbuild.yaml file before the promotion step with the arguments:

A.
Option A
A.
Option A
Answers
B.
Option B
B.
Option B
Answers
C.
Option C
C.
Option C
Answers
D.
Option D
D.
Option D
Answers
Suggested answer: C

Explanation:

https://cloud.google.com/storage/docs/gsutil/commands/cp

You are developing a web application that will be accessible over both HTTP and HTTPS and will run on Compute Engine instances. On occasion, you will need to SSH from your remote laptop into one of the Compute Engine instances to conduct maintenance on the app. How should you configure the instances while following Google-recommended best practices?

A.
Set up a backend with Compute Engine web server instances with a private IP address behind a TCP proxy load balancer.
A.
Set up a backend with Compute Engine web server instances with a private IP address behind a TCP proxy load balancer.
Answers
B.
Configure the firewall rules to allow all ingress traffic to connect to the Compute Engine web servers, with each server having a unique external IP address.
B.
Configure the firewall rules to allow all ingress traffic to connect to the Compute Engine web servers, with each server having a unique external IP address.
Answers
C.
Configure Cloud Identity-Aware Proxy API for SSH access. Then configure the Compute Engine servers with private IP addresses behind an HTTP(s) load balancer for the application web traffic.
C.
Configure Cloud Identity-Aware Proxy API for SSH access. Then configure the Compute Engine servers with private IP addresses behind an HTTP(s) load balancer for the application web traffic.
Answers
D.
Set up a backend with Compute Engine web server instances with a private IP address behind an HTTP(S) load balancer. Set up a bastion host with a public IP address and open firewall ports. Connect to the web instances using the bastion host.
D.
Set up a backend with Compute Engine web server instances with a private IP address behind an HTTP(S) load balancer. Set up a bastion host with a public IP address and open firewall ports. Connect to the web instances using the bastion host.
Answers
Suggested answer: C

Explanation:

https://cloud.google.com/solutions/connecting-securely#storing_host_keys_by_enabling_guest_attributes

You have a mixture of packaged and internally developed applications hosted on a Compute Engine instance that is running Linux. These applications write log records as text in local files. You want the logs to be written to Cloud Logging. What should you do?

A.
Pipe the content of the files to the Linux Syslog daemon.
A.
Pipe the content of the files to the Linux Syslog daemon.
Answers
B.
Install a Google version of fluentd on the Compute Engine instance.
B.
Install a Google version of fluentd on the Compute Engine instance.
Answers
C.
Install a Google version of collectd on the Compute Engine instance.
C.
Install a Google version of collectd on the Compute Engine instance.
Answers
D.
Using cron, schedule a job to copy the log files to Cloud Storage once a day.
D.
Using cron, schedule a job to copy the log files to Cloud Storage once a day.
Answers
Suggested answer: B
Total 265 questions
Go to page: of 27