Courseiva

PMLE Serving and Scaling Models Practice Question

A team is building a batch prediction pipeline that processes raw data from Cloud Storage, performs complex preprocessing, and then runs predictions using a large model. The preprocessing step is compute-intensive and the prediction step is I/O-bound. Which TWO Google Cloud services should they combine to optimize cost and performance? (Choose 2)

⚠ Common exam trap

Google often tests the distinction between batch and online serving patterns, and the trap here is that candidates may choose Cloud Functions or Cloud Run for preprocessing because they are familiar serverless options, without realizing that Dataflow is purpose-built for large-scale, compute-intensive batch processing and that Vertex AI Batch Prediction is the correct service for offline inference at scale.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Dataflow for preprocessing and writing results to Cloud Storage

Option A (Dataflow for preprocessing and writing results to Cloud Storage) is correct because Dataflow is a fully managed, autoscaling service built on Apache Beam that handles compute-intensive, parallel batch preprocessing over data in Cloud Storage, and it can write the transformed output back to Cloud Storage for the next stage. Option D (Vertex AI Batch Prediction with Cloud Storage source) is correct because it is the managed, I/O-bound batch inference service designed to read preprocessed files directly from Cloud Storage and run predictions on a large model without provisioning persistent serving infrastructure, which optimizes cost for batch workloads. Option B is wrong because Cloud Functions is event-driven and limited in execution time and memory, making it unsuitable for compute-intensive row-by-row preprocessing of large batch datasets. Option C is wrong because Cloud Run serving preprocessed data as an API adds unnecessary request/response overhead and is designed for online serving, not batch pipeline handoff. Option E is wrong because the pipeline explicitly reads raw data from Cloud Storage and writes preprocessed results there, so a BigQuery source for batch prediction does not match the described data flow.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✓

    Dataflow for preprocessing and writing results to Cloud Storage

    Why this is correct

    Dataflow provides autoscaling, distributed workers suited to the compute-intensive preprocessing stage, reading raw Cloud Storage data and writing transformed output back to Cloud Storage. This satisfies the stem's constraint by matching elastic compute to preprocessing while keeping the I/O-bound prediction stage separate.

  • ✗

    Cloud Functions to preprocess data row by row

    Why it's wrong here

    Cloud Functions caps execution at 60 minutes and per-instance memory, so row-by-row preprocessing of large batch data stalls and scales poorly. It suits event-driven, short, single-purpose triggers, not compute-intensive bulk transformation; the pipeline needs a service that distributes heavy preprocessing across many workers.

  • ✗

    Cloud Run to serve the preprocessed data as an API

    Why it's wrong here

    Cloud Run serves synchronous HTTP APIs and is not a batch preprocessing engine; the compute-intensive step needs a batch service such as Dataproc or Dataflow. It tempts because Cloud Run scales automatically and suits containerised request-response workloads, not scheduled bulk transformation.

  • ✓

    Vertex AI Batch Prediction with Cloud Storage source

    Why this is correct

    Vertex AI Batch Prediction reads input directly from Cloud Storage and writes predictions back there, handling the I/O-bound inference stage without provisioning always-on compute. This satisfies the stem's cost and performance constraint by decoupling large-model serving from the compute-intensive preprocessing.

  • ✗

    Vertex AI Batch Prediction with BigQuery source

    Why it's wrong here

    Vertex AI Batch Prediction with BigQuery source reads training data from BigQuery tables, not Cloud Storage objects, so it cannot ingest the raw files described. It is tempting because it suits scheduled scoring jobs where features already reside in BigQuery, letting you skip separate preprocessing infrastructure entirely.

Quick reference

Cloud Service Model Comparison

ModelYou ManageProvider ManagesExamples
IaaSOS, runtime, apps, dataHardware, hypervisor, networkingEC2, Azure VMs, GCP Compute Engine
PaaSApps and dataOS, runtime, middleware, hardwareElastic Beanstalk, Azure App Service
SaaSData and settings onlyEverything elseMicrosoft 365, Salesforce, Workday
FaaS / ServerlessFunction code onlyInfra, scaling, runtimeLambda, Azure Functions, Cloud Run
CaaSContainers and appsKubernetes, OS, hardwareEKS, AKS, GKE

About these practice questions

One of 775 original PMLE practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This PMLE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PMLE exam.