Courseiva

CCNA Planning and Configuring a Cloud Solution Questions

71 questions · Planning and Configuring a Cloud Solution · All types, answers revealed

1
MCQmedium

A company wants to use Cloud Run to deploy a containerized API that requires up to 8 GB of memory per request. The API experiences unpredictable traffic spikes. They want to minimize cost while ensuring fast cold starts. Which configuration should they use?

A.Use Cloud Run jobs instead of Cloud Run service
B.Deploy the container to GKE Autopilot with a single pod
C.Set max-instances to a high number and min-instances to 0 with CPU always allocated
D.Set min-instances to 1 and max-instances to a value that handles peak traffic with CPU throttled
AnswerD

Setting min-instances to 1 keeps one container instance always warm, eliminating the cold start for the first request after idle periods. A max-instances value calibrated to peak traffic caps both concurrent capacity and monthly cost, preventing unbounded scaling. CPU throttled (the default) charges only for CPU time used while processing requests, so the idle warm instance costs nothing for CPU, making this configuration both cost-effective and responsive to unpredictable traffic spikes.

Why this answer

Cloud Run supports up to 8 GB memory per container (as of 2024). Setting min-instances to a small number (e.g., 1) reduces cold starts, while max-instances limits costs during spikes. CPU boost can also speed up cold starts.

Using CPU always allocated increases costs, so CPU throttled (default) is fine. The question emphasizes cost minimization, so setting a minimal min-instances is appropriate.

2
MCQmedium

A company wants to set up a hybrid network between their on-premises data center and Google Cloud. They need a highly available VPN connection with 99.99% SLA. Which VPN solution should they choose?

A.Classic VPN
B.HA VPN
C.Cloud Interconnect
D.Cloud NAT
AnswerB

HA VPN uses two external IP addresses and two tunnels to the same on-premises peer, and when paired with two on-premises VPN gateways, it achieves a 99.99% SLA. It relies on BGP to automatically fail over if one tunnel or gateway becomes unavailable, providing true high availability and making it the correct choice here.

Why this answer

HA VPN offers a 99.99% SLA (with certain conditions) when configured with two interfaces and two tunnels to two on-premises VPN gateways. Classic VPN does not provide an SLA.

3
MCQeasy

A company wants to run a stateless containerized web application that scales to zero when not in use. The application receives HTTP requests and must be billed only for the resources consumed during request processing. Which Google Cloud compute service is most appropriate?

A.Google Kubernetes Engine (GKE) Standard
B.Cloud Run
C.Cloud Functions
D.Compute Engine
AnswerB

Cloud Run is correct because it runs stateless container images on a fully managed, serverless platform that scales automatically from zero to thousands of instances based on HTTP traffic. You only pay for requests while the container is processing, and you don't manage servers or clusters, so a stateless containerized web application can be deployed with a single command.

Why this answer

Cloud Run is a serverless container platform that scales to zero and charges per request, CPU, and memory used during request processing. It is ideal for stateless HTTP-triggered workloads.

4
MCQmedium

A company is migrating a legacy monolithic application to Google Cloud. The application has unpredictable traffic patterns and long-running connections. The team wants to minimize operational overhead and only pay for resources when the application is processing requests. Which compute option should they choose?

A.Google Kubernetes Engine (GKE) Autopilot cluster
B.Compute Engine with managed instance groups and autoscaling
C.Google Kubernetes Engine (GKE) Standard cluster with node autoscaling
D.Cloud Run
AnswerD

Cloud Run runs stateless containers in a fully managed environment that scales from zero to the number of concurrent requests and bills only for the CPU, memory, and requests consumed during a request. There is no infrastructure to provision, no idle capacity to pay for, and the platform enforces a request deadline, making it ideal for an HTTP-driven legacy application with unpredictable traffic. Its per-request billing and automatic scaling mean you pay nothing when the service is not being called.

Why this answer

Cloud Run is a serverless compute platform that scales to zero when not in use, has a per-request billing model, and supports HTTP-triggered container workloads. It can handle long-running connections as long as they stay within the request timeout limit. Cloud Run minimizes operational overhead by eliminating server management and scaling automatically.

5
MCQeasy

An organization needs a NoSQL document database with real-time synchronization across multiple client devices. Which Google Cloud service should they use?

A.Firestore
B.Cloud SQL
C.Cloud Bigtable
D.Cloud Datastore
AnswerA

Firestore is a fully managed NoSQL document database that stores data in documents organized into collections. It provides built-in real-time synchronization through client-side listeners, automatically pushing updates to subscribed apps whenever data changes, making it ideal for live, collaborative applications. It also includes offline support and strong consistency, which are key differentiators for real-time use cases.

Why this answer

Firestore is a NoSQL document database that provides real-time listeners for syncing data across devices, making it ideal for mobile and web applications requiring live updates.

6
MCQeasy

A user wants to estimate the monthly cost of running a Compute Engine VM with 8 vCPUs, 32 GB of memory, and a 100 GB persistent disk in us-central1 for one year. They plan to use the VM 24/7. Which tool should they use?

A.Google Cloud Pricing Calculator
B.Cloud Asset Inventory
C.Cloud Billing reports
D.Cloud Monitoring
AnswerA

The Google Cloud Pricing Calculator is the correct tool for estimating monthly costs before deployment. You can select specific Google Cloud products and configure parameters such as region, VM machine type, RAM, storage class, and committed usage discounts to generate a projected total. It accepts hypothetical inputs and even provides a machine configurator for GKE and Compute Engine, producing a line-itemized estimate suitable for budgeting and capacity planning.

Why this answer

The Google Cloud Pricing Calculator allows users to estimate costs for GCP services, including Compute Engine instances with specific machine types, persistent disks, and usage duration.

7
MCQhard

A developer is deploying a Cloud Function that processes messages from a Pub/Sub topic. The function takes 10 minutes to complete each message. The developer needs to ensure that messages are not lost if the function fails. Which Cloud Function generation and configuration should they use?

A.Cloud Functions (2nd gen) with an event-driven trigger from Pub/Sub and retry on failure
B.Cloud Functions (1st gen) with an HTTP trigger and a Pub/Sub push subscription
C.Cloud Functions (2nd gen) with an HTTP trigger
D.Cloud Functions (1st gen) with a background function and retry on failure
AnswerA

Cloud Functions (2nd gen) with an event-driven trigger from Pub/Sub and retry on failure is correct because 2nd gen functions are built on Eventarc and Cloud Run, which natively subscribe to Pub/Sub topics and invoke the function asynchronously when messages arrive. The 2nd gen runtime supports a maximum timeout of 60 minutes, comfortably covering the 10-minute processing window, and when combined with a retry policy, transient failures will cause the message to be redelivered without hitting a timeout ceiling.

Why this answer

Cloud Functions (2nd gen) supports longer timeouts (up to 60 minutes) and event-driven triggers like Pub/Sub with retries. 1st gen has a max timeout of 9 minutes. Retry on failure is configured in the subscription. Background functions are 1st gen.

8
MCQeasy

A company wants to run a stateful application that requires persistent storage on individual VMs. The VMs are not part of a managed instance group. Which Google Cloud storage option is best for this use case?

A.Local SSD
B.Cloud Storage
C.Filestore
D.Persistent Disk
AnswerD

Persistent Disk provides durable, block-level storage that behaves like a physical disk attached to your VM. It survives VM stops and deletions, supports snapshots, and offers zonal or regional redundancy for high availability. With performance tiers like pd-standard, pd-balanced, and pd-ssd, Persistent Disk directly meets the persistence and I/O requirements of a stateful application.

Why this answer

Persistent disks are durable block storage that can be attached to a single VM and persist independently of the VM lifecycle. Cloud Storage is object storage; Filestore is file storage; local SSDs are ephemeral and lose data on VM stop/termination.

9
MCQmedium

A DevOps engineer is using the Google Cloud Pricing Calculator to estimate the monthly cost of a Compute Engine VM running 24/7 for one month. The engineer selects a machine type and adds sustained use discounts. What is the correct way to apply sustained use discounts in the calculator?

A.Manually enter a discount percentage
B.The calculator automatically applies sustained use discounts based on monthly usage
C.Select 'Sustained Use Discount' checkbox
D.Sustained use discounts are not applicable to Compute Engine
AnswerB

When you configure Compute Engine resources in the Google Cloud Pricing Calculator, the tool estimates the monthly run time for each VM and automatically applies the applicable sustained use discount. SUD tiers are calculated without any user action: resources running more than 25% of the month receive a discount that increases incrementally until reaching a maximum of 20% off for the portion of the month after a full month of usage. This auto-application makes the estimate reflect actual billing.

Why this answer

Sustained use discounts are automatically applied by Google Cloud based on the number of hours a VM runs per month. The calculator includes them automatically when you specify the monthly usage.

10
MCQeasy

An engineer needs to create a Cloud Storage bucket for storing archival data that will be accessed less than once a year. The data must be stored durably and cost-effectively. Which storage class should the engineer use?

A.Coldline
B.Standard
C.Archive
D.Nearline
AnswerC

