Intrigued by the art of cloud architecture? Discover how to design, develop, and manage robust, secure, scalable, and dynamic solutions on Google Cloud as you prepare for the Professional Cloud Architect exam!
Custom machine types are a flexible feature of Google Compute Engine that let you create virtual machines with specific amounts of vCPU and memory, rather than being stuck with fixed sizes. Unlike predefined machine types that come in standard sizes, custom types allow you to tailor resources exactly to what your application needs. This helps architects optimize both performance and cost for any given workload. Choosing the right compute resources is a critical step in designing a cloud solution architecture.
To achieve operational efficiency, architects must right-size their resources based on actual usage and demand. Over-provisioning leads to unnecessary costs and wasted resources, while under-provisioning causes performance bottlenecks that hurt the user experience. Google provides tools like Recommender and Cloud Monitoring to help identify these inefficiencies. Using custom machine types ensures that provisioning aligns perfectly with specific application demands while minimizing overhead. Regularly reviewing resource utilization ensures that the chosen configurations remain both high-performing and cost-effective over time.
When creating a custom machine configuration, users have direct control over several hardware components to build an optimal environment. This includes selecting the specific number of vCPUs and the exact amount of RAM required for the task. vCPUs can be adjusted to match the processing power needed for the application, while memory can be scaled independently of the CPU count to support memory-heavy tasks. Options to include GPUs or specific CPU platforms exist for specialized workloads like AI or rendering. Certain workloads require specialized compute resources to perform at their peak—for example, high-performance databases often run best on the C4 machine series, which provides consistent power for heavy data tasks.
Spot VMs are virtual machine instances that use Google's excess Compute Engine capacity. These resources offer a significant discount, often between 60% and 91%, compared to standard on-demand pricing. However, the trade-off for this lower cost is that Google can preempt, or reclaim, these resources at any time. This makes them a powerful tool for cost optimization when high availability is not a strict requirement for the task.
These instances are ideal for fault-tolerant workloads that can handle interruptions without failing completely. Common examples include batch processing jobs and large-scale data analysis, CI/CD pipelines used for automated software testing, and media encoding and complex scientific simulations. Because these workloads can pause and resume, they allow architects to save money while still completing necessary background tasks.
When Google needs to reclaim capacity, it triggers a preemption event to stop or delete the VM. Users can choose a termination action to decide if the VM should be stopped or deleted once it is reclaimed. If the VM is only stopped, the data on its persistent disks remains available for later use. This flexibility helps maintain data durability even when the compute resource itself is temporary. Spot VMs do not support live migration, meaning they cannot move to different hardware while running to avoid maintenance.
Architects often use Managed Instance Groups to manage Spot VMs at scale. A MIG will automatically try to recreate preempted instances once more capacity becomes available in the selected zone. However, MIGs might not be able to scale out immediately if resources are limited. This requires careful capacity planning to ensure that batch jobs eventually finish within their required timelines. While cost-effective, Spot VMs have specific limitations, such as not being covered by a Service Level Agreement.
For more specialized needs, Google offers options like Flex-start and the Dynamic Workload Scheduler. Flex-start provides a way to request dense resources for short-term projects lasting up to seven days. These options provide higher obtainability for high-demand hardware like GPUs while still offering a discount. Architects can pair Spot VMs with custom machine types to match exact CPU and memory needs, ensuring that you are only paying for the specific resources your specialized workload requires.
GPUs are specialized hardware used to handle parallel processing and graphics-heavy tasks. These are part of the accelerator-optimized machine family, which includes series like the A3 and G2. You should choose these resources when your application requires high performance for AI training or 3D visualization. Using GPUs helps maximize performance for complex mathematical calculations that standard CPUs cannot handle efficiently.
TPUs are custom-built circuits designed specifically to accelerate deep learning workloads. They are ideal for models that involve large matrix operations and need to train for long periods, such as weeks or months. These resources use the XLA compiler to transform machine learning code into efficient hardware instructions. By using TPUs, architects can scale up massive workloads with minimal changes to their existing code.
For workloads with strict security needs, sole-tenant nodes provide physical isolation on dedicated hardware. This option is essential for meeting strict compliance requirements or specific software licensing agreements that forbid sharing servers. Architects can also use Confidential VMs and Shielded VMs to further protect data while it is being processed. These tools ensure that sensitive information remains secure and meets all regulatory standards.
To balance performance and budget, you can select custom machine types to perfectly match your CPU and memory needs. For tasks that can handle interruptions, Spot VMs offer a cost-effective way to access excess compute capacity at a significant discount. These resources are perfect for fault-tolerant batch jobs like rendering or data processing. By right-sizing your instances, you ensure that you only pay for the exact resources your workload requires.
Architects must evaluate several factors to ensure the optimal balance of cost and performance. Choosing the right compute resource involves understanding the specific needs of the application and the regulatory environment. Key selection factors include workload type (choosing between general-purpose or optimized hardware), availability (selecting regions that support specific machine families), and budget (utilizing discounts and preemptible options for savings). By following these best practices, you can build a scalable and secure cloud architecture.
Prepare and test your skills
Prepare and test your skills
Custom machine types are a flexible feature of Google Compute Engine that let you create virtual machines with specific amounts of vCPU and memory, rather than being stuck with fixed sizes. This allows architects to tailor resources exactly to what an application needs, optimizing both performance and cost for any given workload.
Spot VMs are virtual machine instances that use Google's excess Compute Engine capacity and offer a significant discount, often between 60% and 91%, compared to standard on-demand pricing. The trade-off for this lower cost is that Google can preempt, or reclaim, these resources at any time, making them unsuitable for tasks requiring high availability.
GPUs should be chosen when your application requires high performance for parallel processing tasks like AI training or 3D visualization. TPUs are custom-built circuits designed specifically to accelerate deep learning workloads, ideal for models involving large matrix operations that need to train for long periods.
Purchase 1-year committed use discounts with future reservations in AI Hypercomputer
Provision accelerator-optimized GPU or TPU resources using the Dynamic Workload Scheduler Flex-start consumption model
Provision compute-optimized C2D virtual machines with attached NVIDIA L4 GPUs on sole-tenant node groups
Provision TPU or GPU resources using Spot VMs with automated task retry policies
An enterprise artificial intelligence team is deploying distributed large language model (LLM) fine-tuning jobs on Google Cloud. The architecture must satisfy the following technical and operational constraints:
Which compute provisioning strategy should the cloud architect recommend?