A media company streams thousands of image URIs from on-premises cameras to Pub/Sub. A Dataflow streaming pipeline must add the output of an existing custom TensorFlow model that is already deployed as a Vertex AI online prediction endpoint in us-central1. Business requirements state: (1) each image must be enriched with model predictions within 500 ms even during peaks of 200 images per second, (2) all data and inference traffic must stay on Google's private network without public internet egress, and (3) per-prediction cost must be minimized. Which design for the Dataflow transformation best meets these requirements?
Package the TensorFlow SavedModel with the Dataflow worker container and run in-process inference on autoscaled GPU workers, avoiding any calls to Vertex AI.
Window incoming events for one minute, write the images to Cloud Storage, launch a Vertex AI batch prediction job, and join the asynchronous results back into the stream.
Add a ParDo that sends each image to the public Vertex AI online prediction REST endpoint over the internet from the Dataflow workers.
Expose the Vertex AI online prediction endpoint through Private Service Connect, disable public IPs on Dataflow workers, and invoke the private endpoint from a ParDo so the pipeline receives low-latency, in-region predictions that scale with demand.
Invoking the existing Vertex AI online prediction endpoint through Private Service Connect (PSC) keeps all traffic on Google's private network, satisfying the no-egress compliance requirement. Online prediction is designed for real-time, low-latency inference (tens-hundreds of milliseconds) and can automatically scale the number of model server replicas to meet high, bursty throughput such as 200 images per second. Because you pay only for the CPU/GPU time actually used plus minimal PSC charges, per-prediction cost is lower than embedding a model on every Dataflow worker or invoking a higher-priced public API. Calling the public endpoint would violate the no-egress requirement, and batch prediction jobs are asynchronous and add minutes of latency. Packaging the model inside every Dataflow worker inflates resource usage and cost and complicates model version management. Therefore, using PSC with Vertex AI online prediction from a ParDo in the Dataflow pipeline is the correct approach.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is Private Service Connect (PSC) in Google Cloud?
Open an interactive chat with Bash
How does Vertex AI online prediction handle real-time, low-latency inference?
Open an interactive chat with Bash
Why is model packaging inside Dataflow workers considered inefficient compared to using Vertex AI online prediction?
Open an interactive chat with Bash
What is Private Service Connect (PSC) in Google Cloud?
Open an interactive chat with Bash
Why is Vertex AI online prediction a better option for real-time inference?
Open an interactive chat with Bash
How does autoscaling help with Dataflow pipelines during peak traffic?
Open an interactive chat with Bash
What is Private Service Connect (PSC) in GCP?
Open an interactive chat with Bash
How does online prediction in Vertex AI handle high throughput?
Open an interactive chat with Bash
What are the advantages of using Vertex AI over embedding TensorFlow models directly in Dataflow?
Open an interactive chat with Bash
GCP Professional Data Engineer
Ingesting and processing the data
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99 $11.99
$11.99/mo
Billed monthly, Cancel any time.
$19.99 after promotion ends
3 Month Pass
$44.99 $26.99
$8.99/mo
One time purchase of $26.99, Does not auto-renew.
$44.99 after promotion ends
Save $18!
MOST POPULAR
Annual Pass
$119.99 $71.99
$5.99/mo
One time purchase of $71.99, Does not auto-renew.
$119.99 after promotion ends
Save $48!
BEST DEAL
Lifetime Pass
$189.99 $113.99
One time purchase, Good for life.
Save $76!
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .