GCP Google Cloud Platform (GCP) Skills 3 — Questions and Answers
Question 1: A developer needs to process messages asynchronously between microservices on GCP. Which service is the best fit?
- Cloud Tasks
- Pub/Sub (Correct answer)
- Cloud Scheduler
- Dataflow
Correct answer: Pub/Sub
Cloud Pub/Sub is GCP's managed messaging service for asynchronous event-driven communication between services at any scale.
Question 2: What is a 'Shared VPC' in GCP?
- A VPC network automatically shared with all projects in a billing account
- A VPC hosted in a host project that other service projects can use (Correct answer)
- A peering arrangement between two independently owned VPCs
- A VPC with firewall rules shared across regions
Correct answer: A VPC hosted in a host project that other service projects can use
Shared VPC lets a host project own the VPC network while multiple service projects attach to it and deploy resources into its subnets.
Question 3: Which BigQuery feature allows you to query data stored in Cloud Storage without loading it into BigQuery first?
- Materialized Views
- Federated Queries
- External Tables (Correct answer)
- Partitioned Tables
Correct answer: External Tables
BigQuery External Tables (also called federated tables) allow querying data files in Cloud Storage, Google Drive, or Bigtable directly without ingestion.
Question 4: What is the purpose of a GCP 'Service Account'?
- A shared login for multiple developers on a team
- An identity used by applications and services to authenticate to GCP APIs (Correct answer)
- A billing account for services that auto-charge usage
- An administrative account with owner-level privileges
Correct answer: An identity used by applications and services to authenticate to GCP APIs
A Service Account is a special identity assigned to applications, VMs, or services so they can authenticate and call GCP APIs without using personal credentials.
Question 5: When would you choose Cloud Spanner over Cloud SQL?
- When you need a document-oriented NoSQL database
- When you need global horizontal scaling with strong consistency and high availability (Correct answer)
- When your workload is read-heavy and caching is sufficient
- When you need the lowest possible cost for a relational database
Correct answer: When you need global horizontal scaling with strong consistency and high availability
Cloud Spanner provides globally distributed, strongly consistent relational storage that scales horizontally — use it when Cloud SQL's vertical scaling limits are insufficient.
Question 6: What does 'preemptible' mean for a Compute Engine VM?
- The VM can be live-migrated without interruption during maintenance
- The VM may be stopped by GCP with 30-second notice and costs up to 91% less (Correct answer)
- The VM automatically scales based on load
- The VM runs on dedicated hardware not shared with other customers
Correct answer: The VM may be stopped by GCP with 30-second notice and costs up to 91% less
Preemptible VMs are short-lived, low-cost instances that GCP can reclaim with a 30-second shutdown notice, making them ideal for fault-tolerant batch workloads.
Question 7: Which Cloud Logging feature lets you export log entries to BigQuery, Cloud Storage, or Pub/Sub?
- Log Views
- Log Sinks (Correct answer)
- Log Buckets
- Log Metrics
Correct answer: Log Sinks
Log Sinks (also called log routing) let you route filtered log entries to destinations like BigQuery, Cloud Storage, Pub/Sub, or another Cloud Logging project.
A developer needs to process messages asynchronously between microservices on GCP.
Which service is the best fit?