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!
Choosing the right compute resource is the first step in building a successful cloud solution. Architects must look at technical requirements to decide between Compute Engine, Google Kubernetes Engine (GKE), and serverless platforms. Matching the compute environment to the specific workload ensures that the system is both fast and reliable while remaining cost-effective.
Compute Engine provides Infrastructure as a Service (IaaS), giving users granular control over virtual machines and operating systems. For applications using containers, Google Kubernetes Engine (GKE) offers container orchestration to manage and scale pods automatically across clusters. Selecting the right machine type, such as compute-optimized or accelerator-optimized for GPUs, is vital for high-performance tasks like AI training.
For workloads that do not need constant infrastructure management, serverless computing through Cloud Run or Cloud Functions is a great choice. These platforms use event-driven scaling, meaning they only run when needed and can scale down to zero to save money. Serverless options are best for web services or small tasks that trigger based on specific actions or requests.
Effective resource management involves using telemetry data from Cloud Monitoring to predict future needs. Architects should perform load testing to see how systems handle stress and ensure there is enough capacity for peak times. Key tools for this include Cloud Logging for tracking system behavior and errors, BigQuery for analyzing long-term resource usage patterns, and quotas to manage and increase resource limits as the business grows.
Designing for high availability means building redundancy so that a single failure does not stop the whole system. This includes using regional clusters and multi-zonal deployments to protect against local data center outages. Data should be stored in durable systems like Persistent Disk or Cloud Storage to ensure it remains available even if a virtual machine fails.
To keep costs low, organizations can use Committed Use Discounts (CUDs) for steady workloads with predictable needs. For tasks that can be interrupted, such as batch processing, Spot VMs offer a much lower price by using extra Google capacity. Autoscaling features in services like Dataflow and Vertex AI help by automatically adjusting resources as the workload changes.
Spot VMs are a cost-effective way to run fault-tolerant workloads by using excess Google Cloud capacity at a deep discount. These instances are ideal for tasks like batch processing or data analytics where interruptions are acceptable to the business. However, Google Cloud can preempt these VMs at any time, meaning they will be stopped or deleted if the capacity is needed elsewhere. The cost savings are significant, offering discounts between 60% and 91% compared to standard prices, but preemption can happen with very short notice. Best use cases include non-critical tasks like media encoding or CI/CD pipelines.
Flex-start is a provisioning model powered by the Dynamic Workload Scheduler (DWS), designed for short-term GPU or TPU workloads. It allows users to request resources for up to seven days, and the system automatically provisions the VMs once capacity becomes available. This is perfect for model fine-tuning or simulations that do not require a specific, fixed start date. The dynamic scheduling queues requests and starts them when resources are free, while dense allocation places machines close together to minimize network latency.
To handle fluctuating demand, autoscaling automatically adjusts the number of active resources based on real-time metrics like CPU or GPU utilization. For containerized applications, Google Kubernetes Engine (GKE) uses cluster autoscalers to manage node counts and Horizontal Pod Autoscalers to scale individual pods. This ensures that the system meets performance requirements without over-provisioning and wasting money during low-traffic periods. Horizontal scaling adds or removes VM instances based on workload needs, using metric-based data like memory usage or request rates, which reduces manual intervention by automating resource management.
Building for reliability requires redundancy across multiple zones or regions to prevent a single point of failure. Using Regional Persistent Disks ensures that data is synchronously replicated between two zones in the same region for high availability. For data processing, Cloud Storage multi-regional buckets provide high durability and availability for critical datasets and checkpoints used in training. Synchronous replication writes data to two locations at once to prevent data loss, while regional clusters distribute compute power across different physical locations, and snapshots capture point-in-time states of disks for easy recovery.
Committed Use Discounts (CUDs) and reservations help manage costs and resource availability for predictable, long-term workloads. A reservation provides assured capacity in a specific zone, which is vital for high-demand hardware like specialized AI accelerators. Proactive management involves using Cloud Monitoring to analyze historical data and forecast future resource needs to avoid stockouts. Capacity assurance guarantees that specific VM types are available when needed, predictable pricing offers lower rates for long-term resource commitments, and forecasting uses telemetry data to predict when to increase resource quotas.
Dataflow is a fully managed service used for unified stream and batch data processing. It is built on the Apache Beam framework, which allows developers to define data pipelines using a Directed Acyclic Graph (DAG). This approach is ideal for highly parallel workloads where data needs to be ingested, processed, and analyzed in a single, continuous flow. One of the main advantages of Dataflow is its ability to handle autoscaling, which means it automatically adjusts resources based on the volume of data. It also uses data locality to keep processing close to the data, which increases efficiency by reducing the need to move data between different stages, and it eliminates the need for external orchestration tools to coordinate multiple pipelines.
When choosing between services, Dataproc is the preferred choice for organizations using existing Hadoop or Spark ecosystems. It allows users to run familiar open-source tools while benefiting from Google Cloud's infrastructure, such as using the Cloud Storage connector with gRPC for faster data access. In contrast, Dataflow is better suited for new pipelines that require flexible, serverless processing for both real-time and historical data.
Dataflow integrates seamlessly with other Google Cloud services to act as data sources or sinks. For example, it can read from Pub/Sub for streaming events or use BigQuery for large-scale data warehousing. When working with BigQuery, users can choose between the Direct Read API for high-speed access or the Export method depending on their specific quota and performance needs. Key integration points include Pub/Sub for global event stream ingestion and delivery, Bigtable as a wide-column store used for caching and serving data at scale, Cloud Storage as a unified object store used to stage binaries and store large files, and BigQuery as a petabyte-scale data warehouse used for deep analysis and reporting.
Effective management of these services involves using Cloud Monitoring to track system lag and resource usage. Administrators can create alerting policies to get notified if a pipeline slows down or fails. By monitoring metrics like vCPU count and memory usage, teams can optimize costs and ensure reliability across their data processing infrastructure.
Prepare and test your skills
Prepare and test your skills
Dataproc is designed for running existing Apache Hadoop and Apache Spark ecosystems using familiar open-source tools on Google Cloud infrastructure. In contrast, Dataflow is a fully managed, serverless service built on Apache Beam that provides unified stream and batch processing with automated autoscaling for new pipelines.
Spot VMs are compute instances that utilize excess Google Cloud capacity to offer cost savings between 60% and 91% compared to standard pricing. They are designed for fault-tolerant and interruptible tasks—such as batch processing, data analytics, media encoding, or CI/CD pipelines—where instances can be preempted on short notice.
Flex-start uses the Dynamic Workload Scheduler (DWS) to queue and provision short-term GPU or TPU resource requests for up to seven days once capacity becomes available. It supports workloads like model fine-tuning and simulations that do not need fixed start dates, utilizing dense allocation to position machines close together and minimize network latency.
Regional Persistent Disks provide high availability by synchronously replicating data between two zones within the same region. This synchronous replication writes data to both locations simultaneously, preventing data loss and maintaining access even if a virtual machine or single zone experiences an outage.
An enterprise organization is designing a cloud compute architecture for a new customer webhook processing service on Google Cloud. The architecture must satisfy several key workload requirements:
Which compute service should you select to meet these requirements?