Archive is correct because it is the only Google Cloud storage class specifically designed for data accessed less than once a year, offering the lowest storage cost. It is ideal for long-term retention, regulatory archives, or disaster recovery backups, with the trade-off of higher retrieval fees and a 365-day minimum storage duration before deletion or class change.

Why this answer

Archive storage class is designed for data accessed less than once a year, with the lowest storage cost but higher retrieval costs and a 365-day minimum storage duration. It is ideal for long-term archival.

11
MCQmedium

A company needs to provide outbound internet access to private Compute Engine instances that do not have external IP addresses. The instances must be able to download updates from the internet. Which service should be configured?

A.VPC peering
B.Cloud VPN
C.Cloud NAT
D.Private Google Access
AnswerC

Cloud NAT is a managed source network address translation service that enables instances without external IP addresses to make outbound connections to the internet while allowing only corresponding return traffic. It works with Cloud Router to automatically configure NAT for a VPC network and supports mapping of private IPs to a set of external IP addresses, making it the correct solution for this requirement.

Why this answer

Cloud NAT enables private instances to access the internet for outbound connections while blocking inbound connections from the internet.

12
MCQmedium

An organization stores sensitive data in Cloud Storage. They need to ensure that objects are encrypted at rest using a key that they manage and rotate themselves. Which Cloud Storage encryption option should they use?

A.Use customer-supplied encryption keys (CSEK)
B.Use customer-managed encryption keys (CMEK)
C.Use client-side encryption
D.Use Google-managed encryption keys
AnswerB

CMEK lets you create and manage encryption keys in Cloud KMS, and Cloud Storage uses them to encrypt your objects server-side. You control the key lifecycle, including automatic rotation periods, and can grant or revoke access through IAM identities and conditions. This provides a central audit trail and the ability to disable or destroy keys instantly, which is exactly what the organization needs for sensitive data.

Why this answer

Customer-managed encryption keys (CMEK) allow you to manage your own keys via Cloud KMS. Google-managed keys are default. Client-side encryption is done before upload.

Supplied keys are also customer-provided but not managed via KMS.

13
MCQmedium

A company wants to use Cloud Functions to process events from Cloud Storage when new objects are uploaded. They need the function to run in a specific VPC network for tight security. Which Cloud Functions generation supports VPC connectivity?

A.Cloud Functions (2nd gen) with VPC connector
B.Cloud Functions (1st gen) with VPC connector
C.Cloud Functions (2nd gen) with Cloud VPN
D.Cloud Functions (1st gen) with Cloud NAT
AnswerA

Cloud Functions (2nd gen) is built on Cloud Run and supports a Serverless VPC Access connector that makes the function a first-class citizen inside your VPC. With 2nd gen you can attach a VPC connector and set egress settings to route all outbound traffic through it, so the function can reach private resources using internal IPs. This also enables private inbound triggers, meaning the function can be invoked internally within the VPC, which is exactly what is needed to process events from a private resource.

Why this answer

Cloud Functions (2nd gen) is built on Cloud Run and supports VPC connectivity via connectors or direct VPC. 1st gen does not support VPC connectors for ingress/egress in the same way. 2nd gen is recommended for VPC network integration.

14
MCQmedium

A company needs to run a batch job every hour on a Compute Engine VM. The VM should be terminated after the job completes to save costs. The job is run from a script inside a custom container image stored in Container Registry. Which approach is the most cost-effective?

A.Create a VM with a preemptible instance setting and a startup script that runs the container, then shuts down the VM
B.Use a managed instance group with autoscaling and a target CPU load of 0%
C.Use a regular VM and stop it manually when the job finishes
D.Use Cloud Run with a scheduled job
AnswerA

This is correct because a preemptible VM costs significantly less than a standard VM and is ideal for fault-tolerant batch processing. The startup script automatically runs the container when the VM boots, and once the job completes, the script shuts down the VM to stop compute billing. Although preemptible VMs can be reclaimed by Google at any time, a job running hourly can simply retry on the next scheduled run. You still pay for the persistent disk while the VM exists, but the compute cost savings far outweigh that.

Why this answer

Compute Engine preemptible VMs are up to 60-91% cheaper than regular VMs. For batch jobs that can be interrupted, they are highly cost-effective. Combining with a startup script that pulls and runs the container, and having the script shut down the VM after the job, minimizes costs.

15
Multi-Selectmedium

A company has a Compute Engine instance that needs to access the internet for software updates, but the instance only has an internal IP address. Which TWO steps are required to enable outbound internet connectivity while keeping the instance private?

Select 2 answers
A.Create a VPC peering connection to a network with internet access
B.Create a firewall rule that allows egress traffic to the internet
C.Create a Cloud NAT gateway in the same region and VPC as the instance
D.Attach the instance to a load balancer
E.Assign a public IP address to the instance
AnswersB, C

A firewall rule that allows egress traffic to the internet is mandatory for any outbound connectivity, even when Cloud NAT is used. Cloud NAT only translates the source IP, but the VPC firewall still evaluates all traffic and drops it unless a rule permits traffic to destination 0.0.0.0/0 with a source tag or service account you apply to the instance. Without an egress allow rule, the NAT translation never gets the chance to send packets, because the firewall is applied before the packet leaves the instance's VPC network.

Why this answer

Cloud NAT allows instances with only internal IP addresses to access the internet for outbound connections. You also need to configure firewall rules to allow egress traffic (e.g., allow HTTP/HTTPS). A NAT gateway without firewall rules will not work.

16
MCQmedium

A company is planning a lift-and-shift migration of an on-premises monolithic application to Google Cloud. The application runs on a single server and requires a specific kernel module that is not supported by Google Cloud's container-optimized OS. Which compute service should they use?

A.Compute Engine
B.Google Kubernetes Engine (GKE)
C.Cloud Run
D.Cloud Functions
AnswerA

Compute Engine is the correct choice because it provides unmodified, full control over the virtual machine, including the guest OS kernel. You can install custom kernel modules, load them via modprobe, and configure kernel parameters exactly as required by the legacy monolithic application. This is essential for a lift-and-shift migration where the application depends on specific low-level OS features or hardware drivers that cannot be abstracted away by a managed platform.

Why this answer

Compute Engine offers full control over the VM, including choice of OS and kernel modules. GKE and Cloud Run use container-optimized OS, and Cloud Functions is serverless and unsuitable for a monolithic app.

17
Multi-Selecthard

A company wants to migrate a large on-premises MySQL database to Cloud SQL with minimal downtime. Which TWO steps should they take?

Select 2 answers
A.Set up a Cloud VPN connection between on-premises and Google Cloud
B.Use Database Migration Service (DMS) with continuous replication
C.Configure a read replica on-premises and promote it in Google Cloud
D.Use gcloud sql import command for the final migration
E.Export the database to a SQL dump file and import it to Cloud SQL
AnswersA, B

A Cloud VPN tunnel is a prerequisite, not an alternative to DMS: Database Migration Service connects to your on-premises MySQL over a private IP address, and the VPN provides the secure, encrypted network path across the public internet. Without this connectivity, DMS cannot establish the replication channel needed for continuous sync. High-bandwidth, low-latency Interconnect is the alternative when VPN bandwidth is insufficient.

Why this answer

Database Migration Service (DMS) can migrate with minimal downtime using CDC. For the final cutover, a brief write-stop is required to ensure consistency.

18
Multi-Selecthard

A company needs to store and analyze large amounts of log data (hundreds of terabytes) with occasional SQL queries. The data is rarely accessed after 30 days and must be kept for compliance for 7 years. They want to minimize storage costs. Which three actions should they take? (Choose THREE.)

Select 3 answers
A.Use Cloud Storage Object Lifecycle Management to move objects to Nearline after 30 days, then to Coldline after 90 days, then to Archive after 1 year
B.Store the data in BigQuery and use clustering on frequently filtered columns
C.Export older partitions from BigQuery to Cloud Storage and delete them from BigQuery after 30 days
D.Store the data in BigQuery and set an expiration on the table to delete data after 30 days
E.Use BigQuery partitions based on ingestion time and set partition expiration to 30 days
AnswersA, B, C

Cloud Storage Object Lifecycle Management lets you define age-based rules that automatically transition objects from Standard to Nearline after 30 days, to Coldline after 90 days, and to Archive after 365 days. This reduces storage costs progressively while still making the logs retrievable for the required 7-year compliance window. Because objects remain in the bucket throughout, no data is deleted, and Archive class is specifically designed for long-term retention with the lowest per-GB cost.

Why this answer

BigQuery is ideal for log analysis. For historical data, moving older data to lower-cost storage classes like NEARLINE or COLDLINE reduces cost. Partitioning and clustering improve query performance and reduce costs.

Cloud Storage is an alternative, but BigQuery is better for SQL queries.

19
MCQmedium

A company has a private VPC with instances that have only internal IP addresses. These instances need to download updates from the internet. Which Google Cloud service should they use to provide outbound internet connectivity?

A.Cloud NAT
B.Cloud VPN
C.Assign public IP addresses to the instances
D.Identity-Aware Proxy (IAP)
AnswerA

