Kubernetes 1.31 如何透過 consistent read 來提升整體效能
https://kubernetes.io/blog/2024/08/15/consistent-read-from-cache-beta/
Kubernetes 於 2024/08/13 釋出了 1.31 版本,其中一個進入到 Beta 階段的功能就是 consistent read。
這個功能對 Kubernetes 的使用者來說無感,但是對於 Kubernetes 的叢集管理人員來說則是一大福音,該功能改善了 Kubelet 與 API Server 存取的流程。
過往的 Kubelet 都會對 API Server 詢問所有 K8s 上的 Pod 資訊並且過濾到跟自己節點有關的 Pod,而理想狀況應該是只要詢問跟該節點有關的 Pod 就好。
為了達到這個理想機制, Kubernetes 內部針對 Cache 的部分進行調整與改善,引入了 etcd 的一些功能最終達成如標題所述的 consistent read 的功能,
根據官方測試,引入這個功能帶來了
1. 降低 etcd 的負擔與壓力 (25%)
2. 透過快取提升了 pod LIST 相關操作的存取速度 (提升3倍)
3. API Server 的 CPU 使用率下降 30%
Kubernetes
Kubernetes v1.31: Accelerating Cluster Performance with Consistent Reads from Cache
Kubernetes is renowned for its robust orchestration of containerized applications, but as clusters grow, the demands on the control plane can become a bottleneck. A key challenge has been ensuring strongly consistent reads from the etcd datastore, requiring…
September 2, 2024 747 1