Leader Election Algorithm for Pods in Kubernetes cluster
Container-based virtualization is rapidly becoming the standard method for building and deploying applications due to its ease of use and convenience. A well-known open-source project, Kubernetes, provides an orchestration platform for containerized application management. Applications can be scaled within Kubernetes using numerous replicas to guarantee high availability and scalability. Stateless applications do not require persistent storage, but stateful ones preserve data consistency among clones. These systems usually rely on a leader to oversee consistency and assign duties to replicas, which leaves the leader with a significant workload. Having different application leaders converge on one Kubernetes cluster node might cause bottlenecks in the system. This study presents a leader election technique that attempts to distribute leaders evenly among cluster nodes to relieve the bottleneck problem. We offer experimental results that show the efficiency and correctness of our suggested approach compared to Kubernetes' default leader election algorithm and reassure the audience about its performance. At each node in the Kubernetes cluster, our suggested leader election process maintains a registry of available leaders for different applications. When selecting a new leader, nodes arrange to share the work equitably, considering resource consumption and network latency factors. Because of its decentralized leadership role allocation, the cluster provides a more equitable task distribution, lowering exposure to system risk and increasing overall adaptability. Because of the substantial reduction in system risk brought about by this decentralized leadership role distribution, the audience is more confident in the security of our methodology. Moreover, Real-time adjustment characteristics of the technique enable the system to respond promptly to workload and cluster condition changes. Long-scaled testing and analysis confirm not only the effectiveness of our approach in resolving bottlenecks but also in seamless integration into existing Kubernetes infrastructures, providing a practical solution for managing stateful applications at scale.
Institutions
- Vignan's Foundation for Science, Technology & Research (IN)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2024-12-13
- DOI
- https://doi.org/10.5281/zenodo.14548700
- Primary Topic
- Cloud Computing and Resource Management
- Type
- article
- Field-Weighted Citation Impact
- 0.00