Cloud NAT uses a Cloud Router to provide a managed Network Address Translation service that gives private instances (those with internal IPs only) a secure path to the internet for outbound connections. It maintains stateful sessions so return traffic is allowed, but unsolicited inbound connections are blocked, preserving the private nature of the network.

Why this answer

Cloud NAT allows private instances to access the internet outbound while preventing inbound connections. Cloud VPN is for hybrid connectivity. Public IP addresses would expose the instances.

IAP is for SSH/RDP access.

20
MCQhard

A company is running a stateful application on a Compute Engine instance with a 200 GB persistent disk. They want to reduce costs by moving the disk to a lower-cost storage class, but the disk is currently in use. They plan to take a snapshot of the disk and create a new disk from the snapshot with the new storage class. However, they need minimal downtime. What is the correct approach?

A.Use the 'gcloud compute disks update' command to change the storage class while the disk is attached to a running VM
B.Create a new disk with the new storage class and use rsync to copy data from the old disk while both are attached to the same VM
C.Take a snapshot of the disk, create a new disk from the snapshot with the new storage class, then detach the old disk and attach the new disk to the same VM
D.Stop the VM, take a snapshot, create a new disk with the new storage class, and start the VM with the new disk
AnswerC

Take a snapshot of the disk while the VM is running to obtain a crash-consistent image of the filesystem; persistent disk snapshots are computed online and do not require stopping the instance. From that snapshot, create a new persistent disk with the desired storage class (for example, pd-balanced or pd-ssd). Then unmount the old disk, detach it from the VM, attach the newly created disk, and remount it at the same mount point; this limits downtime to the brief unmount/detach/attach/remount window rather than the entire snapshot and disk creation time.

Why this answer

To change the storage class of a persistent disk, you cannot directly change it; you must create a new disk from a snapshot. To minimize downtime, you can create a snapshot while the VM is running (crash-consistent if on a live instance), then create a new disk with the desired storage class, stop the VM, detach the old disk, attach the new disk, and start the VM. This results in a brief downtime but is the standard method.

21
MCQhard

An engineer is designing a VPC for a multi-tier application. The application has web servers that need direct internet access, and a private database tier that must not have public IP addresses. The database tier needs outbound internet access to download updates. Which network configuration should the engineer implement?

A.Place web servers in a subnet with Cloud NAT, and database servers in the same subnet without public IP
B.Place web servers in a subnet with public IPs, and database servers in a separate subnet with Cloud NAT and no public IP
C.Place both tiers in the same subnet with no public IPs and use Cloud NAT for all outbound traffic
D.Place web servers in a subnet with Cloud NAT, and database servers in a subnet with public IPs and firewall rules to restrict inbound
AnswerB

This is the recommended design because web servers get public IPs (or are behind an external load balancer) to accept inbound user connections, while database servers remain in a separate private subnet with no public IP, preventing direct internet access. Cloud NAT on the database subnet allows outbound internet requests for updates or external APIs without exposing the database to inbound traffic. Separate subnets also enable granular VPC firewall rules and routing policies between tiers, reducing the blast radius if the web tier is compromised.

Why this answer

Web servers should be in a subnet with public IPs or a Cloud NAT for outbound. The database tier must be in a private subnet without public IP, but needs outbound internet via Cloud NAT. This allows secure outbound without public exposure.

22
Multi-Selectmedium

A company is migrating a legacy monolithic application to Google Cloud. The application consists of a web frontend, a business logic layer, and a MySQL database. They want to minimise operational overhead and use managed services where possible. Which two services should they choose? (Choose TWO.)

Select 2 answers
A.Cloud Functions for the business logic
B.Cloud SQL for MySQL to host the database
C.Cloud Run for the frontend and business logic
D.Compute Engine to host the frontend and business logic
E.Cloud Spanner for the database
AnswersB, C

Cloud SQL for MySQL is a fully managed relational database service that provides automated backups, patching, replication, and high availability without requiring you to run MySQL yourself. It is a direct drop-in replacement for an existing MySQL database, preserving compatibility while eliminating the administrative burden of managing database infrastructure. This aligns with the migration goal of reducing operational overhead.

Why this answer

Cloud SQL provides a managed MySQL database, eliminating database administration. Cloud Run or GKE can host the frontend and logic, but Cloud Run is serverless and reduces overhead. Compute Engine would require more management.

23
MCQmedium

An organization wants to set up a hybrid cloud connection between their on-premises data center and Google Cloud VPC. They need high availability (99.99% SLA) and support for dynamic routing. Which connection method should they use?

A.Cloud NAT
B.Dedicated Interconnect
C.HA VPN with BGP
D.Classic VPN with static routing
AnswerC

HA VPN with BGP is the correct choice because it provides a 99.99% SLA through two redundant tunnels to a single VPC, ensuring high availability even if one tunnel fails. Using BGP for dynamic routing automatically advertises routes and allows failover to the active tunnel, and it supports policy-based routing and route priority. This fully managed solution works over the public internet, making it both reliable and cost-effective for a hybrid cloud connection without requiring physical infrastructure.

Why this answer

HA VPN provides a 99.99% SLA, supports dynamic routing via BGP, and offers two tunnels for redundancy. Dedicated Interconnect also offers high availability but is a physical connection with higher cost. Partner Interconnect is similar to HA VPN but also physical.

Classic VPN has no SLA.

24
MCQmedium

A company wants to run a batch job that processes files from a Cloud Storage bucket and writes results to BigQuery. The job runs once daily and can take up to 30 minutes. Which compute option is the most cost-effective and requires the least operational overhead?

A.GKE Autopilot cluster
B.Cloud Functions (2nd gen)
C.Cloud Run jobs
D.Compute Engine with a preemptible VM
AnswerC

Cloud Run jobs directly execute a containerized batch process to completion, scaling to zero immediately after the job finishes, so you pay only for the duration of execution (per-second billing). It supports long-running jobs (up to 24 hours), can be scheduled via Cloud Scheduler, and provides automatic retries, environment configuration, and VPC connectivity without managing servers or clusters. This makes it the most operationally simple and cost-effective option for a daily 30-minute file processing job.

Why this answer

Cloud Functions is event-driven, but for scheduled batch jobs, Cloud Run or Compute Engine are better. However, Cloud Run offers serverless execution with per-second billing and scales down to zero. It is cost-effective for short-lived jobs and requires minimal operational overhead.

25
MCQmedium

A developer is using Cloud Functions (Gen 2) which is based on Cloud Run. They need to handle events from Cloud Storage when a new object is uploaded. Which event type should they use?

A.google.cloud.storage.object.v1.metadataUpdated
B.google.cloud.storage.object.v1.finalized
C.google.cloud.storage.object.v1.deleted
D.google.cloud.storage.object.v1.archived
AnswerB

google.cloud.storage.object.v1.finalized is the correct Eventarc event type for Cloud Functions (2nd gen) that corresponds to a new object being uploaded or an existing object being overwritten in Cloud Storage. It is the standard event for processing a newly created object, matching the legacy 'object finalized' event but now delivered through Eventarc for 2nd gen functions.

Why this answer

In Cloud Functions Gen 2, the event type for Cloud Storage object finalization is 'google.cloud.storage.object.v1.finalized'.

26
MCQmedium

A company needs to store petabytes of time-series IoT sensor data and query it with single-digit millisecond latency at millions of reads per second. The data has a simple key-value structure with timestamps. Which Google Cloud database is MOST appropriate?

A.Cloud Bigtable
B.BigQuery
C.Firestore
D.Cloud Spanner
AnswerA

Bigtable is the correct choice: wide-column NoSQL, designed for time-series and IoT workloads, single-digit ms latency, and scales to millions of QPS with additional nodes.

Why this answer

Cloud Bigtable is designed for exactly this use case — petabyte-scale, low-latency (single-digit ms), high-throughput NoSQL storage for time-series, IoT, and financial data. It scales horizontally by adding nodes. BigQuery is optimised for analytics (seconds-to-minutes latency), Cloud SQL is for OLTP (limited to tens of thousands of QPS), and Firestore is for document data with hierarchical structure.

27
MCQeasy

Which Google Cloud service is a fully managed, serverless data warehouse for analytics at petabyte scale, with built-in machine learning capabilities and automatic scaling?

A.Cloud Storage
B.Dataproc
C.Cloud SQL
D.BigQuery
AnswerD

BigQuery is the correct answer because it is a fully managed, serverless data warehouse designed for petabyte-scale analytics using standard SQL. It automatically handles infrastructure provisioning, scaling, and high availability, with a columnar storage format and a powerful distributed query engine (Dremel). BigQuery also includes built-in features like BigQuery ML for in-database machine learning, partitioning/clustering for performance, and a pay-per-query pricing model, making it a true serverless data warehouse rather than a provisioning-based service.

Why this answer

BigQuery is a serverless, highly scalable data warehouse that supports SQL queries, automatic scaling, and integrated ML (BigQuery ML).

28
Multi-Selectmedium

A company wants to run a containerized application on Google Cloud with minimal operational overhead. The application is stateless and can tolerate cold starts. Which three compute services should they consider? (Choose three.)

