Skip to main content
Version: 2.14

Deployment Modes

The Deployment mode controls whether your Apache Flink® application is executed in application mode or session mode.

Application vs. Session Mode

The main difference between application and session mode is the level of resource isolation between Deployments.

  • ** Application Mode** Your Deployment will be executed in a separate Flink cluster. The lifecycle of the Flink cluster is tied to the lifecycle of the Deployment.

  • Session Mode Your Deployment will be executed in a Flink Session Cluster that may be shared with other Deployments. The lifecycle of the Flink cluster is independent of the Deployment lifecycle.

In general, sharing a Flink cluster across multiple Deployments is more resource-efficient, but can result in competition for CPU and memory between running Flink jobs and correlation of Flink job failures. Please consult the official Apache Flink® configuration for more details on the difference between application mode and session mode.

Configuration

In order to execute a Deployment in application mode, please provide a reference to a Deployment Target.

kind: Deployment
spec:
deploymentTargetName: default

If preferred, you can reference Deployment Targets via their ID instead of their name by using the deploymentTargetId attribute.

In application mode, the Deployment API specifies both the Flink cluster-level configuration as well as the Flink job-specific configuration.