0
0
Apache Airflowdevops~20 mins

Cost optimization for cloud resources in Apache Airflow - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Cloud Cost Optimization Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Cost Optimization Strategies in Airflow

Which of the following is the most effective way to reduce cloud costs when running Airflow workflows?

AUse Airflow's scheduling to run tasks only during off-peak hours to leverage cheaper cloud rates.
BDisable task retries to save compute resources even if tasks fail frequently.
CAlways keep all Airflow workers running 24/7 to avoid startup delays.
DIncrease the number of parallel tasks to finish workflows faster regardless of resource usage.
Attempts:
2 left
💡 Hint

Think about when cloud providers offer lower prices and how scheduling can help.

💻 Command Output
intermediate
1:30remaining
Output of Airflow CLI Command for Worker Status

What is the output of the following command when no Airflow workers are currently running?

airflow celery status
AError: command not found
B
celery@worker1: OK
celery@worker2: OK
C
celery@worker1: DOWN
celery@worker2: DOWN
DNo nodes currently registered.
Attempts:
2 left
💡 Hint

Think about what the status command shows when no workers are connected.

Configuration
advanced
2:30remaining
Configuring Airflow to Scale Down Workers Automatically

Which Airflow configuration snippet correctly enables automatic scaling down of Celery workers to save cloud costs?

A
[celery]
worker_autoscale = 10,3
B
[scheduler]
worker_autoscale = 3,10
C
[celery]
worker_autoscale = 3,10
D
[core]
worker_autoscale = 10,3
Attempts:
2 left
💡 Hint

Check the correct section and the order of max and min workers in worker_autoscale.

Troubleshoot
advanced
2:00remaining
Troubleshooting Unexpected High Cloud Costs from Airflow

You notice your cloud bill increased sharply after deploying Airflow. Which of the following is the most likely cause?

AAirflow DAGs are scheduled too infrequently, causing idle resources.
BAirflow workers are not shutting down after task completion, running 24/7.
CAirflow is using the LocalExecutor instead of CeleryExecutor.
DAirflow logs are stored locally instead of cloud storage.
Attempts:
2 left
💡 Hint

Consider what causes continuous resource usage and costs.

🔀 Workflow
expert
3:00remaining
Optimizing Airflow DAG for Cost Efficiency

You want to optimize an Airflow DAG to minimize cloud costs by reducing unnecessary task runs. Which workflow change achieves this best?

AUse task triggers to run downstream tasks only if upstream tasks succeed.
BSet all tasks to run daily regardless of upstream task success.
CIncrease retries for all tasks to ensure completion even if costly.
DDisable task dependencies to allow parallel execution of all tasks.
Attempts:
2 left
💡 Hint

Think about avoiding running tasks that are not needed.