Select 3 answers
A.GKE Autopilot
B.Compute Engine
C.Cloud Functions
D.GKE Standard
E.Cloud Run
AnswersA, C, E

Why this answer

Cloud Run, Cloud Functions, and GKE Autopilot are all serverless or fully managed container platforms with minimal operational overhead. Compute Engine and GKE Standard require node management.

29
MCQmedium

A company is migrating a legacy monolithic application to Google Cloud. The application requires persistent storage and must be highly available with automatic failover across zones. The workload has a moderate number of reads and writes. Which storage solution meets these requirements?

A.Compute Engine persistent disk attached to a VM in a managed instance group
B.Cloud Storage with object versioning
C.Cloud SQL with a regional (HA) configuration
D.Cloud Spanner
AnswerC

Cloud SQL with a regional (HA) configuration is the correct choice because it provides a fully managed relational database with automatic failover to a standby instance in a different zone within the same region. Data is synchronously replicated to the standby, so if the primary zone experiences an outage, Google Cloud promotes the standby with minimal disruption and no manual intervention. This gives the legacy monolithic application the ACID transactions, relational queries, and high availability it needs, at a cost and complexity level appropriate for moderate workloads.

Why this answer

Cloud SQL with regional (high availability) configuration replicates data synchronously to a standby instance in a different zone within the same region, providing automatic failover. It is ideal for legacy applications requiring relational database support (MySQL, PostgreSQL, SQL Server).

30
MCQeasy

A developer needs to deploy a containerized web application that experiences unpredictable traffic patterns, including long periods of no traffic. They want to minimize costs and only pay for resources when the application is serving requests. Which Google Cloud compute service is most suitable?

A.Cloud Run
B.Google Kubernetes Engine (GKE) Standard
C.Compute Engine with managed instance groups
D.Cloud Functions
AnswerA

Cloud Run scales to zero and charges per request, ideal for unpredictable traffic.

Why this answer

Cloud Run is a serverless container platform that scales to zero when not in use, charging only for resources during request processing.

31
MCQhard

A company uses Cloud SQL for PostgreSQL and wants to reduce costs for a development environment that is only used for 8 hours a day (Monday-Friday). The database is under 100 GB and does not require high availability. Which action is the most cost-effective?

A.Use a smaller machine type and add a read replica
B.Change the activation policy to ON_DEMAND
C.Migrate to Cloud Spanner for better cost efficiency
D.Enable deletion protection and manually stop the instance after hours, start it before hours
AnswerB

Setting the activation policy to ON_DEMAND tells Cloud SQL to shut down the instance when it has had no connections for a configurable idle period (default 15 minutes) and to start it automatically when a new connection arrives. While stopped, you are billed only for persistent storage and static IP allocation, not for vCPUs or memory, which is the dominant cost for intermittent workloads. This policy is ideal for development and test environments, but it is disabled for high-availability configurations because failover requires the instance to be always on. It also introduces a cold-start delay on every reconnect.

Why this answer

Cloud SQL supports activation policies: ALWAYS (runs 24/7) and ON_DEMAND (starts when a connection is made, stops after a period of inactivity). For development environments used only during business hours, ON_DEMAND can significantly reduce costs by stopping the instance when not in use.

32
MCQhard

A company has a VPC in auto mode and wants to create a VPN connection to an on-premises network using HA VPN. The on-premises VPN gateway supports only a single public IP address. Which configuration step is required to establish a functional HA VPN tunnel?

A.Configure the HA VPN gateway with two interfaces and use BGP to load balance traffic
B.Use a Cloud Router with custom route advertisements to the on-premises network
C.Create a Classic VPN tunnel instead of HA VPN
D.Configure the HA VPN gateway with only one interface and disable the second interface
AnswerD

For a peer VPN device that has only one public IP address, HA VPN supports using just one of its two interfaces: you create one tunnel from that interface and leave the second interface disabled or without a tunnel. This preserves the HA VPN gateway object and allows the existing Cloud Router/BGP session to operate over the single tunnel, matching the on-premises endpoint's capability. It is the documented configuration when the peer lacks the second IP needed for a fully redundant HA VPN pair.

Why this answer

HA VPN normally requires two interfaces (two public IPs) for redundancy. If the on-premises gateway supports only one IP, you can configure the Cloud VPN tunnel to use a single interface (interface 0) and disable the second interface. Alternatively, you can create a Classic VPN tunnel, but Classic VPN is not recommended.

The correct approach is to use HA VPN with only one interface enabled.

33
MCQhard

An organization needs to run a batch analytics job daily that processes 500 GB of data stored in Cloud Storage. The job runs for 2 hours each day and can tolerate occasional failures. The team wants to minimize compute costs. Which compute option is most cost-effective?

A.Compute Engine with sole-tenant nodes
B.Compute Engine with preemptible VMs
C.Compute Engine with standard VMs and sustained use discount
D.Compute Engine with committed use discount for 1 year
AnswerB

Preemptible VMs are Compute Engine instances that are up to 80% cheaper than standard VMs and are ideal for fault-tolerant, batch workloads. They can be terminated by Google at any time within their maximum runtime of 24 hours, so the job must be checkpointed or designed to restart gracefully. Since the batch job runs daily and is inherently tolerant of interruption, using preemptible VMs maximizes cost savings without sacrificing correctness, making this the most cost-effective choice.

Why this answer

Preemptible VMs cost about 60-80% less than regular VMs and are suitable for fault-tolerant, short-lived batch jobs. Committed use discounts require a 1-year commitment and are not suitable if the job runs only 2 hours per day. Sustained use discounts apply automatically but preemptible VMs are cheaper.

Standard VMs are more expensive.

34
MCQmedium

A team needs to deploy a microservice that processes events from Pub/Sub and writes the results to Firestore. The service is stateless and should not incur cost when idle. The expected load is low but can spike unpredictably. Which compute service is the most cost-effective and operationally simple?

A.GKE Standard with a cluster autoscaler and a Pub/Sub sidecar
B.Compute Engine with a managed instance group and autoscaling based on Pub/Sub queue depth
C.Cloud Run for Anthos on-premises
D.Cloud Functions (2nd gen) triggered by Pub/Sub
AnswerD

Cloud Functions (2nd gen) is a fully managed, event-driven compute service that can be triggered directly by Pub/Sub messages via Eventarc. It scales automatically from zero to thousands of concurrent invocations and bills only for the time your code runs, so there is no idle capacity or cluster infrastructure to manage. This makes it the most cost-effective and operationally simple choice for processing sporadic events.

Why this answer

Cloud Functions is event-driven, scales automatically, and charges only while code is executing. It can be triggered by Pub/Sub messages, making it ideal for this use case. It scales to zero and handles spikes.

35
MCQhard

An organization wants to migrate its on-premises MySQL database to Google Cloud. The database is 2 TB and used by a critical application with read replicas for reporting. The team needs minimal downtime and the ability to fail back if needed. Which migration approach should they use?

A.Use Database Migration Service (DMS) to migrate to Cloud SQL
B.Lift and shift MySQL on Compute Engine and set up replication manually
C.Export the database to a Cloud Storage bucket and import into Cloud SQL
D.Stream data to BigQuery using Dataflow
AnswerA

Database Migration Service (DMS) uses continuous MySQL binlog replication to synchronize your on-premises source with Cloud SQL, enabling near-zero downtime cutover. It automatically manages replication health, VPC connectivity, and can fail back to the source if needed, making it the only option that meets the requirement of minimal downtime and a managed destination.

Why this answer

Database Migration Service (DMS) supports continuous replication with minimal downtime and can fail back. Cloud SQL import/export requires downtime. BigQuery is for analytics, not transactional DB.

Compute Engine with MySQL is self-managed and more complex.

36
MCQeasy

A developer wants to deploy a containerized web application that receives HTTP requests and can scale to zero when not in use. The application is stateless and has a startup time of less than 2 seconds. Which Google Cloud compute option is the most cost-effective?

A.Compute Engine with managed instance group and autoscaling
B.Google Kubernetes Engine (GKE) Standard
C.App Engine Standard with manual scaling
D.Cloud Run
AnswerD

Cloud Run executes stateless containers on a fully managed platform, where each instance only receives compute billing while actually processing a request and the service can scale down to zero when no traffic arrives. It automatically provisions instances based on concurrency and can start many instances to handle bursts, with optional min instances for latency-sensitive workloads. A containerized web application is an ideal fit because Cloud Run accepts any container image that listens on a port, and integrates directly with Cloud Build and Artifact Registry.

Why this answer

Cloud Run is a serverless container platform that scales to zero, charges per request, and is ideal for stateless HTTP workloads. It meets the startup time requirement and minimises cost when idle.

37
MCQmedium

A company has a VPC with custom mode and needs to connect to an on-premises network via HA VPN. They have two on-premises VPN devices, each with a static public IP address. What is the correct way to configure the HA VPN gateway on Google Cloud?

A.Create one classic VPN gateway with two tunnels to the two on-premises devices
B.Create one HA VPN gateway with two interfaces in the same region, and create two tunnels, each connecting one cloud interface to one on-premises device
C.Create two separate VPN gateways, each with one interface, and assign each to a different region
D.Create one HA VPN gateway in one region and one classic VPN gateway in another region
AnswerB

