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.
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
In application mode, the Deployment API specifies both the Flink cluster-level configuration as well as the Flink job-specific configuration.
In order to execute a Deployment in session mode, please provide a reference to a Session Cluster.
kind: Deployment spec: sessionClusterName: default
In session mode, the Deployment API only specifies the Flink job-specific configuration. Flink cluster-level configuration happens in the SessionCluster API. Therefore, some sections of the Deployment API must be omitted when deploying against a Session Cluster.