Kubernetes v1.36 Introduces Server-Side Sharded List and Watch
Kubernetes version 1.36 introduces an alpha feature known as server-side sharded list and watch, designed to address scaling challenges in large clusters with tens of thousands of nodes. Previously, horizontally scaled controllers watching high-cardinality resources like Pods faced significant inefficiencies. Each controller replica received the full event stream from the API server, incurring substantial CPU, memory, and network costs to deserialize and process data, only to discard objects not assigned to that specific replica. This approach multiplied resource consumption rather than reducing it. The new feature moves filtering logic upstream to the API server. By utilizing a new shardSelector field in ListOptions, clients specify hash ranges for fields such as object metadata UID or namespace. The API server then computes deterministic FNV-1a hashes and sends only relevant events to each replica. This optimization significantly reduces network bandwidth usage and eliminates wasted computational resources on discarded data, enabling more efficient horizontal scaling for controllers managing large-scale Kubernetes environments.
Wire timeline
Kubernetes v1.36 Introduces Server-Side Sharded List and Watch
Kubernetes version 1.36 introduces an alpha feature known as server-side sharded list and watch, designed to address scaling challenges in large clusters with tens of thousands of nodes. Previously, horizontally scaled controllers watching high-cardinality resources like Pods faced significant inefficiencies. Each controller replica received the full event stream from the API server, incurring substantial CPU, memory, and network costs to deserialize and process data, only to discard objects not assigned to that specific replica. This approach multiplied resource consumption rather than reducing it. The new feature moves filtering logic upstream to the API server. By utilizing a new shardSelector field in ListOptions, clients specify hash ranges for fields such as object metadata UID or namespace. The API server then computes deterministic FNV-1a hashes and sends only relevant events to each replica. This optimization significantly reduces network bandwidth usage and eliminates wasted computational resources on discarded data, enabling more efficient horizontal scaling for controllers managing large-scale Kubernetes environments.
Kubernetes Blog