This is the exact HA VPN architecture: one regional HA VPN gateway exposes two external IP addresses (called interfaces) in the same region, and each interface forms its own IPsec tunnel to a different on-premises device. The two tunnels run as an active/active or active/standby pair using BGP dynamic routing, so if one on-premises device or tunnel fails, the Cloud Router can withdraw routes and send traffic through the surviving tunnel. This configuration is required to meet the 99.99% availability SLA for Cloud VPN.

Why this answer

HA VPN requires two external interfaces (cloud VPN gateways) for redundancy. Each interface is assigned a public IP. You configure two tunnels: each tunnel connects one cloud interface to one on-premises device.

The on-premises devices must be configured to accept connections from both cloud IPs.

38
MCQhard

A company is migrating a PostgreSQL database to Cloud SQL. They need high availability with automatic failover and a read replica for reporting queries that must not impact the primary. Which Cloud SQL configuration should they choose?

A.High Availability (HA) configuration with automatic storage increase
B.High Availability (HA) configuration with a read replica
C.Single zone instance with a failover replica
D.Single zone instance with cross-region replication
AnswerB

Cloud SQL HA automatically fails over to a synchronous standby in a different zone, protecting against zonal outages. A read replica, created using binary log replication, serves read-only queries like reporting without burdening the primary. Together, these features satisfy both availability and performance needs, allowing the reporting workload to run in parallel with production.

Why this answer

Cloud SQL High Availability provides a synchronous standby in a different zone with automatic failover. Adding a read replica offloads reporting queries and does not affect the primary.

39
MCQmedium

An organization has a VPC with instances in two subnets: subnet-a (10.0.1.0/24) and subnet-b (10.0.2.0/24). They want to allow HTTP traffic from any instance in subnet-a to any instance in subnet-b. What firewall rule should be created?

A.An egress rule on subnet-b allowing traffic to 10.0.1.0/24 on TCP port 80
B.An ingress rule on subnet-a allowing traffic to 10.0.2.0/24 on TCP port 80
C.An ingress rule on subnet-b allowing traffic from 10.0.1.0/24 on TCP port 80
D.An egress rule on subnet-a allowing traffic to 10.0.2.0/24 on TCP port 80
AnswerC

This is correct because the HTTP request travels from an instance in subnet-a (source 10.0.1.0/24) to an instance in subnet-b (destination) on TCP port 80. An ingress rule on subnet-b with the source range set to 10.0.1.0/24 explicitly allows that inbound connection at the destination. In GCP, the destination subnet's ingress rules are the primary gate for allowing traffic to reach the target instance.

Why this answer

Firewall rules are defined with direction and source/target. To allow inbound traffic to subnet-b from subnet-a, an ingress rule with source range 10.0.1.0/24 is needed.

40
Multi-Selecteasy

A company wants to analyze terabytes of structured data using SQL queries. The data is stored in CSV files in Cloud Storage. Which TWO Google Cloud services can be used together to query the data directly without loading it into a database? (Choose 2)

Select 2 answers
A.BigQuery
B.Cloud SQL
C.Dataproc
D.Dataflow
E.Cloud Storage
AnswersA, E

BigQuery is correct because it is a serverless, fully-managed data warehouse that can run SQL queries over terabytes of structured data with high speed. It supports direct querying of external data in Cloud Storage through federated queries or external tables, avoiding the need to import data. BigQuery's columnar storage and massive parallelism make it the appropriate analytical engine for this scenario.

Why this answer

BigQuery can query external data sources using external tables or federated queries, including Cloud Storage. Cloud Storage is the storage location for the CSV files. BigQuery can directly query files in Cloud Storage using an external table or a federated query.

41
MCQeasy

A solutions architect is designing a disaster recovery plan for a Cloud SQL for PostgreSQL instance. The primary instance is in us-central1. They need to automate failover to a different region with a Recovery Point Objective (RPO) of less than 5 seconds. Which configuration should they choose?

A.Use Cloud SQL external replication with a Compute Engine instance
B.Deploy a high-availability (HA) configuration within the same region
C.Enable automatic backups and point-in-time recovery
D.Configure a cross-region read replica in us-west1
AnswerD

Configuring a cross-region read replica in us-west1 uses asynchronous replication from the primary Cloud SQL instance to a read-only instance in the chosen region. This replica continuously applies changes, with replication lag typically in seconds, making the RPO low enough to approach the under-five-second requirement under normal conditions. If the primary region fails, you can promote the read replica to a standalone primary, enabling a managed cross-region disaster recovery path without needing to operate an external Compute Engine instance.

Why this answer

Cloud SQL cross-region replication uses asynchronous replication and typically has an RPO of a few seconds. A read replica in another region can be promoted in a disaster. Backups have higher RPO.

HA within same region does not help for regional disaster. External replication is less managed.

42
Multi-Selecteasy

A company is deploying a web application on Compute Engine and wants to distribute traffic across multiple instances in different zones for high availability. They also need to terminate SSL/TLS at the load balancer. Which TWO services should they use together?

Select 2 answers
A.Managed instance group
B.External HTTP(S) load balancer
C.Cloud CDN
D.Internal TCP/UDP load balancer
E.Cloud NAT
AnswersA, B

A managed instance group (MIG) is the correct backend infrastructure because it maintains a pool of identical VM instances across multiple zones, enabling the HTTP(S) load balancer to distribute traffic and automatically heal failed instances. MIGs support autoscaling based on load, which is essential for a scalable web application, and they provide the instance-level health checking that the load balancer relies on to route requests only to healthy VMs.

Why this answer

An external HTTP(S) load balancer provides SSL/TLS termination and distributes traffic across instances in multiple zones. Managed instance groups allow you to manage the instances and autoscale if needed. The load balancer uses the instance group as a backend.

43
MCQhard

A company has a Cloud Storage bucket that stores sensitive files. They want to ensure that objects are automatically deleted after 30 days to comply with data retention policies. Additionally, they need to keep a copy of all object deletions for audit purposes. Which combination of bucket settings should they use?

A.Enable bucket lock and use object holds
B.Enable object versioning and set a retention policy with a retention period of 30 days
C.Enable a lifecycle rule with condition 'Age: 30 days' and action 'Delete'
D.Enable object versioning and add a lifecycle rule with condition 'Age: 30 days' and action 'Delete' for the current version
AnswerD

Versioning retains noncurrent versions when objects are deleted, providing an audit trail. The lifecycle rule deletes current versions after 30 days, and the noncurrent versions remain (or can be deleted later with a separate rule). This combination meets both requirements.

Why this answer

Cloud Storage lifecycle management can automatically delete objects after 30 days using a SetStorageClass or Delete action with an Age condition. Object versioning enables keeping deleted or overwritten versions (noncurrent versions). By combining lifecycle rules to delete noncurrent versions after a period (e.g., 0 days) or simply keeping them, you can audit deletions.

However, the question says 'keep a copy of all object deletions for audit purposes' – versioning retains noncurrent versions when objects are deleted or overwritten. Lifecycle rules can be set to expire the noncurrent versions after a longer period, but for audit purposes, you would keep them indefinitely or for a long period. The simplest is to enable versioning and set a lifecycle rule to delete objects after 30 days; deleted objects become noncurrent versions and are retained until a lifecycle rule removes them.

To keep a copy, you might not delete noncurrent versions. The correct answer: enable versioning and add a lifecycle rule with condition Age:30 and action Delete for current objects. Noncurrent versions will remain unless a separate rule deletes them.

For audit, you may also set a rule to delete noncurrent versions after a longer period, but the question asks for 'which combination' – the combination that achieves both requirements is versioning + lifecycle rule to delete current objects after 30 days. The deleted objects become noncurrent versions, which are retained (so audit copy is kept). If they need to keep the deletion records forever, they should not delete noncurrent versions.

Among options, the one that includes versioning and a lifecycle rule that deletes objects after 30 days is correct. Option D includes versioning and lifecycle rule: 'Delete object after 30 days' – that's it. Option A is 'Object versioning' only – no deletion.

Option B is 'Bucket lock' – not for automatic deletion. Option C is 'Lifecycle rule to delete objects after 30 days' without versioning – then when deleted, there is no version history. So D is best.

44
MCQeasy

A startup wants to run a small, event-driven application that processes files uploaded to Cloud Storage. The function should be triggered by object finalize events and should have a maximum execution time of 10 minutes. Which compute option is most cost-effective and easy to manage?

A.Compute Engine with a startup script
B.App Engine Standard
C.Cloud Run jobs
D.Cloud Functions (Gen 2)
AnswerD

Cloud Functions (Gen 2) is the right choice because it offers first-class event triggers from Cloud Storage through Eventarc, letting you run code directly when an object is finalized or deleted. It is fully serverless, scales automatically from zero, and you only pay for execution time, which is ideal for a small startup. The maximum timeout of 60 minutes comfortably covers the stated 10-minute processing requirement, and the function is invoked automatically without any polling or VM management.

Why this answer

