Beyond Stateless vs Stateful: A Unified Workloa...

Beyond Stateless vs Stateful: A Unified Workload API for Multi-Cluster Kubernetes

Most workload platforms force users to choose early: stateless or stateful. While useful labels, they are the wrong API boundary.

Workloads don't live neatly in one bucket. Each has different attributes, which are independent concerns. Some need rolling updates. Others must coordinate with a shard manager before a pod can safely move. Some need persistent volumes for source-of-truth data, while others use them as cache.

Users shouldn't need a new platform every time a dimension changes, nor should they care which cluster serves their compute needs.

This talk shares how LinkedIn built a composable, natively multi-cluster API for both stateless & stateful workloads. Users express intent once: the platform places & rebalances replicas globally. Treating pod template, update strategy, persistence and placement as independent concerns allows us to abstract cluster boundaries, enables rainbow deployments, improves global efficiency, and preserves required workload guarantees.

Ronak Nathani

November 12, 2026

Annual Pro sale · Save $30

Have presentations of your own?

Share with private links, password protection, and more control over your work.

Transcript

42 slides
  1. KUBECON  CLOUDNATIVECON NORTH AMERICA 2026 Beyond Stateless vs Stateful

    A Unified Workload API for Multi-Cluster Kubernetes Ronak Nathani Principal Staff Software Engineer, LinkedIn cluster a cluster b cluster c
  2. BACKGROUND LinkedIn runs on Kubernetes 500K+ 5M+ 3,000+ 110K+ bare-metal

    servers pods services deployments / week Beyond Stateless vs Stateful · KubeCon NA 2026 2
  3. BACKGROUND Kubernetes Offerings Stateless services Stateful services Jobs K8s-as-a-service LiDeployment

    LiStatefulSet AI training Spark CI Flink DB-as-a-service for app teams for app teams own schedulers and quotas for platform teams Beyond Stateless vs Stateful · KubeCon NA 2026 3
  4. BACKGROUND 80% of our compute runs via two CRDs 5%

    Jobs 80% Stateless + stateful services LiDeployment Beyond Stateless vs Stateful · KubeCon NA 2026 15% K8s-as-a-service LiStatefulSet share of CPU allocation 4
  5. BACKGROUND Clusters are shared, but each app lives in exactly

    one cluster a cluster b cluster c search-index feed-api profile-api web-frontend messaging-store ads-cache LiDeployment pod LiStatefulSet pod Beyond Stateless vs Stateful · KubeCon NA 2026 5
  6. CHALLENGE 1 OF 4 Moving along the spectrum means switching

    APIs STATELESS STATEFUL Web service Cache Search index Quorum database keeps nothing working set it can rebuild local data that's expensive to copy can't lose a replica until another catches up LiDeployment LiStatefulSet moving right means a migration Beyond Stateless vs Stateful · KubeCon NA 2026 6
  7. NOT JUST OUR CRDS Upstream APIs bundle updates and persistence

    too Deployment Rolling update + No PVC per pod StatefulSet Ordered updates + PVC per pod Search index wants Rolling update + PVC per pod Beyond Stateless vs Stateful · KubeCon NA 2026 neither API offers this 7
  8. CHALLENGE 2 OF 4 An app can only grow as

    big as one cluster cluster a FULL search-index can't grow here Beyond Stateless vs Stateful · KubeCon NA 2026 cluster b cluster c room to spare room to spare 8
  9. CHALLENGE 3 OF 4 Moving an app between clusters happens

    out of band cluster c cluster d out-of-band operation Beyond Stateless vs Stateful · KubeCon NA 2026 9
  10. CHALLENGE 4 OF 4 Teams want to run more than

    two versions at once TODAY stable canary 85% 15% WHAT TEAMS WANT v1 50% Beyond Stateless vs Stateful · KubeCon NA 2026 v2 30% v3 20% 10
  11. TAKING A STEP BACK What a workload is made of

    Pod spec Update strategy Persistence Placement the containers to run how pods get replaced whether data survives an update which clusters, and how many replicas in each Beyond Stateless vs Stateful · KubeCon NA 2026 11
  12. THE WORKLOAD API A composable workload API Revision Workload WorkloadPlacement

    written by the app team written by the app team written by the cluster admin Pod spec Replicas Clusters PVC templates Revision distribution Replicas per cluster Update strategy Beyond Stateless vs Stateful · KubeCon NA 2026 12
  13. THE WORKLOAD API · 1 OF 3 A Revision holds

    a complete pod spec Revision Workload kind: Revision metadata: {name: v2} spec: template: spec: containers: - name: store image: store:2.0 volumeClaimTemplates: - metadata: {name: data} spec: {storageClassName: local-host} Beyond Stateless vs Stateful · KubeCon NA 2026 WorkloadPlacement Revisions are immutable. A change is a new Revision. 13
  14. THE WORKLOAD API · 1 OF 3 It can also

    give every pod its own PVC Revision Workload kind: Revision metadata: {name: v2} spec: template: spec: containers: - name: store image: store:2.0 volumeClaimTemplates: - metadata: {name: data} spec: {storageClassName: local-host} Beyond Stateless vs Stateful · KubeCon NA 2026 WorkloadPlacement Persistence is a field, not a different API. 14
  15. THE WORKLOAD API · 2 OF 3 A Workload sets

    how many replicas to run Revision Workload kind: Workload metadata: {name: store} spec: replicas: 9 replicaDistribution: - {revision: v1, allocation: 75%} - {revision: v2, allocation: 25%} updateStrategy: rollingUpdate: maxSurge: 0 maxUnavailable: 1 podReplacementPolicy: TerminatingOrDeleted Beyond Stateless vs Stateful · KubeCon NA 2026 WorkloadPlacement The count is for the whole workload, not one cluster. 15
  16. THE WORKLOAD API · 2 OF 3 It splits those

    replicas across revisions Revision Workload kind: Workload metadata: {name: store} spec: replicas: 9 replicaDistribution: - {revision: v1, allocation: 75%} - {revision: v2, allocation: 25%} updateStrategy: rollingUpdate: maxSurge: 0 maxUnavailable: 1 podReplacementPolicy: TerminatingOrDeleted Beyond Stateless vs Stateful · KubeCon NA 2026 WorkloadPlacement Any number of revisions, each with its own share. 16
  17. THE WORKLOAD API · 2 OF 3 It also says

    how pods get updated Revision Workload WorkloadPlacement kind: Workload metadata: {name: store} spec: replicas: 9 replicaDistribution: - {revision: v1, allocation: 75%} - {revision: v2, allocation: 25%} updateStrategy: rollingUpdate: maxSurge: 0 maxUnavailable: 1 podReplacementPolicy: TerminatingOrDeleted Beyond Stateless vs Stateful · KubeCon NA 2026 17
  18. THE WORKLOAD API · 2 OF 3 It also says

    how pods get updated Revision Workload WorkloadPlacement kind: Workload metadata: {name: store} spec: replicas: 9 replicaDistribution: - {revision: v1, allocation: 75%} - {revision: v2, allocation: 25%} updateStrategy: rollingUpdate: maxSurge: 0 maxUnavailable: 1 podReplacementPolicy: Deleted Beyond Stateless vs Stateful · KubeCon NA 2026 17
  19. THE WORKLOAD API · 2 OF 3 It also says

    how pods get updated Revision kind: Workload metadata: {name: store} spec: replicas: 9 replicaDistribution: - {revision: v1, allocation: 75%} - {revision: v2, allocation: 25%} updateStrategy: coordinator: name: store-coordinator Beyond Stateless vs Stateful · KubeCon NA 2026 Workload WorkloadPlacement For stateful workloads 17
  20. THE WORKLOAD API · 3 OF 3 A WorkloadPlacement says

    which clusters run it Revision Workload kind: WorkloadPlacement metadata: name: store # same as the Workload spec: allocationStrategy: Explicit clusterPlacements: - {clusterName: a, allocation: 50%} - {clusterName: b, allocation: 30%} - {clusterName: c, allocation: 20%} Beyond Stateless vs Stateful · KubeCon NA 2026 WorkloadPlacement Cluster admins write this, not app teams. 18
  21. THE WORKLOAD API Supporting stateful workloads Workload marks a change

    admit, update, scale down, clean up Coordinator approves when it's safe for the app Workload acts same pod ID, same PVCs HOW WE RUN STATEFUL WORKLOADS ON KUBERNETES TALK · KUBECON NA 2024 BLOG · LINKEDIN ENGINEERING Cooperative Scheduling for Stateful Systems Stateful workload operator: stateful systems on Kubernetes at LinkedIn Beyond Stateless vs Stateful · KubeCon NA 2026 19
  22. COORDINATOR The coordinator contract is ordinary pod metadata OPERATION WORKLOAD

    MARKS IT WITH COORDINATOR APPROVES BY Scale up a scheduling gate removing the gate Confirm readiness a readiness gate setting the condition Update to a new revision update-pending label update-approved label Scale down scale-down-pending label delete-approved label Clean up after deletion a finalizer removing the finalizer Beyond Stateless vs Stateful · KubeCon NA 2026 20
  23. HOW IT WORKS A hub cluster stores intent and spoke

    clusters run pods Hub cluster · no application pods Revision · Workload · Placement what you wrote Payload Workload controller layout · budget · status Payload per cluster WorkloadShard + Revisions status Spoke a Spoke b Dispatcher Spoke c Dispatcher Dispatcher applies · reports applies · reports applies · reports WorkloadShard controller WorkloadShard controller WorkloadShard controller Beyond Stateless vs Stateful · KubeCon NA 2026 21
  24. DISPATCHER A generic dispatcher sends spec down and status back

    up Hub cluster Spoke cluster a spec down Payload Dispatcher clusterName: a · resource: WorkloadShard status up apply watch status WorkloadShard the applied object Beyond Stateless vs Stateful · KubeCon NA 2026 24
  25. DISPATCHER A Payload carries exactly one object Work API one

    Work, many objects Payload one Payload, one object Work Deployment Payload Deployment Service Payload Service ConfigMap Payload ConfigMap Each object has its own lifecycle, enforced by the API, not a webhook. Beyond Stateless vs Stateful · KubeCon NA 2026 25
  26. HOW IT WORKS · STEP 1 OF 6 The app

    team and a cluster admin write to the hub Hub cluster Payloads Workload Revision Workload controller WorkloadPlacement Spoke a Revision Revision → a WorkloadShard → a Revision → b WorkloadShard → b Spoke b WorkloadShard Dispatcher WorkloadShard controller Beyond Stateless vs Stateful · KubeCon NA 2026 Dispatcher Revision WorkloadShard WorkloadShard controller 26
  27. HOW IT WORKS · STEP 2 OF 6 The hub

    writes one Payload per object, per cluster Hub cluster Payloads Workload Revision Workload controller WorkloadPlacement Spoke a Revision Revision → a WorkloadShard → a Revision → b WorkloadShard → b Spoke b WorkloadShard Dispatcher WorkloadShard controller Beyond Stateless vs Stateful · KubeCon NA 2026 Dispatcher Revision WorkloadShard WorkloadShard controller 27
  28. HOW IT WORKS · STEP 3 OF 6 Dispatcher pulls

    its Payloads and applies them Hub cluster Payloads Workload Revision Workload controller WorkloadPlacement pull Spoke a Revision Revision → a WorkloadShard → a Revision → b WorkloadShard → b pull Spoke b WorkloadShard Dispatcher WorkloadShard controller Beyond Stateless vs Stateful · KubeCon NA 2026 Dispatcher Revision WorkloadShard WorkloadShard controller 28
  29. HOW IT WORKS · STEP 4 OF 6 The WorkloadShard

    controller creates the pods Hub cluster Payloads Workload Revision Workload controller WorkloadPlacement Spoke a Revision Revision → a WorkloadShard → a Revision → b WorkloadShard → b Spoke b WorkloadShard Dispatcher WorkloadShard controller Beyond Stateless vs Stateful · KubeCon NA 2026 Dispatcher Revision WorkloadShard WorkloadShard controller 29
  30. HOW IT WORKS · STEP 5 OF 6 Status flows

    back up the same way Hub cluster Payloads Workload Revision Workload controller aggregate WorkloadPlacement Revision → a WorkloadShard → a Revision → b WorkloadShard → b status Spoke a Revision status Spoke b WorkloadShard Dispatcher WorkloadShard controller Beyond Stateless vs Stateful · KubeCon NA 2026 Dispatcher Revision WorkloadShard WorkloadShard controller 30
  31. HOW IT WORKS · STEP 6 OF 6 Each controller

    is cluster local, except Dispatcher Hub cluster controllers talk to this API server only Payloads Workload Workload controller Revision WorkloadPlacement pull Spoke a Revision Revision → a WorkloadShard → a Revision → b WorkloadShard → b pull Spoke b WorkloadShard Dispatcher WorkloadShard controller controllers talk to this API server only Beyond Stateless vs Stateful · KubeCon NA 2026 Dispatcher Revision WorkloadShard WorkloadShard controller controllers talk to this API server only 31
  32. DISRUPTIONS Every spoke's evictions check one budget on the hub

    Hub cluster WorkloadDisruptionBudget disruptionsAllowed: 1 · across all clusters claim a slot Spoke a Spoke b node drain evicts a pod Eviction webhook allowed: took the slot Beyond Stateless vs Stateful · KubeCon NA 2026 node drain evicts a pod Eviction webhook denied: budget spent 32
  33. STALE STATUS Spokes heartbeat to the hub, the way kubelets

    do Hub cluster Spoke a Spoke controller · Ready pings every spoke every 60s ping Spoke a SpokeHealth Beyond Stateless vs Stateful · KubeCon NA 2026 · Unknown b's pods stop counting as available pong copies the ping back Spoke b ping Spoke b WorkloadShard controller making progress no pong SpokeHealth copies the ping back WorkloadShard controller stuck 33
  34. STABLE POD IDS Every pod gets a stable ID 0-2

    shard index one per cluster, never reused Beyond Stateless vs Stateful · KubeCon NA 2026 ordinal lowest free one in the cluster 34
  35. STABLE POD IDS Scaling fills gaps, and PVCs follow the

    ID Start 0-0 0-1 0-2 0-3 4 → 3 0-0 0-1 0-2 0-3 3 → 5 0-0 0-1 0-2 0-3 Beyond Stateless vs Stateful · KubeCon NA 2026 01 is failing 01 goes. Its PVC stays 0-4 01 mounts its old PVC 35
  36. STABLE POD IDS The stable ID is what lets a

    pod keep its PVC node-7 node-7 same ID 0-2 0-2 same PVC PVC for 0-2 PVC for 0-2 revision v1 revision v2 Beyond Stateless vs Stateful · KubeCon NA 2026 36
  37. PERSISTENCE If a pod's node is gone, it can get

    a new PVC elsewhere node-7 · 0-2 gone node-12 after 30m 0-2 new recycleAfterUnschedulable: 30m Beyond Stateless vs Stateful · KubeCon NA 2026 37
  38. PATTERNS Multiple patterns, same APIs Stateless service Cache on local

    disk Sharded store web API, model server search cache, model weights Kafka, database, vector index Revision Revision Revision Pod spec, no PVCs PVC per pod PVC per pod Workload Workload Workload Rolling update, with a canary revision Rolling update, a replacement reuses the PVC A coordinator approves each pod change WorkloadPlacement WorkloadPlacement WorkloadPlacement Any clusters Any clusters Any clusters Beyond Stateless vs Stateful · KubeCon NA 2026 38
  39. TAKEAWAYS What we learned Stateless and stateful are useful characteristics,

    but a bad API boundary Update strategy, persistence and placements are independent concerns A multi-cluster workload needs guarantees that span all clusters, not just a dispatcher with single cluster APIs Beyond Stateless vs Stateful · KubeCon NA 2026 39
  40. Thank you We're thinking about open sourcing this. If it

    would be useful to you, please reach out. Questions? ronaknathani.com linkedin.com/in/ronaknnathani RonakNathani ronaknathani.com Ronak Nathani LinkedIn

More Decks by Ronak Nathani

Other Decks in Technology