Apache Flink

Streamtime runs Flink on a Kubernetes fleet and keeps it monitored and up to date. Apache Flink runs in a Job Workspace (session mode): a shared cluster, sized up to Max Flink Units, that you submit jobs to. Each job claims Flink Units from it. Apache Flink does not offer a single-job cluster.

Confluent Manager for Flink keeps its single-job cluster (application mode): the cluster runs one job, from an application JAR or a registered Flink project version, and is sized in Flink Units.

Key Features

  • Open-source Apache Flink or Confluent Flink, chosen as the Provider.
  • Sized in Flink Units, with an Optimization Goal (Cost, Balanced or Performance). Streamtime derives the rest from the Flink Units: each TaskManager gets min(Flink Units, 4) slots and the cluster gets enough TaskManagers to cover them. A job runs as wide as the Flink Units it was given. These numbers are provisional. What a Flink Unit is, and what it takes from the fleet: Capacity units.
  • RocksDB state in every Job Workspace.
  • Checkpoints and savepoints on by default. On a kind or BYOK fleet they go to the fleet’s RustFS, in the flink bucket under <organization>/<cluster>, and the last 3 checkpoints are kept. A job that stops or restarts resumes from them. Deleting the cluster removes its folder. The fleet’s RustFS holds one shared credential for all clusters, so any cluster on the fleet can read another’s state. Cloud fleets have no durable store yet and keep state on the pods’ temporary disk, so Keep running state and Resume from the latest checkpoint are refused there.
  • State handling per job: Start fresh (stateless), Keep running state (savepoint) or Resume from the latest checkpoint (last-state).
  • Flink Web UI on every deployment, with metrics, logs and alerts.
  • Flink projects: CI registers each build from your own artifact store as a version, and deployments run it by version. See Flink projects.

Settings

Provider: Apache Flink or Confluent Manager for Flink.

Basic Configuration: Identifier, Description, and Max Flink Units (Job Workspace) or Flink Units (Confluent single-job cluster) with the Optimization Goal. For Apache Flink, Jobs run in: Java (the default) or Python. Python installs the image that runs PyFlink jobs and needs no project to exist first. A Python release is refused on a Java workspace, and the language cannot change once the workspace has jobs. Confluent Manager for Flink also asks for the State Backend Tier.

Fleet Selection: the fleet to run on, or let Streamtime choose one.

Advanced Configuration: the Version, to upgrade or for local testing. Confluent Manager for Flink also asks for the application JAR (or a project version), entry class and arguments, and its license. Task slots, TaskManager count, security, Web UI, savepoint and checkpoint settings are not asked for; the API still accepts them as overrides.


Before you start

  • A fleet in Healthy state with room for the Flink workload (see Fleet management).
  • For the API: an access token in STREAMTIME_TOKEN and your organization identifier in place of <org>. Replace api.example.com with your Streamtime API address.

The API examples below share this setup:

Saving a Flink resource and provisioning it are separate steps in the API: create or change it, then reconcile its new generation. The reconcile returns 202 with the operation it started; the same Idempotency-Key returns that operation again, and a 409 means the generation is out of date.



Check status

status is one of Pending, Provisioning, Updating, Healthy, Error or Deleting.


Submit and manage jobs (session mode)

A session cluster runs the jobs you submit to it. Each job claims Flink Units from the cluster’s Max Flink Units. Submitting a job starts it straight away.


Change the configuration or upgrade

Change the Flink Units, or upgrade to a new Version (advanced_configuration.chart_config.main.version). With the savepoint upgrade mode, Streamtime takes a savepoint first and resumes the job from it.


View metrics, logs and alerts


Delete

Deleting removes what Streamtime installed for it on the fleet.