Google Cloud Certified MCQ 2 — Questions and Answers
Question 1: A company needs to migrate a 50 TB on-premises Oracle database to Google Cloud with minimal downtime. Which approach is most appropriate?
- Use gsutil to copy database files directly to Cloud Storage
- Use Database Migration Service with continuous replication and cutover (Correct answer)
- Export the database to CSV and import into BigQuery
- Spin up a Compute Engine VM and restore from a backup
Correct answer: Use Database Migration Service with continuous replication and cutover
Database Migration Service supports continuous replication for Oracle, enabling minimal-downtime migrations with a controlled cutover window.
Question 2: Your application on GKE experiences intermittent OOM kills on pods during traffic spikes. What is the most effective long-term fix?
- Increase node machine type to n2-highmem-64
- Set appropriate resource requests and limits on pods and enable Vertical Pod Autoscaler (Correct answer)
- Disable memory limits so containers can use available node memory freely
- Add more nodes manually before peak traffic periods
Correct answer: Set appropriate resource requests and limits on pods and enable Vertical Pod Autoscaler
Setting resource requests/limits allows the scheduler to place pods correctly, and VPA adjusts them automatically based on observed usage.
Question 3: A retail company wants real-time inventory updates visible globally with strong consistency. Which Cloud Spanner feature addresses this requirement?
- Multi-region instance with TrueTime-based external consistency (Correct answer)
- Regional instance with read replicas
- Cloud SQL cross-region failover replica
- Bigtable with global replication
Correct answer: Multi-region instance with TrueTime-based external consistency
Cloud Spanner multi-region instances use TrueTime to provide external consistency (linearizability) across all regions simultaneously.
Question 4: Which IAM approach best follows the principle of least privilege for a Cloud Run service that only needs to read from one Cloud Storage bucket?
- Grant the service account roles/storage.admin on the project
- Create a custom role with storage.objects.get and storage.objects.list on that specific bucket (Correct answer)
- Use the default Compute Engine service account with Editor role
- Grant roles/storage.objectViewer at the project level
Correct answer: Create a custom role with storage.objects.get and storage.objects.list on that specific bucket
A custom role scoped to only the needed permissions on the specific bucket minimizes the blast radius of any credential compromise.
Question 5: A startup needs an event-driven architecture where multiple downstream services react to new user registrations. What is the recommended pattern on Google Cloud?
- Write events directly to a shared Cloud SQL table that each service polls
- Publish to Pub/Sub topic with each service having its own subscription (Correct answer)
- Use Cloud Scheduler to trigger each service on a fixed interval
- Send HTTP webhooks from the registration service to each consumer
Correct answer: Publish to Pub/Sub topic with each service having its own subscription
Pub/Sub fan-out with per-service subscriptions decouples producers from consumers and guarantees at-least-once delivery to each subscriber independently.
Question 6: A team wants to enforce that all Compute Engine VMs in their organization use only approved OS images. What is the correct control?
- Add a firewall rule blocking unapproved image traffic
- Use an Organization Policy constraint to restrict allowed images (Correct answer)
- Audit images weekly with a Cloud Function script
- Require manual approval for every VM creation request
Correct answer: Use an Organization Policy constraint to restrict allowed images
The constraints/compute.trustedImageProjects organization policy prevents VM creation from images outside the approved list.
Question 7: You need to analyze 10 years of clickstream logs (petabytes) with ad-hoc SQL queries. Cost efficiency is the top priority. What storage and query approach should you use?
- Store in Cloud SQL and query directly
- Store in Cloud Storage as Parquet, query with BigQuery external tables (Correct answer)
- Store in Bigtable and use the HBase API
- Store in Firestore and use collection group queries
Correct answer: Store in Cloud Storage as Parquet, query with BigQuery external tables
BigQuery external tables on Cloud Storage Parquet files avoid data ingestion costs and use columnar compression, making ad-hoc queries highly cost-efficient for petabyte-scale cold data.
A company needs to migrate a 50 TB on-premises Oracle database to Google Cloud with minimal downtime.
Which approach is most appropriate?