Cloud Functions (Gen 2) can be triggered by Cloud Storage events and supports longer timeouts (up to 60 minutes). It is serverless and cost-effective for event-driven workloads. Cloud Run also works but requires running a container; Cloud Functions is simpler for single-purpose functions.

45
MCQeasy

A team is building a mobile app backend that requires real-time data synchronization across devices and offline support. The data model is simple and document-based. Which database service should they use?

A.Cloud Bigtable
B.BigQuery
C.Cloud SQL
D.Firestore
AnswerD

Firestore is a flexible, scalable NoSQL document database designed natively for mobile app development, with real-time listeners that push data changes to clients instantly and offline data persistence that automatically syncs when connectivity returns. Its client SDKs for iOS, Android, and web handle multi-device synchronization, conflict resolution, and data integrity out of the box, making it the ideal choice for this real-time mobile backend use case.

Why this answer

Firestore is a NoSQL document database that provides real-time synchronization, offline support, and is designed for mobile and web apps. It integrates with Firebase SDKs.

46
MCQhard

A company has a GKE Autopilot cluster and wants to run a stateful application that requires persistent volumes with high read/write throughput. The application is deployed in a single region and does not require multi-region redundancy. Which storage option is the best choice for the persistent volumes?

A.Cloud Filestore (NFS)
B.Compute Engine persistent disks (SSD) using StorageClass 'pd-ssd'
C.Bigtable
D.Cloud Storage FUSE
AnswerB

Compute Engine persistent disks (SSD) using the 'pd-ssd' StorageClass is the correct choice because these are core GKE block volumes that are dynamically provisioned, attached to the node, and mounted by the pod with standard filesystem semantics. The SSD persistent disk provides high IOPS and low latency with synchronous, zone-level replication, making it suitable for stateful applications like databases that require durable, consistent storage. In GKE Autopilot, persistent volumes using 'pd-ssd' are fully supported, and the StorageClass abstracts away infrastructure provisioning so the workload gets a dedicated high-performance block device.

Why this answer

GKE Autopilot supports persistent volumes via Compute Engine persistent disks (PD) or Cloud Filestore. For high throughput, regional persistent disks (pd-balanced or pd-ssd) offer excellent performance. Cloud Storage is not a persistent volume.

Filestore is file storage but is more expensive and adds network latency. Persistent disks are native and provide the best performance for stateful applications.

47
MCQmedium

A company needs to run a MongoDB database on Compute Engine. The database requires high-throughput, low-latency storage that can survive VM failures. Which disk type and configuration is most appropriate?

A.SSD persistent disks with snapshots
B.Standard persistent disks with snapshots
C.Extreme persistent disks with snapshots
D.Local SSDs
AnswerA

SSD persistent disks are the correct choice for MongoDB on Compute Engine because they deliver a strong balance of high IOPS and low latency for database workloads while remaining cost-effective. Snapshots provide point-in-time backup and disaster recovery, protecting the data against VM failure and enabling fast restore. Unlike local SSDs, persistent disks are durable and survive VM lifecycle events, making pd-ssd the recommended block storage for production databases.

Why this answer

SSD persistent disks (pd-ssd) provide high IOPS and low latency for databases. For survival of VM failures, the disk should be set to non-deletable or use snapshots. Regional persistent disks replicate data across zones for higher availability, but the question asks for survival of VM failures, which can be achieved with zonal disks if the VM is recreated and the disk is detached.

However, regional persistent disks are better for durability across zone failures. The best answer is pd-ssd with snapshots for backup.

48
MCQhard

An organization needs to deploy a microservices application on Google Kubernetes Engine. Each microservice has different resource requirements, and the team wants to optimize costs by using a mix of spot (preemptible) and regular nodes. They also need to ensure that critical services run on regular nodes. Which GKE feature allows this separation?

A.Use resource quotas to limit namespace resource usage
B.Use separate clusters for critical and non-critical services
C.Use node pools with taints and tolerations on the pods
D.Use vertical pod autoscaling
AnswerC

Create two node pools, e.g. a regular pool for critical services and a spot/preemptible pool for non-critical work, then taint the spot pool with a key such as spot=true:NoSchedule. Critical pods are deployed without the matching toleration, so the Kubernetes scheduler will never place them on spot nodes; non-critical pods include the toleration and can use the cheaper spot capacity. This precisely controls placement while keeping a single cluster and simplifying operations.

Why this answer

Node pools in GKE allow you to have groups of nodes with different configurations (e.g., machine type, preemptible vs on-demand). You can then use node affinity or taints/tolerations to schedule pods onto the appropriate node pool.

49
Multi-Selecthard

An organization wants to migrate a 5 TB on-premises MongoDB database to Google Cloud. They need to minimize latency for write operations and support global users with strong consistency. Which three services or tools should they consider for this migration? (Choose 3)

Select 3 answers
A.Database Migration Service
B.Cloud Bigtable
C.Transfer Appliance
D.MongoDB Atlas on Google Cloud
E.Cloud Spanner
AnswersC, D, E

Google Cloud Transfer Appliance is a physical storage server that you rack locally, copy the MongoDB data (for example, via mongodump or file-level copies) onto, and ship back to Google so the data is ingested into Cloud Storage. For a one-time 5 TB dataset, this avoids the time and potential cost of a long online upload over constrained network links, and it is a fully supported Google Cloud migration path.

Why this answer

MongoDB Atlas is available on Google Cloud and provides global distribution with strong consistency. Database Migration Service does not support MongoDB natively. Bigtable is not compatible.

Cloud Spanner is globally distributed and strongly consistent. Transfer Appliance is for large data transfers. BigQuery is not suitable.

50
MCQeasy

An organization wants to run a stateless HTTP-based containerized application that scales to zero when not in use and charges only for request processing time. They do not want to manage any underlying infrastructure. Which compute option should they choose?

A.Compute Engine with managed instance group
B.Cloud Run
C.Cloud Functions
D.Google Kubernetes Engine (GKE) Standard
AnswerB

Cloud Run is the correct choice because it directly runs stateless HTTP container images in a fully managed, serverless environment, scaling from zero to handle traffic and back to zero when idle. You are billed only for compute resources used during request processing, not for paused instances, and it handles TLS, revisions, and autoscaling natively.

Why this answer

Cloud Run is a fully managed serverless platform for containers. It scales to zero automatically when no requests are coming in, and you pay only for the resources used during request processing. It is ideal for stateless HTTP-triggered workloads.

51
MCQeasy

A company wants to store event logs from multiple applications in a centralized location for future analysis. The logs are written frequently (thousands per second) and need to be retained for 90 days. The data is write-once, read-rarely. Which storage class and lifecycle rule combination is most cost-effective?

A.Set default storage class to Archive and use lifecycle rule to delete after 90 days
B.Set default storage class to Standard and use lifecycle rule to delete after 90 days
C.Set default storage class to Coldline and use lifecycle rule to delete after 90 days
D.Set default storage class to Nearline and use lifecycle rule to delete after 90 days
AnswerC

Coldline storage is designed for data that is expected to be accessed at most once per 90 days, making it a perfect match for a 90-day retention period. The lower per-GiB storage price compared to Standard and Nearline, combined with lifecycle deletion at 90 days, minimizes cost without incurring early deletion fees (Coldline has a 90-day minimum storage duration). This directly satisfies the requirement to store event logs for 90 days and then delete them.

Why this answer

For write-once, read-rarely data, Coldline storage class is cost-effective for data accessed less than once per 90 days. Set a lifecycle rule to delete objects after 90 days. Alternatively, use Standard for the first 30 days then move to Coldline, but the question asks for a combination.

The simplest is to set the default storage class to Coldline and a lifecycle rule to delete at 90 days.

52
MCQhard

A company wants to migrate an on-premises PostgreSQL database to Google Cloud. They need a managed database service with high availability and automatic failover. The application uses many stored procedures and extensions specific to PostgreSQL. Which service should they choose?

A.Cloud Spanner
B.Bare Metal Solution
C.Cloud SQL for PostgreSQL
D.Firestore
AnswerC

Cloud SQL for PostgreSQL is a fully managed, PostgreSQL-compatible database service that supports the same SQL dialect, extensions, and client protocols as standard PostgreSQL. It enables a straightforward migration path for on-premises PostgreSQL databases using tools like Database Migration Service or pg_dump/pg_restore. Cloud SQL also provides automated backups, high availability, and scaling, making it the optimal choice for a direct PostgreSQL migration without application code changes.

Why this answer

Cloud SQL for PostgreSQL supports many PostgreSQL extensions and stored procedures. Cloud Spanner is not PostgreSQL-compatible; Firestore is NoSQL; Bare Metal Solution is for on-premises-like deployments, not managed.

53
Multi-Selecteasy

A developer wants to deploy a new application on Google Cloud. The application consists of a frontend service that serves web traffic and a backend service that processes images. Both services need to be containerized. Which two compute options are serverless and support container deployment? (Choose 2)

Select 2 answers
A.Google Kubernetes Engine (GKE)
B.Cloud Functions (2nd gen)
C.Cloud Run
D.Compute Engine
E.Cloud Functions (1st gen)
AnswersB, C

