<a id="flink-billing"></a>

<a id="flink-sql-billing"></a>

# Confluent Cloud for Apache Flink Billing

To run Apache Flink® SQL, you create a [compute pool](../../flink/concepts/compute-pools.md#flink-sql-compute-pools)
and run [statements](../../flink/concepts/statements.md#flink-sql-statements) within it. Confluent
charges you for the [CFUs](#flink-sql-cfus) your statements consume
while they run, not for the size of the pool: the pool scales elastically to
meet demand, so your cost depends on actual CFU usage per minute, not
provisioned capacity. With this serverless architecture, you’re charged only
for the minutes when your statements are running.

You can configure the maximum size of a compute pool to limit your spending.

<a id="flink-sql-cfus"></a>

## CFUs

A CFU is a logical unit of processing power that Confluent Cloud for Apache Flink uses to measure
the resources it consumes. Each Flink statement consumes a minimum of
1 CFU-minute but can consume more depending on the needs of the workload.

<a id="flink-sql-billing-cfu"></a>

## CFU billing

Confluent measures the total number of CFUs you consume in a compute pool
every minute. Usage is reported in CFU-hours so that hourly pricing applies to
your minute-by-minute consumption. Prices vary by
[cloud region](overview.md#cloud-billing-regional-multiplier).

For current CFU prices, see the [Confluent Cloud pricing page](https://www.confluent.io/pricing/).

## Networking fees

Using Flink to read and write data from Apache Kafka® doesn’t add any new
Flink-specific networking fees, but you’re still responsible for the Confluent Cloud
networking rates for data that you read from and write to your Kafka clusters.
These are existing Kafka costs, not new charges that Flink creates.

## Cost management

You can’t define the number of CFUs an individual statement requires.
Confluent Cloud for Apache Flink counts CFUs for you. You can configure the maximum size of a
compute pool to limit your spending by setting a parameter named
`MAX_CFU`, which sets an upper limit on the hourly spend on the compute
pool. If the size of the workload in a pool exceeds `MAX_CFU`, Confluent Cloud for Apache Flink
rejects new statements. Existing workloads continue running but can
experience increased latency.

#### NOTE
You can increase the `MAX_CFU` value after you create a compute pool,
but you can’t decrease the initial `MAX_CFU` value. For more
information, see [Update a compute pool](../../flink/operate-and-deploy/create-compute-pool.md#flink-sql-manage-compute-pool-update).

You can set a minimum CFU limit for an individual statement with a
[Baseline CFU](../../flink/concepts/autopilot.md#flink-sql-baseline-cfu). A statement with a Baseline CFU
is billed for at least that many CFUs even when it’s idle. You’re billed for the
minimum plus any usage that exceeds it. Setting a Baseline CFU can increase the
number of CFUs you’re billed for. For more information, see
[Set a Baseline CFU for a Flink SQL Statement](../../flink/how-to-guides/manage-baseline-cfu.md#flink-sql-manage-baseline-cfu).

For worked pricing examples covering interactive queries and multiple
concurrent streaming statements, see [Flink SQL](../billing-examples.md#flink-sql-billing-examples).

## Related content

- [Compute Pools](../../flink/concepts/compute-pools.md#flink-sql-compute-pools)
- [Billing Examples](../billing-examples.md#billing-examples)
- [FAQ for Confluent Cloud Billing](../billing-faq.md#billing-faq)
- [Confluent Cloud Pricing](https://www.confluent.io/pricing/)
