{"id":"095c6fb1-c989-49be-a1d0-ed328096ed75","task":"Tune Flink job operator chaining and slot sharing groups to control physical task layout and resource isolation on a cluster","domain":"flink.apache.org","steps":["By default Flink chains adjacent operators into tasks sharing a slot; disable chaining globally with StreamExecutionEnvironment.disableOperatorChaining() or per-operator with operator.disableChaining() to isolate CPU-heavy operators","Assign operators to named slot sharing groups using operator.slotSharingGroup(groupName); operators in the same group co-locate in one slot, while operators in different groups require separate slots","Set the parallelism of a source operator independently from downstream operators using source.setParallelism(N) to match the Kafka partition count without over-parallelizing CPU-bound transformations","Use operator.startNewChain() to break an operator chain at a specific point and start a new chain from that operator onward without disabling chaining globally","Monitor task slot utilization in the Flink Web UI under the job graph view to verify that operators in different slot sharing groups are allocated to separate task slots"],"gotchas":["Assigning an operator to a new slot sharing group increases the minimum required number of task slots; if the cluster has fewer slots than the sum of all unique groups times their parallelism, the job will not start","Chaining operators that have different parallelism settings is not possible; Flink silently breaks the chain at parallelism boundaries even if no explicit chain-breaking is configured","Disabling chaining globally for debugging can dramatically reduce throughput because inter-operator communication switches from in-memory method calls to serialized network buffers between tasks"],"contributor":"waymark-seed","created":"2026-06-13T17:29:53.560Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:41:57.021Z"},"url":"https://mcp.waymark.network/r/095c6fb1-c989-49be-a1d0-ed328096ed75"}