Skip to main content
Aiven for Apache Flink is a fully managed service for distributed, stateful stream processing. Process and analyze streaming data in real-time using standard SQL, with built-in integrations to Kafka and PostgreSQL.

Overview

Apache Flink is the leading open-source stream processing framework for building real-time data pipelines and streaming applications. Aiven for Apache Flink provides a managed platform with a built-in SQL editor, making it easy to develop, test, and deploy streaming applications without managing infrastructure.

SQL-Based Development

Write streaming applications using standard SQL with a built-in editor in Aiven Console

Stateful Processing

Maintain state across stream events for complex event processing and aggregations

Built-in Kafka Integration

Native integration with Aiven for Apache Kafka for seamless data flow

Exactly-Once Semantics

Guarantee data accuracy with exactly-once processing semantics

Key Features

Preview data without creating sink tables:
  • Test transformations quickly
  • Debug streaming logic
  • Explore data schemas
  • Validate joins and aggregations
Apache Kafka Connector:
  • Auto-complete for Kafka topics
  • Multiple formats: JSON, Avro, Confluent Avro, Debezium CDC
  • Upsert Kafka for changelog streams
  • Schema Registry integration
PostgreSQL Connector:
  • Read from PostgreSQL tables
  • Write results back to PostgreSQL
  • Auto-complete for databases and tables
  • Support for JDBC connections
OpenSearch Connector:
  • Sink streaming results to OpenSearch
  • Full-text search integration
  • Dynamic index creation
Guarantee data accuracy:
  • Checkpointing for fault tolerance
  • Automatic state recovery
  • Transactional sinks
  • No data loss or duplication

Getting Started

1

Create Flink Service

Deploy an Apache Flink service:
Service creation may be limited based on your subscription. Check with Aiven support for access.
2

Create Integration with Kafka

Connect Flink to your Kafka service:
This enables Flink to read from and write to Kafka topics.
3

Create a Flink Application

Use the Aiven Console wizard to:
  1. Create source tables from Kafka topics
  2. Write transformation SQL
  3. Create sink tables for results
  4. Deploy the application
4

Test with Interactive Queries

Run queries directly in the SQL editor to test before deploying.

Stream Processing Patterns

Window Types

Fixed-size, non-overlapping windows:
Overlapping windows:
Dynamic windows based on inactivity:

Table Formats and Connectors

Kafka Table Formats

Cluster Management

  • Scale up: Increase CPU and memory per TaskManager
  • Scale out: Add more nodes to the cluster
  • Configure task slots per TaskManager
  • Adjust parallelism for jobs
Adjusting task slots requires a cluster restart.
Automatic fault tolerance:
  • Periodic checkpoints to object storage
  • State recovery on failure
  • Exactly-once guarantees
  • Configurable checkpoint interval
Checkpoints are automatically configured for your cluster.
Multiple jobs on same cluster:
  • Share cluster resources
  • Deploy multiple applications
  • Maximize resource utilization
  • Isolated job execution

Monitoring and Operations

Key Metrics

Job Metrics

  • Records processed per second
  • Job uptime and restarts
  • Checkpoint duration
  • Backpressure indicators

Resource Usage

  • TaskManager CPU/memory
  • JobManager status
  • Network I/O
  • State size

Integration with Observability

Use Cases

  • Live dashboards
  • Streaming aggregations
  • Metric computation
  • KPI monitoring

Best Practices

  • Use proper key partitioning
  • Implement state TTL for growing state
  • Monitor state size
  • Use RocksDB for large state
  • Define watermarks for event-time processing
  • Account for late events
  • Balance latency vs completeness
  • Use allowed lateness for critical data
  • Tune checkpoint intervals
  • Adjust parallelism appropriately
  • Use proper join strategies
  • Monitor backpressure

Apache Kafka

Stream processing on Kafka data

PostgreSQL

Enrich streams with PostgreSQL data

OpenSearch

Sink processed results to OpenSearch

ClickHouse

Load streaming results to ClickHouse

Resources

SQL-Based Development: No Java or Scala knowledge required. Build streaming applications entirely with SQL using the Aiven Console.