nerdexam
Google

PROFESSIONAL-DATA-ENGINEER · Question #336

You are running a Dataflow streaming pipeline, with Streaming Engine and Horizontal Autoscaling enabled. You have set the maximum number of workers to 1000. The input of your pipeline is Pub/Sub…

The correct answer is B. Change the pipeline code, and introduce a Reshuffle step to prevent fusion. Fusion is preventing the autoscaler from recognizing parallelism opportunities. When Dataflow fuses the Pub/Sub read and the CSV-parsing transform into a single stage, it sees the combined unit as having only as many parallel bundles as the Pub/Sub subscription provides (10 in…

Submitted by alyssa_d· Mar 30, 2026Designing data processing systems

Question

You are running a Dataflow streaming pipeline, with Streaming Engine and Horizontal Autoscaling enabled. You have set the maximum number of workers to 1000. The input of your pipeline is Pub/Sub messages with notifications from Cloud Storage. One of the pipeline transforms reads CSV files and emits an element for every CSV line. The job performance is low, the pipeline is using only 10 workers, and you notice that the autoscaler is not spinning up additional workers. What should you do to improve performance?

Options

  • AEnable Vertical Autoscaling to let the pipeline use larger workers.
  • BChange the pipeline code, and introduce a Reshuffle step to prevent fusion.
  • CUpdate the job to increase the maximum number of workers.
  • DUse Dataflow Prime, and enable Right Fitting to increase the worker resources.

How the community answered

(18 responses)
  • A
    6% (1)
  • B
    83% (15)
  • C
    11% (2)

Explanation

Fusion is preventing the autoscaler from recognizing parallelism opportunities. When Dataflow fuses the Pub/Sub read and the CSV-parsing transform into a single stage, it sees the combined unit as having only as many parallel bundles as the Pub/Sub subscription provides (10 in this case), so the autoscaler has no reason to add workers. Inserting a Reshuffle step after the CSV line emission breaks that fusion, creating a new stage boundary with many more elements that the autoscaler can distribute across additional workers.

Why the distractors are wrong:

  • A (Vertical Autoscaling): Bigger workers won't fix under-parallelism caused by fusion - you'd still only use ~10 workers, just larger ones.
  • C (Increase max workers): The max is already 1000; the autoscaler isn't hitting the cap - it simply doesn't see enough parallelism to justify scaling, so raising the limit changes nothing.
  • D (Dataflow Prime / Right Fitting): Right Fitting tunes CPU/memory per worker but doesn't address the structural fusion problem that's capping the worker count at 10.

Memory tip: If autoscaling won't scale despite a high max-worker limit, think "fusion first." The autoscaler scales based on perceived parallelism - fusion hides that parallelism. Reshuffle = "re-expose the parallelism."

Topics

#Dataflow performance#Pipeline optimization#Autoscaling#Dataflow fusion

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-DATA-ENGINEER Practice