Prepare and test your skills
Prepare and test your skills
Modernization of compute is the move from large virtual machine (VM)-based monoliths to independent microservices on managed platforms. A monolith is refactored or rearchitected so tightly coupled parts become separate services that scale, deploy, and fail independently. In Google Cloud this commonly uses Google Kubernetes Engine (GKE) (opens in a new tab) or Cloud Run, with Cloud Service Mesh, Logging, and Monitoring for networking and observability. Containers and Kubernetes provide a common runtime layer, so teams develop and operate the same way in the cloud and at the edge, including GKE clusters hosted outside Google Cloud with Google Distributed Cloud connected.
Choosing a migration path means matching each tier to rehost, refactor, or rebuild based on dependencies and value. A practical path is phased migration, where teams start with lift-and-shift or replatforming and then refactor after the system runs in the cloud. During transition, modernized services still communicate with other environments over a hybrid network connection. Different tiers can use different paths, such as replatforming a self-hosted MySQL database to Cloud SQL while refactoring frontend VMs to containers on GKE Autopilot and replacing hardware load balancing with Cloud Load Balancing and Google Cloud Armor.
Exam tip: Choose rehost when the workload can move as-is with few dependencies, and choose refactor when dependencies, unsupported operating systems, inefficient resource use, or manual deployments must be fixed to run well in the cloud.
Decoupling legacy and modern services means placing a managed API layer between clients and backend microservices. An API gateway acts as a unifying facade that centralizes control, adds security, shields clients from backend changes, and supports audit trails across environments. Apigee and Apigee Hybrid host enterprise gateways across on-premises, edge, other clouds, and Google Cloud, so existing backend-for-frontend and microfrontend patterns keep working while backends change. For traffic inside the system, Cloud Service Mesh manages authentication, authorization, and encryption between services.
Operating modern architectures means treating clusters and releases as automated and fungible rather than manually maintained servers. GKE clusters should be provisioned by automation so an upgrade provisions a new cluster, deploys workloads automatically, and decommissions the old cluster. Consistent tooling and continuous integration and continuous delivery (CI/CD) pipelines across cloud and edge reduce drift. GKE supports cluster autoscaling with node auto-provisioning plus Horizontal Pod autoscaling for replica count and Vertical Pod autoscaling for requests and limits.
Automated deployment pipelines build, test, and promote changes without manual handoffs. Cloud Build (opens in a new tab) creates and tests container images from source code, and Cloud Deploy promotes artifacts through stages to GKE, Cloud Run, or Compute Engine. Testing runs before production so failed changes are blocked early:
Mature pipelines add monitoring of deployment infrastructure, blue/green releases, and a break-glass process for emergency access.
Efficient operations rest on codifying definitions, automating work, and monitoring results so the same code produces the same environment every time. Code flows from version control through Cloud APIs to Google Cloud resources, and monitoring data flows from workloads to dashboards, alerts, and sinks in Cloud Storage, Pub/Sub, or BigQuery. Codify infrastructure with Terraform, configuration with Ansible, Chef, or Puppet, policy with Open Policy Agent, and operations with GitOps. Automate toil with the Google Cloud CLI, Cloud APIs, Cloud Scheduler, Cloud Run for event-driven tasks, and Cloud Composer for workflows. Monitor with Cloud Monitoring and Cloud Logging, covering at minimum latency, traffic, errors, and saturation.
Right-sizing matches capacity to demand using real metrics and recommendations. Cloud Monitoring shows CPU, memory, and custom metrics, while Recommender suggests smaller machine types or reclaimed idle resources. Autoscaling then adds capacity when demand rises and removes it when demand falls. Compute Engine managed instance groups scale VMs as one entity between minimum and maximum counts, GKE scales nodes and Pods together, and Cloud Run scales container instances up during peaks and to near zero when idle.
FinOps ties spending to business value with shared accountability across engineering, finance, and business teams. Billing data exported to BigQuery and analyzed with Looker reveals trends and forecasts, while tags and labels flow into billing reports, budgets, and alerts. Active Assist (opens in a new tab) recommends rightsizing and idle-resource cleanup:
| Option | How savings are earned | Choose when |
|---|---|---|
| Committed use discounts (CUDs) | Commit to minimum usage for a term for discounted prices | Usage is predictable over months or years |
| Sustained use discounts | Automatic discounts for Compute Engine used much of the billing cycle | VMs run consistently without formal commitment |
| Spot VMs | Lower price for unused capacity that can be preempted | Workloads are fault-tolerant batch jobs that can be interrupted |
Improvement runs as a continuous optimization loop where measurement decides the next step:
Integration of analytics and machine learning combines managed data services with AI platforms to improve prediction. Data flows from transactional sources into BigQuery for analysis, then from curated datasets into Vertex AI for training and serving, with automation connecting each stage. Changed data flows continuously from sources such as MySQL into BigQuery tables, so analytics stay current while transactional and analytics workloads stay separate. BigQuery supports large queries, multivariate time-series forecasting, and semantic search over graph data, with snapshots for in-place recovery and exports to Cloud Storage for low-cost durable storage.
Vertex AI builds custom models from customer data and code on scalable infrastructure that can include Compute Engine, GKE, and TPUs and GPUs. Inputs must be checked for bias and synthetic-data quality before promotion, so only validated models flow to serving. Models stay accurate through MLOps pipelines where each stage depends on the prior stage:
Designing AI systems for scale starts with business forecasts, historical analysis in Cloud Monitoring, load testing, and quota planning for Compute Engine, Agent Platform, and Cloud Storage. Teams request quota increases through the console with forecast data, rightsize resources, implement autoscaling, and use Spot VMs for fault-tolerant batch training. Operating AI workloads combines infrastructure monitoring, deployment tracking with Cloud Deploy and Cloud Monitoring, threat monitoring with Security Command Center, and custom alerting with Cloud Logging, Monitoring, Error Reporting, Cloud Trace, and Cloud Profiler. Culture sustains gains through automation, continuous learning, clear accountability, and AI ethics covering fairness, bias, and societal impact.
Continue with this study guide: Cloud and technology improvements
Modernization of the application lifecycle is the shift from one large system to smaller services that build, deploy, and scale independently. Code flows from developers to independent microservices, then through automated pipelines to monitored production. Skaffold modules split an app into named groups inside a skaffold.yaml file, where each module declares its own build artifacts, Kubernetes manifests, and deploy settings. The Bank of Anthos sample uses ten microservices grouped into five modules: setup for foundation resources, db for accounts-db and ledger-db, frontend for the user interface, backend for core business services, and loadgenerator for test traffic. A change to frontend does not rebuild the databases, so each area evolves at its own pace.
Configuration dependencies control deployment order between modules. A module becomes a named configuration with metadata.name such as db or setup, and a dependent lists that name under requires with a configs list. Data and startup flow from the dependency to the dependent, so the db module deploys only after setup is deployed. The workflow runs in order: open the project, name each module, declare dependencies with requires, define build and deploy settings such as container images and kubectl deploy, then test each module separately to confirm dependencies deploy automatically.
Continuous development with Cloud Code (opens in a new tab) creates a rapid edit, build, and deploy loop to Kubernetes from the development environment. A developer edits code such as a /greeting endpoint, saves the project, watches logs in the console, and confirms the update in the running app. The session stays active through repeated edits and ends when the developer clicks Stop, at which point Cloud Code deletes all Kubernetes resources used for the session. Teams can select specific Skaffold modules and their dependencies in the Build / Deploy tab, so only needed services rebuild during fast iteration.
Sustaining performance combines load testing, trend analysis, and recommendations. Load testing finds breakpoints and shows how the app scales under higher traffic before growth causes failures. Cloud Monitoring then tracks metrics over time to validate changes, compare before-and-after experiments, trigger alerts on thresholds, and support retrospective learning. Active Assist provides insights that flow back to operations to adjust allocation as demand shifts.
Transformation of data strategy moves from storing data only for archiving to using data continuously for analytics and machine learning. Early stages favor durable low-cost storage for backups and compliance, while mature stages add pipelines, warehouses, and models for real-time decisions. An evolving storage strategy matches each dataset to access frequency and retention. Cloud Storage holds everything from frequently read analytics data to regulatory archives in buckets accessible from inside and outside Google Cloud. Frequently read data can be served faster with Cloud CDN caching near clients or Rapid Cache for read-heavy ML training and analytics. Data reaches Google Cloud by Storage Transfer Service for large online transfers, Transfer Appliance for large offline transfers with limited bandwidth, or direct upload with console, gcloud CLI, APIs, or client libraries.
| Storage class | Access pattern | Minimum retention and typical use |
|---|---|---|
| Standard with Autoclass | Varying or unpredictable | No fixed minimum; moves each object automatically |
| Standard | Frequent | No fixed minimum; analytics, lakes, websites, video, mobile |
| Nearline | Infrequent | At least 30 days; backups and long-tail media |
| Coldline | Rare | At least 90 days; disaster recovery copies |
| Archive | Very rare | At least 365 days; regulatory archives |
A modern analytics platform moves data from raw events to business-ready insight. A data lake ingests and stores data from many systems, commonly in Cloud Storage. A processing pipeline takes events from systems, transforms them, and loads them elsewhere, usually a warehouse. A data warehouse organizes transformed data for reporting, commonly in BigQuery (opens in a new tab). Data flows from source systems to the lake and then through the pipeline to the warehouse, so reliability and locality must cover all three layers together.
Batch analytics processes staged files on a schedule for metrics where delay is acceptable. In a retail example, point-of-sale files flow from stores to a Cloud Storage bucket and wait for the scheduled job. The ordered flow is ingestion to the bucket, orchestration by Managed Service for Apache Airflow, processing by Apache Spark ETL that cleans data and computes metrics, then storage of processed data in columnar Parquet and ORC formats with metadata in Dataproc Metastore. Columnar formats store data efficiently, speed analytical access, and interoperate with Hive and Presto.
Streaming analytics processes events continuously for live dashboards, alerts, and scoring. Change data capture tracks inserts and updates over time and applies them to the warehouse in near real time. Data flows from producers to Pub/Sub, then through Dataflow running Apache Beam pipelines, then into BigQuery for analysis. Pub/Sub provides a durable handover between environments, Dataflow reads, transforms, and writes to sinks, and BigQuery stores historic and appended data in regional or multi-region datasets. Dataflow jobs can be restricted to approved regions and zones, or use broader regions with customer-managed encryption keys, and append-only tables can recover recent partitions such as the last 7 days of an orders table when returns are allowed for 7 days.
Exam tip: Extract, transform, and load (ETL) transforms data before loading it into the warehouse, while extract, load, and transform (ELT) loads data first and then transforms it inside BigQuery.
Adaptation to global scale replaces fixed on-premises capacity with elastic design that adds or removes resources as demand changes. Elasticity lets components scale independently so capacity is added where needed without over-provisioning everything. Scalability is the ability to handle varying work by adding or removing resources, supported by automation, loose coupling, and data-driven decisions from metrics and logs. Removing underused resources cuts cost without harming performance, while adding resources during peaks preserves experience.
Designing for high availability distributes compute, traffic, and data across zones and regions. Availability is the fraction of time a service is usable, increased by redundant deployment across zones or regions. Compute Engine instance groups and GKE clusters distribute across zones in a region, Cloud Load Balancing directs traffic from the load balancer to a healthy region closest to users, Compute Engine regional persistent disks replicate synchronously between zones in a region, and serverless compute and database products provide built-in redundancy. Because traffic flows from the global load balancer to healthy capacity, failure in one zone or region does not have to stop the app.
| Scaling type | How capacity changes | What happens to components |
|---|---|---|
| Horizontal scaling | Adds replica nodes to increase overall capacity | More instances share demand, then are removed when no longer needed |
| Vertical scaling | Replaces components with larger components | Same component gains more capacity, memory, and storage |
Responding to demand combines advance preparation for known peaks with automatic reaction to surges. Manual scale-up before seasonal sales ensures immediate capacity because reactive scaling can take minutes. For unexpected surges, autoscaling adds or removes capacity based on CPU, load-balancer serving capacity, latency, or custom Cloud Monitoring metrics. Data flows from apps to Cloud Monitoring, and the autoscaler depends on those metrics, such as adding Compute Engine managed instance group (MIG) instances when average CPU reaches 75% until the maximum is reached. Predictive autoscaling forecasts CPU from history and recomputes every few minutes, while inherently elastic services like Cloud Run, Cloud Run functions, BigQuery, Spanner, Eventarc, Workflows, and Pub/Sub scale quickly from zero with pay for use. Planning for critical periods also means freezing code during peaks, reassessing reliability as users expand from zonal to multi-region, and respecting cost quotas and data-residency rules that limit where data can be stored and processed.
Continue with this study guide: Evolution of business needs
Architectural decoupling builds an application as independent microservices instead of one tightly connected system. Each service handles its own requests, owns its data choices, and evolves independently, so growth in one area and failure in another stay contained. Traffic flows from one service to another through asynchronous messaging and network calls, which supports global scalability and fault tolerance.
Separation of stateless and stateful services is the foundation for safe scaling. A stateless service handles each request independent of previous requests, so instances can be created and destroyed without losing in-flight data. This property is critical when an autoscaler adds or removes instances unexpectedly. Teams must explicitly label which services require state, so stateless services scale simply while stateful services get careful recovery planning.
As service interdependencies grow, one overloaded service can pull down its callers in a cascading failure. Resiliency patterns relieve pressure or fail gracefully:
A service mesh (opens in a new tab) decouples business logic from networking by managing how traffic flows from the source service to the destination service. Application code sends a business request to the mesh, and the mesh handles retries, failovers, and circuit breakers consistently system-wide. Distributed deployment extends this resilience by running services in two or more locations. Transactionally synchronized data is consistent everywhere and best for running instances in all locations, while asynchronously replicated data can conflict if the same item changes in two places and needs a resolution strategy. Recovery follows a fixed order: first restart the failed service in place, as Kubernetes does automatically, and only after that fails, fail over from the primary location to a secondary location.
Refactoring for portability means moving monoliths toward observable patterns that can be scaled reliably on managed services. Observability comes from metrics, logs, and traces flowing from workload components into Cloud Monitoring and Cloud Logging for analysis and alerting. Comprehensive signals help teams find where errors occurred and detect failures before users are affected, especially important when one user journey flows across many microservices.
| Signal | What it captures | Example use in Google Cloud |
|---|---|---|
| Metrics | Numerical measurements at intervals | Track request rate, error rate, orders placed, and payments received |
| Logs | Time-stamped records of discrete events | Record failures, errors, and state changes for indicators |
| Traces | Journey of one transaction across components | Show components used, bottlenecks, and journey duration |
Gaining insights means tracking response times and error rates against workload needs with default service metrics plus custom metrics published with the Google Cloud SDK. Monitoring flows from platform signals to application-specific needs as design matures. Because log storage costs money, logging data flowing from sources such as Cloud Storage access logs and Virtual Private Cloud (VPC) Flow Logs into sinks can use exclusion filters to skip low-value logs while keeping critical troubleshooting signals.
Optimizing utilization means watching consumption signals that flow from GKE, Compute Engine, and Managed Service for Apache Spark into Cloud Monitoring: CPU consumption, network I/O showing traffic load, and disk I/O showing storage pressure. Cloud Monitoring supports trend, experiment, and retrospective analysis, while Active Assist recommends allocation changes and load testing reveals breakpoints. Prioritizing alerts focuses response on user-impacting metrics with thresholds that avoid fatigue, while a Cloud Service Mesh such as Istio provides application-layer traffic management as requests flow from clients through mesh policies to backends.
Exam tip: A stateless service can be terminated by an autoscaler without losing in-flight work, while a stateful service cannot, so always separate the two explicitly.
Prioritization of managed and serverless services is a cloud-first approach that chooses Google Cloud managed offerings before self-managed VMs. Self-managed Compute Engine leaves machine types, instance groups, scaling policies, and recovery with the team, while managed services automate capacity, redundancy, and scaling. The result is more scalable architecture with less toil and fewer human interventions. Traffic flows from users or events to the managed service, and the service adds or removes capacity without team action.
Inherently elastic serverless services offload the most operations:
Automated scaling lets each component grow and shrink independently. Horizontal scaling adds instances to spread load and is preferred because one instance failure does not stop the app, while vertical scaling replaces components with larger ones. Reactive scaling suits unpredictable spikes and proactive scaling pre-provisions for daily or seasonal patterns. Predictive autoscaling for Compute Engine forecasts CPU from history every few minutes, and GKE Autopilot, Cloud Run, and MIGs learn patterns automatically. By default Cloud Run scales to zero when idle, while a MIG keeps at least its minimum VMs. Policies should use queue depth, latency, or custom metrics from Cloud Monitoring (opens in a new tab) rather than CPU alone, avoid frequent flapping, and keep session state in external storage such as Memorystore for Redis so any instance can handle any request.
Reducing technical debt avoids choices that make future scaling expensive, such as hard-to-scale hardware dependencies, hard-to-operate high-availability setups, coupled apps that cannot scale independently, licensing limits on replicas, skill gaps, and resistance to automation. Immutable infrastructure stored in source control and redeployed instead of tweaked reduces drift. Matching workloads to resource models controls cost:
| Workload type | Requirements | Resource options |
|---|---|---|
| Mission-critical | Continuous availability, security, high performance | Premium managed services like Spanner |
| Non-critical | Cost-efficient autoscaling | Basic and ephemeral resources like Spot VMs |
| Event-driven | Dynamic scaling with demand | Serverless like Cloud Run and Cloud Run functions |
Choose Spanner when data needs global consistency despite higher cost, Spot VMs when interruption is tolerable, and Cloud Run when demand varies and the service should pay only for use.
Continue with this study guide: Cloud-first design approach
Future improvements connect modernization, business evolution, and cloud-first design into one lifecycle. Monoliths become independent microservices and modules on GKE, Cloud Run, and managed data services, storage and pipelines evolve from archives to streaming analytics in BigQuery and Vertex AI, and decoupling, observability, and elastic managed services let the architecture absorb growth, peaks, and failures without rebuilding for each new demand.
A left-to-right process flow showing streaming analytics: event producers send events to Pub/Sub for durable handover, Dataflow runs Apache Beam transforms, and results are written to BigQuery for analysis, with CDC updates applied continuously.
Choose rehost when workloads have few environment dependencies, are not worth refactoring, cannot feasibly be refactored before migration, or are based on third-party software. Consider refactor when dependencies must be untangled, operating systems or databases cannot run as-is in the cloud, resources are used inefficiently, or deployments cannot be automated without effort. Consider rebuild when workloads no longer meet requirements, can be merged into another app without harm, rely on end-of-life third-party technology, or carry license fees that are no longer economical.
Horizontal scaling adds replica nodes to increase overall capacity so more instances share demand and are removed when no longer needed. Vertical scaling replaces components with larger components so the same component gains more capacity, memory, and storage.
Streaming analytics data flows from producers to Pub/Sub, then through Dataflow running Apache Beam pipelines, then into BigQuery for analysis. Pub/Sub provides a durable handover between environments, Dataflow reads, transforms, and writes to sinks, and BigQuery stores historic and appended data in regional or multi-region datasets.
Last updated