Skip to main content
๐Ÿ“˜ Complete PDF

Apache Airflow Certification Practice Test 05

Select All That Apply Questions

Question 1 of 20
๐Ÿ”˜ Multi-Select (Select all that apply)
Question 81
A newly joined Data Engineer reviews an enterprise production Airflow platform supporting hundreds of daily workflows. Management wants to improve overall platform reliability and minimize unplanned downtime. Which FOUR operational practices should be implemented?
โœ“
A. Automated Task Retry Configuration with Exponential Backoff
โœ“
B. Proactive Multi-Channel Alerting (e.g. Slack, PagerDuty, Email)
โœ“
C. Centralized Infrastructure and Task Metric Monitoring
โœ“
D. Explicit Service Level Agreement (SLA) Expectations and Callback Handlers
E. Disabling Worker Logging to Conserve Disk Space
F. Removing Task Dependencies to Run All Jobs in Parallel
Answer
โœ… A, B, C, D
Explanation

1. Concept Overview / Core Concept / Direct Confirmation Enterprise Airflow production reliability is built upon automated error recovery, real-time alert dispatch, telemetry monitoring, and explicit SLA tracking.

2. Why This Answer Is Correct / Detailed Breakdown - **Option A (Retries):** Automated retries intercept transient failures (network blips, API throttles), allowing tasks to recover without human intervention. - **Option B (Alerting):** Configured alert callbacks (`on_failure_callback`) notify engineering immediately upon fatal task failures. - **Option C (Monitoring):** Emitting metrics via StatsD to Prometheus/Datadog surfaces worker bottlenecks, task queuing, and scheduler heartbeats. - **Option D (SLAs):** Defining `sla` and `sla_miss_callback` identifies tasks that take longer than expected before downstream reports are delayed.

3. Why Other Options Are Incorrect / Distractor Analysis - **E. Disabling Logging:** Eliminating task logs makes debugging and root cause analysis impossible. - **F. Removing Dependencies:** Deleting task dependencies causes race conditions and executes transformations on un-ingested or incomplete data.

4. Architectural & Execution Context / Physical Execution Airflow coordinates reliability across components: the Scheduler monitors task states and enforces retries, Workers execute operators and stream logs, and StatsD exporters emit runtime metrics to APM platforms.

5. Practical Code Example

from datetime import timedelta
from airflow import DAG
from airflow.operators.bash import BashOperator

default_args = {
    'owner': 'data_eng',
    'retries': 3,
    'retry_delay': timedelta(minutes=2),
    'retry_exponential_backoff': True,
    'max_retry_delay': timedelta(minutes=15),
    'sla': timedelta(hours=1),
}

with DAG('reliable_pipeline', default_args=default_args) as dag:
    task = BashOperator(
        task_id='ingest',
        bash_command='curl -f https://api.example.com/data'
    )

6. Key Takeaway Reliability requires automated retries with backoff, proactive failure alerting, metric telemetry, and strict SLA enforcement.

7. Best Practice & Production Recommendation Set global retry and alerting defaults in `default_args` so every task in the DAG automatically inherits resilient behavior.

8. Real-World Engineering Scenario A fintech data team faced 15 weekly manual task restarts due to momentary cloud gateway timeouts. Adding automated retries with exponential backoff resolved 95% of incidents automatically, restoring morning dashboard SLAs.

9. Common Exam Trap / Anti-Pattern / Misconception Avoid setting high retry counts without backoff (`retry_exponential_backoff=True`), as rapid retries can hammer a struggling third-party API and cause cascading rate-limit bans.

10. Related InsightfulSaga Tutorial Master these concepts in [Airflow Production Architecture](/tutorials/airflow/monitoring-dags-airflow).

Answered: 0 / 20
Question Navigator (Test 05)0% Answered