Cloud Functions (2nd gen) is built on Cloud Run infrastructure and, unlike the 1st gen, supports deploying custom container images directly. It provides a fully managed, event-driven serverless execution environment that scales to zero and brings the same container runtime benefits as Cloud Run, while adding event-triggering capabilities like Pub/Sub, Cloud Storage, and HTTP invocations.

Why this answer

Cloud Run and Cloud Functions (2nd gen) both support container images and are serverless (no server management, scale automatically). GKE and Compute Engine are not serverless. Cloud Functions (1st gen) does not support containers.

54
MCQmedium

A company wants to migrate an on-premises PostgreSQL database to Google Cloud. They require automated backups, point-in-time recovery, and a 99.95% availability SLA. Which service should they choose?

A.Compute Engine with self-managed PostgreSQL
B.Cloud SQL for PostgreSQL
C.Cloud SQL for MySQL
D.Cloud Spanner
AnswerB

Cloud SQL for PostgreSQL is the managed relational database service natively compatible with PostgreSQL, so your existing schema, queries, and tools carry over. It automates daily backups with transaction log-based PITR by default, offers high availability via a regional failover replica, and carries a 99.95% SLA for the Standard and Enterprise editions. This directly satisfies the stated requirements without requiring you to operate the database infrastructure.

Why this answer

Cloud SQL for PostgreSQL provides automated backups, point-in-time recovery (PITR), and a 99.95% SLA for single-zone instances. It is fully managed, reducing operational overhead.

55
MCQmedium

A company plans to run a stateful application on Compute Engine that requires high random I/O performance and the ability to resize the persistent disk without downtime. The application is running on a Linux VM. Which persistent disk type and configuration should the engineer choose?

A.Extreme persistent disk (pd-extreme)
B.Balanced persistent disk (pd-balanced)
C.SSD persistent disk (pd-ssd)
D.Standard persistent disk (pd-standard)
AnswerA

Extreme persistent disk (pd-extreme) is the correct choice because it is engineered for high-performance, low-latency workloads. It supports provisioning up to 100,000 IOPS per instance and allows live resizing of both capacity and performance while the VM remains attached and running. This combination of extreme throughput and zero-downtime scaling makes it ideal for a stateful application with demanding random I/O and strict availability requirements.

Why this answer

Extreme persistent disks are designed for high random I/O workloads, offering up to 120,000 IOPS and the ability to resize without downtime. They are SSD-based and suitable for databases.

56
MCQeasy

A data analyst needs to run complex analytical queries on a large dataset (10 TB) stored in Cloud Storage. They want to use a serverless query engine that charges based on the amount of data processed. Which Google Cloud service should they use?

A.Cloud SQL
B.BigQuery
C.Bigtable
D.Dataproc
AnswerB

BigQuery is Google Cloud's serverless, highly scalable data warehouse optimized for analytical queries on massive datasets. It separates storage from compute, uses columnar storage and a distributed query engine, and offers pay-per-query pricing, so you only pay for the data scanned. With features like partitioning, clustering, and BI Engine, it is the ideal choice for complex analytical workloads without managing infrastructure.

Why this answer

BigQuery is a serverless data warehouse that charges based on queries processed (on-demand) or flat-rate. It can query external data in Cloud Storage via federated queries.

57
MCQhard

A team is using BigQuery for analytics. They have a constant query workload and want to reduce costs by switching from on-demand pricing to a flat-rate reservation. They have purchased a BigQuery flat-rate reservation. What additional step is required to use the reservation?

A.Enable flat-rate billing in the BigQuery settings
B.Assign the reservation to the desired projects using an assignment
C.No additional steps; flat-rate is automatically applied to all queries
D.Create a new dataset and move all tables into it
AnswerB

After purchasing a capacity commitment, you must create a reservation and then create an assignment that associates that reservation with specific projects (or folders/organizations). Once the assignment is in place, query jobs issued from those assigned projects consume the reserved slots, and their usage is billed at the flat-rate, on-demand pricing no longer applies.

Why this answer

The reservation must be assigned to a project, folder, or organization via a reservation assignment. Without assignment, the reservation is not used, and queries continue to be billed on-demand.

58
MCQeasy

An engineer needs to deploy a containerized web application that receives HTTP requests and should scale to zero when not in use. The application is stateless and has a lightweight container image. Which Google Cloud compute service should be used?

A.Compute Engine with a single VM
B.Cloud Functions
C.Cloud Run
D.Google Kubernetes Engine (GKE) Standard cluster
AnswerC

Cloud Run is a managed serverless container platform that executes your container image on demand, automatically scaling instances from zero to thousands based on incoming HTTP traffic and billing only for resources used during request processing. It is purpose-built for stateless HTTP workloads and supports common features like health checks, environment variables, secrets, and gRPC, all without requiring you to provision or manage any servers. For a containerized web application, this directly satisfies the requirement with minimal operational effort and can scale to zero when idle.

Why this answer

Cloud Run is a fully managed serverless platform that scales to zero when no requests are coming in, and bills per request. It is ideal for stateless HTTP-triggered container workloads.

59
MCQeasy

An engineer is tasked with creating a new VPC network for a production environment. The company requires the VPC to support multiple regions and allow custom IP address ranges for each subnet. Which VPC network mode should the engineer use?

A.Shared VPC
B.Custom mode VPC
C.Auto mode VPC
D.Legacy mode VPC
AnswerB

Custom mode VPC is the correct choice because it begins with no subnets and lets the engineer explicitly define each subnet's IP CIDR range and region. This provides full control over the address space, including private or publicly routable blocks, to avoid conflicts and meet design requirements. For a task that requires setting custom subnet IP ranges per region, this mode is the only way to do so natively.

Why this answer

Custom mode VPC allows full control over subnets, including custom IP ranges per region. Auto mode creates subnets in each region with predefined IP ranges, which may not meet production requirements. Shared VPC is for sharing across projects, not for a single project's network.

60
MCQmedium

A company runs a batch job every night that processes data from a Cloud Storage bucket and writes results to BigQuery. The job runs on a Compute Engine VM. To minimize costs, what is the best practice for the VM?

A.Use a VM with GPUs for faster processing
B.Use a VM with local SSD for temporary storage
C.Use a standard VM and commit to a 1-year commitment
D.Use a preemptible VM
AnswerD

Preemptible VMs cost up to 60–80% less than standard on-demand VMs and are explicitly designed for fault-tolerant, batch workloads that can be interrupted. Compute Engine can terminate a preemptible VM at any time, but it will always run for at least 30 seconds, and the job should be coded to handle early termination by persisting progress to durable storage. Because this nightly batch job is by nature interruptible and short-lived, preemptible VMs are the cost-optimal choice and align with Google's best practices for batch processing.

Why this answer

Preemptible VMs are up to 80% cheaper and can be terminated at any time, which is acceptable for batch jobs that can be checkpointed or restarted from the beginning.

61
MCQmedium

A company needs to connect their on-premises data center to Google Cloud via a dedicated, high-bandwidth connection with low latency. They anticipate consistent high traffic. Which connectivity option should they use?

A.Carrier Peering
B.Cloud VPN
C.VPC peering
D.Dedicated Interconnect
AnswerD

Dedicated Interconnect provides a direct, private physical connection between an on-premises data center and Google Cloud, typically via a co-location facility with one or more 10 Gbps or 100 Gbps links. This dedicated, high-bandwidth link bypasses the public internet, delivering more consistent latency, higher throughput, and an SLA covering availability (up to 99.99% when configured with redundant connections). It is the correct choice here because it is purpose-built for hybrid cloud connectivity that requires reliable, secure, and dedicated bandwidth between a data center and Google Cloud.

Why this answer

Dedicated Interconnect provides direct physical connections between on-premises and Google Cloud, offering high bandwidth and low latency. Cloud VPN is over the internet; Carrier Peering is for enterprise customers; VPC peering is for connecting VPCs within Google Cloud.

62
MCQhard

A company wants to use Google Cloud Pricing Calculator to estimate the monthly cost of running a Compute Engine instance for a web server. They plan to use a n2-standard-4 machine with a 100 GB SSD persistent disk and commit to a 1-year term. Which discount type should they include in the estimate?

A.No discount is needed; the price shown is final
B.Committed use discount (1 year)
C.Free tier discount
D.Sustained use discount only
AnswerB

Committed use discount (1 year) is the correct choice because it aligns with the scenario of running an n2-standard-4 instance consistently over a year. In the Google Cloud Pricing Calculator, selecting a 1-year CUD for compute resources like vCPUs and memory typically yields a discount of approximately 20-30% compared to on-demand pricing. The calculator has a dedicated field to add this commitment, and choosing it directly answers the question by reducing the estimated cost. This is the best option among the list since other discounts either do not apply or are automatically included.

Why this answer

Committed use discounts (CUDs) offer significant savings (up to 57% for machine types) in exchange for committing to 1 or 3 years. Sustained use discounts apply automatically for running instances >25% of the month, but CUDs are additional and can be combined. For a 1-year commitment, they should include CUD for the machine type.

63
MCQhard

