Professional Data EngineerBuilding and operationalizing data processing systemsEasy
A global IoT company collects sensor data from millions of devices worldwide. This data is ingested into Cloud Pub/Sub and then processed by a Dataflow pipeline. The company needs to optimize costs by ensuring that the Dataflow pipeline only uses the necessary compute resources at any given time, dynamically adjusting to varying data ingestion rates throughout the day. Which Dataflow feature should be configured to achieve this cost optimization?
- AAutoscaling
- BWorker disk type
- CManual scaling
- DFixed number of workers
Show answer & explanationAnswer & explanation
Correct answer: A. Autoscaling
Dataflow's autoscaling feature dynamically adjusts the number of worker instances based on the current workload. This ensures that the pipeline has enough resources to process data efficiently during peak times and reduces resources during low-traffic periods, directly leading to cost optimization by paying only for consumed compute.
Why the other options are wrong
- B. Worker disk type affects storage performance and cost, but it does not control the number of compute resources (workers) used by the pipeline, which is the primary driver of compute cost optimization.
- C. Manual scaling requires constant human intervention to adjust resources, which is inefficient and prone to errors, failing the 'dynamically adjusting' requirement.
- D. A fixed number of workers would not dynamically adjust to varying data rates, leading to over-provisioning during low periods and under-provisioning during high periods, incurring unnecessary costs or performance issues.
Dataflow Autoscaling
Dataflow's autoscaling dynamically adjusts the number of worker instances used by a pipeline based on the current workload, optimizing resource utilization and cost.
- Automatically scales workers up and down
- Optimizes compute cost by matching resources to demand
- Available for both batch and streaming jobs
Memory trick: Autoscaling: Dataflow's smart thermostat for your compute bills.