Both [Workflows](https://docs.cloud.google.com/workflows/docs/overview) and
[Managed Service for Apache Airflow](https://docs.cloud.google.com/composer/docs/concepts/overview) can be used for service
orchestration to combine services to implement application functionality or
perform data processing. Although they are conceptually similar, each is
designed for a different set of use cases. This page helps you choose the right
product for your use case.

## Key differences

The core difference between Workflows and Managed Airflow
is what type of architecture each product is designed to support.

**Workflows** orchestrates multiple HTTP-based services into a
durable and stateful workflow. It has low latency and can handle a high number
of executions. It's also completely serverless.

Workflows is great for chaining microservices together,
automating infrastructure tasks like starting or stopping a VM, and integrating
with external systems. Workflows connectors also support simple
sequences of operations in Google Cloud services such as Cloud Storage
and BigQuery.

**Managed Airflow** is designed to orchestrate data driven workflows
(particularly ETL/ELT). It's built on the Apache Airflow project, but
Managed Airflow is fully managed. Managed Airflow supports your
pipelines wherever they are, including on-premises or across multiple cloud
platforms. All logic in Managed Airflow, including tasks and scheduling,
is expressed in Python as Directed Acyclic Graph (DAG) definition files.

Managed Airflow is best for batch workloads that can handle a few
seconds of latency between task executions. You can use Managed Airflow
to orchestrate services in your data pipelines, such as triggering a job in
BigQuery or starting a Dataflow pipeline. You can use
pre-existing operators to communicate with various services, and there are over
150 operators for Google Cloud alone.

## Detailed feature comparison

| Feature | Workflows | Managed Airflow |
|---|---|---|
| Syntax | Workflows syntax in YAML or JSON format | Python |
| State model | Imperative flow control | Declarative [DAG with automatic dependency resolution](https://airflow.apache.org/docs/apache-airflow/stable/concepts/dags.html#dags) |
| Integrations | [HTTP requests](https://docs.cloud.google.com/workflows/docs/http-requests) and [connectors](https://docs.cloud.google.com/workflows/docs/connectors) | Airflow [Operators](https://docs.cloud.google.com/composer/docs/how-to/using/writing-dags#operators) and [Sensors](https://airflow.apache.org/docs/apache-airflow/stable/concepts/sensors.html) |
| Passing data between steps | [512 KB for variables](https://docs.cloud.google.com/workflows/quotas#resource_limits) | 48 KB^[1](https://docs.cloud.google.com/workflows/docs/choose-orchestration#fn1)^ for [XCom](https://airflow.apache.org/docs/apache-airflow/stable/concepts/xcoms.html) |
| Execution triggers and scheduling | gcloud CLI, Google Cloud console, Workflows API, Workflows client libraries, Cloud Scheduler | [Cron-like schedules](https://docs.cloud.google.com/composer/docs/triggering-dags#trigger_a_dag_on_a_schedule) in the DAG definition file, Airflow Sensors |
| Asynchronous patterns | - Polling - [Callbacks](https://docs.cloud.google.com/workflows/docs/creating-callback-endpoints) - Waiting for long-running Google Cloud operations | Polling |
| Parallel execution | Either concurrent executions of the same workflow or within a workflow using [parallel steps](https://docs.cloud.google.com/workflows/docs/execute-parallel-steps) | Automatic based on dependencies |
| Execution latency | Milliseconds | Seconds |
| Based on open source | No | Yes (Apache Airflow) |
| Scaling model | Serverless (scales up to demand and down to zero) | Provisioned |
| Billing model | [Usage-based (per step executed)](https://docs.cloud.google.com/workflows/pricing) | [Based on provisioned capacity](https://docs.cloud.google.com/composer/pricing) |
| Data processing features | No | [Backfills](https://airflow.apache.org/docs/apache-airflow/stable/dag-run.html#backfill), ability to [re-run DAGs](https://airflow.apache.org/docs/apache-airflow/stable/dag-run.html#re-run-dag) |

*** ** * ** ***

1. [Source code for airflow.models.xcom](https://airflow.apache.org/docs/apache-airflow/stable/_modules/airflow/models/xcom.html).
   *Apache Airflow documentation* . August 2, 2021. [↩](https://docs.cloud.google.com/workflows/docs/choose-orchestration#fnref1)