A company uses Cloud SQL for MySQL to host a database. The database must be accessible from a Compute Engine VM in the same region but in a different VPC network (VPC-A). The company does not want to use public IP addresses or VPN. What should the engineer do to enable connectivity?

A.Export the Cloud SQL instance as a dump and recreate it in VPC-A
B.Set up VPC Network Peering between VPC-A and the VPC where Cloud SQL is deployed, and configure Cloud SQL with a private IP
C.Configure the Cloud SQL instance with a public IP and allow the VM's IP in authorized networks
D.Use Cloud VPN to connect VPC-A to the VPC where Cloud SQL is deployed
AnswerB

Setting up VPC Network Peering between VPC-A and the VPC where Cloud SQL is deployed allows private, RFC1918 traffic to flow over Google’s internal backbone without a VPN, NAT gateway, or public IP. Once Cloud SQL is configured with a private IP, its address is allocated from a reserved range in that VPC, so VM instances in the peered VPC-A can connect directly. This satisfies the requirement of avoiding both public exposure and VPN.

Why this answer

Cloud SQL private services access requires the Cloud SQL instance to be in a VPC network. For connectivity across VPCs, VPC Network Peering can be used, as both VPCs are in the same project or across projects. Private services access connects Cloud SQL to a VPC, and peering allows another VPC to access it.

64
MCQmedium

An organisation requires a managed relational database for an online transaction processing (OLTP) application with strong consistency, automated backups, and a 99.95% SLA. The database size is expected to be under 10 TB. Which service meets these requirements at the lowest cost?

A.Bare Metal Solution
B.Cloud Bigtable
C.Cloud SQL
D.Cloud Spanner
AnswerC

Cloud SQL is a fully managed relational database service offering MySQL, PostgreSQL, and SQL Server engines with automated backups, point-in-time recovery, and integrated high availability, making it ideal for OLTP workloads using SQL. It provides strong ACID consistency and a 99.95% SLA at a predictable price point for databases under 10 TB, which fits the stated need without over-provisioning. This combination of managed operations, relational features, and reasonable cost makes Cloud SQL the correct choice.

Why this answer

Cloud SQL provides managed MySQL/PostgreSQL/SQL Server with automated backups, strong consistency, and a 99.95% SLA for zonal deployments. It is cost-effective for databases under 10 TB. Cloud Spanner is more expensive and suited for global scale.

65
MCQmedium

A company needs to store and serve user-generated content such as images and videos. The data must be accessible globally with low latency. Which Google Cloud storage service should they use?

A.Persistent Disk
B.Cloud Filestore
C.Cloud Storage
D.Local SSD
AnswerC

Cloud Storage is the correct choice because it is a durable, highly available object storage service with a global namespace and public HTTPS ingestion and serving endpoints. It provides strong consistency, configurable permissions, and can integrate with Cloud CDN for low-latency delivery of cached content, making it ideal for user-generated photos, videos, and documents. Lifecycle policies can cost-effectively archive older content, and resumable uploads support large files from mobile and web clients.

Why this answer

Cloud Storage is object storage designed for global accessibility, with low-latency access and multiple storage classes. It supports serving content via CDN integration.

66
Multi-Selectmedium

A company needs to deploy a web application on Google Cloud that requires high availability across multiple regions. Select TWO services that can help achieve this.

Select 2 answers
A.Global HTTP(S) Load Balancing
B.Cloud VPN
C.Cloud SQL with cross-region replication
D.Cloud NAT
E.Cloud CDN
AnswersA, C

Global HTTP(S) Load Balancing is a correct choice because it uses a single anycast IP to route user traffic to the closest healthy backend across multiple Google Cloud regions. It automatically detects and drains unhealthy backends, supports autoscaling, and provides layer 7 content-based routing. This service delivers the required high availability for the web application's compute and network layer.

Why this answer

Global HTTP(S) Load Balancing distributes traffic across regions, and Cloud SQL with cross-region replication provides database redundancy. Compute Engine instances in multiple regions serve traffic, and load balancing handles failover.

67
MCQmedium

A team is setting up a new project and wants to estimate the monthly cost of running a Compute Engine VM with 4 vCPUs, 16 GB memory, and a 100 GB persistent disk, using the Google Cloud Pricing Calculator. The VM will run for 12 hours every day for a month. Which discount type will automatically apply to reduce the cost based on usage?

A.Preemptible VM discount
B.Sustained use discount
C.Committed use discount
D.Free tier discount
AnswerB

Sustained use discounts are applied automatically when a VM runs for more than 25% of a billing month (approximately 186 hours), without requiring any upfront commitment or configuration. For a VM running 12 hours daily, monthly usage is roughly 360 hours, so the discount kicks in automatically after the threshold is crossed, reducing the bill by up to 20-30% based on the on-demand price — exactly the kind of predictable, usage-based discount this team can estimate.

Why this answer

Sustained use discounts automatically apply for VMs that run for a significant portion of a month. Committed use discounts require a commitment. Preemptible discounts are for short-lived VMs.

Free tier is limited.

68
MCQeasy

A developer needs to create a Cloud Storage bucket that stores data for only 30 days and then automatically deletes it. Which feature should be used to achieve this?

A.Object versioning
B.Requester pays
C.Object lifecycle management
D.Bucket lock
AnswerC

Object Lifecycle Management is a native Cloud Storage feature that lets you define rules to automatically delete or transition objects based on conditions like age. A rule with action 'Delete' and condition 'Age: 30 days' will remove objects that are at least 30 days old. This directly satisfies the developer's requirement for scheduled deletion, making it the correct choice.

Why this answer

Object lifecycle management rules can automatically delete objects after a specified age. Bucket lock is for retention compliance, not deletion. Versioning keeps multiple versions.

Requester pays shifts costs.

69
MCQhard

A company runs a global web application with a Cloud SQL (MySQL) database in the us-east1 region. To improve read performance for users in Europe, they want to offload read traffic to a replica in europe-west1. The replica must be kept in sync with the primary within seconds. Which Cloud SQL configuration should be used?

A.Enable automatic failover to a replica in europe-west1
B.Create a cross-region read replica in europe-west1
C.Configure Cloud SQL for multi-region deployment
D.Create an external replica in europe-west1
AnswerB

Creating a cross-region read replica in europe-west1 is correct because Cloud SQL supports read-only replicas in a different region, using asynchronous replication to serve queries close to the users. This reduces read latency for European users while keeping writes on the primary instance. The replica can also be manually promoted to a standalone primary for disaster recovery, but it does not require an HA configuration or additional on-premises infrastructure.

Why this answer

Cross-region replication using a Cloud SQL read replica is the correct approach. External replicas are for on-premises or other clouds; failover replicas are for high availability within the same region; multi-region is not a Cloud SQL option (it's for Cloud Storage or Spanner).

70
MCQmedium

A company wants to run a stateless HTTP web application that experiences highly variable traffic, including periods of zero traffic. The application is packaged as a Docker container. The team wants to minimize operational overhead and pay only for resources consumed during request processing. Which Google Cloud compute service is the best fit?

A.Cloud Functions
B.Cloud Run
C.GKE Standard
D.Compute Engine with managed instance group
AnswerB

Cloud Run is Google Cloud's fully managed serverless container platform that executes stateless containers on a Knative-based infrastructure, making it ideal for an HTTP web application. It automatically scales to zero when there is no traffic, so you pay nothing during idle periods, and it scales up to thousands of concurrent instances based on incoming requests, with per-request billing that only charges from the moment a request starts to when it finishes. Cloud Run supports any OCI-container image, meaning you can package a web server (e.g., Nginx, Express, Django) and it will handle TLS certificates, domain mapping, and load balancing natively. For variable traffic patterns of a stateless HTTP app, Cloud Run offers the perfect balance of elasticity, cost-efficiency, and operational simplicity.

Why this answer

Cloud Run is serverless, scales to zero, charges per request, and runs containers from container images. Cloud Functions is for event-driven functions, not full web apps. GKE Standard and Compute Engine require managing servers and do not scale to zero.

71
MCQmedium

An application running on Compute Engine needs to be accessible from the internet on port 443. The instance has an internal IP only. Which steps are necessary to allow internet traffic?

A.Use Cloud Load Balancing with an HTTPS load balancer to forward traffic to the instance
B.Configure a VPN from the internet to the VPC
C.Create a Cloud NAT gateway and a firewall rule allowing ingress on port 443
D.Assign an external IP to the VM and create a firewall rule allowing ingress from 0.0.0.0/0 on port 443
AnswerA

An external HTTPS load balancer provides a managed, anycast IP that terminates SSL/TLS and forwards decrypted HTTP/HTTPS traffic to the instance over your VPC. This keeps the VM itself on an internal IP, so it is never directly exposed to the internet. The load balancer also adds health checking, autoscaling integration, and Google Cloud Armor DDoS/security policy protection.

Why this answer

An internal-only VM cannot be reached directly from the internet. You need to use a Cloud NAT for outbound traffic, but for inbound traffic, you must either assign an external IP to the VM or use a load balancer. The most secure and scalable approach is to use an external HTTPS load balancer.

Ready to test yourself?

Try a timed practice session using only Planning and Configuring a Cloud Solution questions.