Google Associate Cloud Engineer - Practice Test 2
Your company has a critical, long-running batch process (approximately 30 hours) that executes monthly on-premises. This process is not fault-tolerant and must be restarted from the beginning if interrupted. It can be performed offline. You need to migrate this workload to Google Cloud, prioritizing cost minimization. What is the most appropriate solution?
The batch process is long-running, not fault-tolerant, and runs infrequently (monthly). Using a standard Compute Engine VM and stopping it when not in use minimizes costs by only paying for compute time when the process is active. Spot VMs or GKE Spot nodes are not suitable because the workload is not fault-tolerant and would be interrupted, requiring a full restart.
A data analytics application running on-premises processes large data files (1 GB to 16 GB) in memory for approximately 45 minutes every night at midnight. You need to migrate this application to Google Cloud with minimal refactoring and cost. Which approach should you take?
The 'lift and shift' approach to Compute Engine minimizes migration effort as it closely mirrors the on-premises environment without requiring code changes or containerization. Using an instance schedule ensures the VM runs only when needed, aligning with the existing midnight processing window and optimizing costs. This method avoids the complexity and potential refactoring associated with serverless or containerized solutions for an existing monolithic application.
You are responsible for managing logs across multiple Google Cloud projects. You need to consolidate and analyze all logs from the past 60 days, ensuring that the data is easily explorable and queryable. Which Google-recommended approach should you implement to achieve this?
To consolidate logs from multiple projects for analysis and retain them for a specific duration, Cloud Logging exports are the recommended method. Exporting to BigQuery allows for powerful querying and exploration of log data. Setting the table expiration in BigQuery directly handles the 60-day retention requirement efficiently.
You have deployed a custom application on a Google Compute Engine instance. This application writes its operational logs directly to the instance's local disk. Users are now reporting errors, and you need to diagnose the root cause. What is the most effective first step to centralize and view these application logs within Google Cloud?
For application logs written to disk on a Compute Engine instance to be viewable in Cloud Logging, an agent must be installed and configured to collect them. The Ops agent is the recommended unified agent for collecting logs and metrics from Compute Engine instances. Without it, Cloud Logging will not automatically ingest custom application logs from the disk.
You are developing a global multi-player gaming application that requires storing game state and user data. As the application scales, you need to ensure consistent, low-latency performance for users worldwide without significantly increasing operational overhead. Which Google Cloud database service should you choose?
Cloud Spanner is specifically designed for globally distributed, mission-critical applications requiring strong consistency and high availability at scale. Its managed nature reduces operational complexity, making it ideal for a global multi-player gaming application that needs consistent performance without increasing management overhead. Other options like Cloud SQL or Bigtable might require more complex solutions to achieve global consistency and low latency.