Bird
Raised Fist0
Apache Airflowdevops~5 mins

Airflow architecture (scheduler, webserver, executor, metadata DB) - Cheat Sheet & Quick Revision

Choose your learning style10 modes available
Recall & Review
beginner
What is the role of the Airflow Scheduler?
The Scheduler monitors DAG definitions and triggers tasks to run at the right time. It decides when and what tasks should be executed.
Click to reveal answer
beginner
What does the Airflow Webserver do?
The Webserver provides a user interface to view DAGs, task status, logs, and manage workflows easily through a browser.
Click to reveal answer
beginner
Explain the purpose of the Airflow Executor.
The Executor runs the tasks assigned by the Scheduler. It manages how and where tasks run, such as locally or on a cluster.
Click to reveal answer
beginner
What is stored in the Airflow Metadata Database?
The Metadata Database stores information about DAGs, task status, schedules, and logs. It keeps track of workflow history and state.
Click to reveal answer
intermediate
How do the Scheduler, Webserver, Executor, and Metadata DB work together in Airflow?
The Scheduler decides when tasks run and tells the Executor to run them. The Executor runs tasks and updates the Metadata DB with status. The Webserver shows this info to users.
Click to reveal answer
Which Airflow component is responsible for triggering tasks at scheduled times?
AScheduler
BWebserver
CExecutor
DMetadata Database
Where can you view the status and logs of Airflow tasks?
AExecutor
BWebserver
CScheduler
DMetadata Database
What does the Airflow Executor do?
ADisplays the UI
BStores task logs
CSchedules DAG runs
DRuns tasks assigned by the Scheduler
What kind of data is stored in the Airflow Metadata Database?
ATask execution status and DAG info
BTask execution logs only
CUser interface settings
DTask code files
Which component updates the Metadata Database with task status?
AScheduler
BWebserver
CExecutor
DNone of the above
Describe how the Airflow Scheduler, Executor, Webserver, and Metadata Database interact to run and monitor workflows.
Think of the Scheduler as the planner, Executor as the worker, Metadata DB as the notebook, and Webserver as the dashboard.
You got /4 concepts.
    Explain the purpose of the Airflow Metadata Database and why it is important.
    It is like a diary that remembers everything about your workflows.
    You got /4 concepts.

      Practice

      (1/5)
      1. Which Airflow component is responsible for deciding when and which tasks to run?
      easy
      A. Scheduler
      B. Webserver
      C. Executor
      D. Metadata Database

      Solution

      1. Step 1: Understand the role of the scheduler

        The scheduler checks the workflow definitions and decides the timing and order of task execution.
      2. Step 2: Differentiate from other components

        The executor runs tasks, the webserver shows status, and the metadata DB stores info. Only the scheduler plans tasks.
      3. Final Answer:

        Scheduler -> Option A
      4. Quick Check:

        Task planning = Scheduler [OK]
      Hint: Scheduler plans tasks; executor runs them [OK]
      Common Mistakes:
      • Confusing executor with scheduler
      • Thinking webserver runs tasks
      • Assuming metadata DB schedules tasks
      2. Which of the following is the correct way to start the Airflow webserver using the CLI?
      easy
      A. airflow webserver -p
      B. airflow webserver start
      C. airflow start webserver
      D. airflow webserver

      Solution

      1. Step 1: Recall the Airflow CLI command for webserver

        The correct command to start the webserver is simply airflow webserver.
      2. Step 2: Analyze other options

        airflow webserver start adds an unnecessary 'start', airflow start webserver reverses the order, and airflow webserver -p adds a port flag which is valid but incomplete without specifying the port number explicitly.
      3. Final Answer:

        airflow webserver -> Option D
      4. Quick Check:

        Start webserver = airflow webserver [OK]
      Hint: Use 'airflow webserver' to start the UI [OK]
      Common Mistakes:
      • Adding extra words like 'start'
      • Reversing command order
      • Incorrect or incomplete flags
      3. Given the following Airflow setup: The scheduler triggers a task, the executor runs it, and the metadata DB records the status. What will happen if the metadata DB is down?
      medium
      A. Tasks will run but status won't be saved
      B. Scheduler will stop scheduling tasks
      C. Webserver will crash immediately
      D. Executor will ignore tasks

      Solution

      1. Step 1: Understand metadata DB role

        The metadata DB stores task states and workflow info. If it is down, Airflow components cannot read or write task status.
      2. Step 2: Impact on scheduler and executor

        The scheduler depends on the metadata DB to know which tasks to schedule. Without DB access, it cannot schedule new tasks. The executor waits for tasks from the scheduler.
      3. Final Answer:

        Scheduler will stop scheduling tasks -> Option B
      4. Quick Check:

        Metadata DB down stops scheduler [OK]
      Hint: Metadata DB failure stops scheduler [OK]
      Common Mistakes:
      • Thinking tasks run without DB
      • Assuming webserver crashes immediately
      • Believing executor ignores tasks
      4. You notice that tasks are not running even though the webserver shows them as scheduled. Which component should you check first to debug this issue?
      medium
      A. Executor
      B. Scheduler
      C. Metadata Database
      D. Webserver

      Solution

      1. Step 1: Analyze symptoms

        Tasks are marked scheduled in the webserver UI but are not running. This means scheduling is done but execution is not happening.
      2. Step 2: Identify responsible component

        The executor runs the tasks. If tasks are scheduled but not running, the executor might be stuck or misconfigured.
      3. Final Answer:

        Executor -> Option A
      4. Quick Check:

        Tasks not running? Check executor [OK]
      Hint: Scheduled but not running? Check executor first [OK]
      Common Mistakes:
      • Checking scheduler when scheduling works
      • Restarting webserver unnecessarily
      • Ignoring executor logs
      5. In a distributed Airflow setup, which component must be shared and accessible by both the scheduler and executor to coordinate task execution properly?
      hard
      A. Webserver
      B. Local task logs
      C. Metadata Database
      D. Scheduler's local cache

      Solution

      1. Step 1: Understand distributed setup needs

        In distributed Airflow, multiple executors and schedulers may run on different machines.
      2. Step 2: Identify shared resource for coordination

        The metadata database stores task states and is the central point both scheduler and executor use to coordinate which tasks to run and their status.
      3. Step 3: Exclude other options

        The webserver is for UI only, local logs are not shared, and scheduler's local cache is not accessible by executors.
      4. Final Answer:

        Metadata Database -> Option C
      5. Quick Check:

        Shared coordination = Metadata DB [OK]
      Hint: Metadata DB is central shared store in distributed Airflow [OK]
      Common Mistakes:
      • Thinking webserver shares task state
      • Assuming local logs are shared
      • Believing scheduler cache syncs executors
      Recommended

      Ready to prove it?

      Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

      10 questions~5 mineasy hard