Apache Flink Fundamentals
Apache Flink is a distributed stream-processing framework that handles both real-time event streams and batch workloads. It provides exactly-once state consistency, event-time processing, and windowing for continuous data computations at scale.
itData engineering and analytics | OpenSkills.info
Intro
Apache Flink Fundamentals
Apache Flink is a distributed engine for stateful computations over bounded and unbounded data streams. You describe a dataflow. Flink runs its operators in parallel, moves records between them, manages application state, and recovers that state after failures.
The central mental model is a continuously running dataflow with durable memory.
sources -> transformations -> keyed state and time -> sinks
| |
+---- parallel tasks --+
|
periodic checkpoints
That model separates Flink from a message broker. A broker stores and transports records. Flink computes over records. It also separates Flink from a database. A database serves stored data through queries and transactions. Flink keeps computation-specific state while data moves through a dataflow.
Why stream processing exists
Many systems produce records continuously: transactions, telemetry, logs, clicks, inventory changes, and database change events. A periodic batch job waits for a boundary, reads a finite input, computes a result, and stops. That design is effective when delay is acceptable and the input has a useful boundary.
A streaming job consumes records as they arrive. It can update a result, enrich an event, detect a pattern, or trigger an action without waiting for the next batch. The harder part is not reading one record. The harder part is remembering prior records, reasoning about time, handling disorder, and recovering without corrupting the result.
Flink puts those concerns inside one processing engine. It supports three broad application families:
- continuous data pipelines that transform and move records;
- streaming and batch analytics that calculate and update results;
- event-driven applications that change state or trigger actions in response to events.
Bounded and unbounded streams
An unbounded stream has a beginning but no defined end. A job cannot wait for every record because the complete input never arrives. It must produce useful results incrementally.
A bounded stream has a defined end. Flink can process it as a finite input and finish. This is batch processing expressed through the same dataflow model.
Flink's DataStream API has streaming and batch runtime modes. Streaming mode supports continuous incremental processing and is required for unbounded jobs. Batch mode can use optimizations that depend on a known finite input. With bounded input, both modes produce the same final result when that result is interpreted correctly. Their intermediate output and execution behavior can differ.
The unified model is useful when the same logic must process live records and historical data. It does not make bounded and unbounded operation identical. Infinite input changes how you define completeness, joins, aggregation, state retention, and output updates.
A Flink application is a graph
Continue the course
This section is part of the paid course.
See pricing to subscribe, or log in if you already have access.
Where this skill leads
Relevant careers
See how this topic contributes to broader role-level skill maps.
Sources
- https://flink.apache.org/what-is-flink/flink-architecture/
Supports
- Apache Flink as a distributed engine for stateful computations over bounded and unbounded streams
- Definitions and processing implications of bounded and unbounded streams
- Deployment on standalone clusters, Kubernetes, and YARN
- Parallel execution, local state access, and exactly-once state consistency through checkpoints
- https://flink.apache.org/what-is-flink/use-cases/
Supports
- Event-driven applications, data analytics, and data pipelines as major Flink use cases
- Event-time processing, state management, and checkpoints as application mechanisms
- Continuous analytics, continuous extract-transform-load, enrichment, and external connectors
- https://nightlies.apache.org/flink/flink-docs-stable/docs/learn-flink/overview/
Supports
- Parallel dataflows, stateful processing, event time, and state snapshots as Flink fundamentals
- Stateful operations whose result depends on preceding events
- Recovery through consistent snapshots of state and source positions
- https://nightlies.apache.org/flink/flink-docs-stable/docs/concepts/overview/
Supports
- DataStream API, Table API, and SQL abstraction levels
- DataStream transformations, joins, aggregations, windows, and state
- Conversion between tables and DataStreams
- Dynamic tables and relational query abstractions
- https://nightlies.apache.org/flink/flink-docs-stable/docs/concepts/flink-architecture/
Supports
- Client, JobManager, JobMaster, TaskManager, task, subtask, and task slot responsibilities
- Operator chains, parallel execution, and data exchange
- Slot sharing and the distinction between slots and CPU cores
- Application and session cluster lifecycles
- https://nightlies.apache.org/flink/flink-docs-stable/docs/concepts/stateful-stream-processing/
Supports
- Keyed state partitioning and alignment with keyed streams
- Operator state and keyed state scopes
- Checkpoint snapshots, source positions, replay, and recovery
- State redistribution during rescaling and checkpoint consistency modes
- https://nightlies.apache.org/flink/flink-docs-stable/docs/concepts/time/
Supports
- Event time and processing time definitions and tradeoffs
- Watermarks as event-time progress signals
- Parallel watermark progress, late records, and event-time completeness
- Tumbling, sliding, session, time, and count window concepts
- https://nightlies.apache.org/flink/flink-docs-stable/docs/dev/datastream/execution_mode/
Supports
- Streaming mode for continuous unbounded jobs
- Batch mode and finite-input optimizations for bounded jobs
- Equivalent final results for bounded input with potentially different intermediate output and execution behavior
- https://nightlies.apache.org/flink/flink-docs-stable/docs/dev/table/overview/
Supports
- Table API as a relational query interface for Java and Python
- Shared runtime and semantics between Table API and Flink SQL
- Integration among Table API, SQL, and DataStream API
- Relational operations over bounded and continuous input
- https://nightlies.apache.org/flink/flink-docs-stable/docs/connectors/datastream/guarantees/
Supports
- Source participation in snapshotting for exactly-once managed-state updates
- Sink participation in checkpointing for end-to-end exactly-once delivery
- The boundary between Flink state consistency and external delivery behavior
- https://nightlies.apache.org/flink/flink-docs-stable/docs/ops/state/checkpoints_vs_savepoints/
Supports
- Checkpoints as runtime-managed recovery artifacts
- Savepoints as user-managed artifacts for planned operations
- Snapshot format, upgrade, schema evolution, rescaling, and portability limitations
- https://nightlies.apache.org/flink/flink-docs-stable/docs/deployment/overview/
Supports
- Client, JobManager, and TaskManager deployment responsibilities
- Application Mode and Session Mode isolation and resource-sharing boundaries
- Standalone, Kubernetes, and YARN deployment options
- External persistent storage for checkpoint recovery
- https://nightlies.apache.org/flink/flink-docs-stable/docs/getting-started/local_installation/
Supports
- Current local cluster start and stop commands
- Bundled streaming example submission command
- Web UI address and SQL Client command
- Supported local Java versions for the current stable distribution
- https://nightlies.apache.org/flink/flink-docs-stable/docs/ops/production_ready/
Supports
- Durable checkpoint storage, high availability, memory, and connector readiness concerns
- Monitoring, security, and upgrade planning for production deployments
- Production configuration as an explicit responsibility beyond application logic
