Balanced Leader Distribution Algorithm in Kubernetes Clusters
<p>Kubernetes architecture.</p> "> Figure 2
<p>Leader-based consistency model [<a href="#B7-sensors-21-00869" class="html-bibr">7</a>].</p> "> Figure 3
<p>Example of leader record in the EP.</p> "> Figure 4
<p>Procedure of the default leader election algorithm.</p> "> Figure 5
<p>Example of leader distribution: (<b>a</b>) concentrated leaders, (<b>b</b>) balanced leaders.</p> "> Figure 6
<p>CPU use on each node when clients send write requests.</p> "> Figure 7
<p>Example of leader information in the LMEP.</p> "> Figure 8
<p>Overview procedure of the BLD algorithm.</p> "> Figure 9
<p>Detailed procedure of the BLD algorithm.</p> "> Figure 10
<p>Leader distribution among nodes in the cluster: (<b>a</b>) 3 applications; (<b>b</b>) 5 applications; (<b>c</b>) 7 applications.</p> "> Figure 11
<p>Leader election latency.</p> "> Figure 12
<p>Throughput of one application according to replica’s role and read/write operation.</p> "> Figure 13
<p>Cumulative throughput of multiple applications according to leader distribution: (<b>a</b>) Read operation. (<b>b</b>) Write operation. (<b>c</b>) Smart write operation.</p> ">
Abstract
:1. Introduction
- It facilitates the use of the leader election process, so users can easily deploy the leader election for application in the Kubernetes cluster.
- It balances the number of leaders throughout all the nodes in the cluster, so the system performance can be improved.
2. Related Work
3. Overview of Kubernetes
3.1. Kubernetes Architecture
3.2. Leader-Based Consistency Maintenance Mechanism
4. Default Leader Election Algorithm in Kubernetes
4.1. Default Leader Election Algorithm in Kubernetes
4.2. Leader Concentration Problem
5. Balanced Leader Distribution Algorithm
6. Performance Evaluation
6.1. Leader Distribution and Leader Election Latency
6.2. Effect of Leader Distribution in Kubernetes Cluster
7. Discussion
8. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Conflicts of Interest
References
- Bernstein, D. Containers and cloud: From lxc to docker to kubernetes. IEEE Cloud Comput. 2014, 1, 81–84. [Google Scholar] [CrossRef]
- Felter, W.; Ferreira, A.; Rajamony, R.; Rubio, J. An updated performance comparison of virtual machines and linux containers. In Proceedings of the 2015 IEEE international symposium on performance analysis of systems and software (ISPASS), Philadelphia, PA, USA, 29–31 March 2015; pp. 171–172. [Google Scholar]
- Soltesz, S.; Pötzl, H.; Fiuczynski, M.E.; Bavier, A.; Peterson, L. Container-based operating system virtualization: A scalable, high-performance alternative to hypervisors. In Proceedings of the 2nd ACM SIGOPS/EuroSys European Conference on Computer Systems 2007, Lisboa, Portugal, 21–23 March 2007; pp. 275–287. [Google Scholar]
- Kubernetes, Production-Grade Container Orchestration. Available online: https://kubernetes.io/ (accessed on 19 October 2020).
- Deshpande, U. Caravel: Burst tolerant scheduling for containerized stateful applications. In Proceedings of the 2019 IEEE 39th International Conference on Distributed Computing Systems (ICDCS), Dallas, TX, USA, 7–10 July 2019; pp. 1432–1442. [Google Scholar]
- Simple Leader Election with Kubernetes and Docker. Available online: https://kubernetes.io/blog/2016/01/simple-leader-election-with-kubernetes/ (accessed on 19 October 2020).
- Nguyen, N.; Kim, T. Toward Highly Scalable Load Balancing in Kubernetes Clusters. IEEE Commun. Mag. 2020, 58, 78–83. [Google Scholar] [CrossRef]
- Zhao, A.; Huang, Q.; Huang, Y.; Zou, L.; Chen, Z.; Song, J. Research on resource prediction model based on kubernetes container auto-scaling technology. In IOP Conference Series: Materials Science and Engineering; IOP Publishing: Bristol, UK, 2019; Volume 569, p. 052092. [Google Scholar]
- Nguyen, T.T.; Yeom, Y.J.; Kim, T.; Park, D.H.; Kim, S. Horizontal Pod Autoscaling in Kubernetes for Elastic Container Orchestration. Sensors 2020, 20, 4621. [Google Scholar] [CrossRef] [PubMed]
- Prometheus. Available online: https://prometheus.io/ (accessed on 19 October 2020).
- Chang, C.C.; Yang, S.R.; Yeh, E.H.; Lin, P.; Jeng, J.Y. A kubernetes-based monitoring platform for dynamic cloud resource provisioning. In Proceedings of the 2017 IEEE Global Communications Conference, Singapore, 4–8 December 2017; pp. 1–6. [Google Scholar]
- Apache JMeter. Available online: https://jmeter.apache.org/ (accessed on 19 October 2020).
- Medel, V.; Rana, O.; Bañares, J.Á.; Arronategui, U. Adaptive application scheduling under interference in kubernetes. In Proceedings of the 2016 IEEE/ACM 9th International Conference on Utility and Cloud Computing (UCC), Shanghai, China, 6–9 December 2016; pp. 426–427. [Google Scholar]
- Netto, H.V.; Lung, L.C.; Correia, M.; Luiz, A.F.; de Souza, L.M.S. State machine replication in containers managed by Kubernetes. J. Syst. Archit. 2017, 73, 53–59. [Google Scholar] [CrossRef]
- Liu, Q.; Haihong, E.; Song, M. The Design of Multi-Metric Load Balancer for Kubernetes. In Proceedings of the 2020 International Conference on Inventive Computation Technologies (ICICT), Coimbatore, India, 26–28 February 2020; pp. 1114–1117. [Google Scholar]
- Vayghan, L.A.; Saied, M.A.; Toeroe, M.; Khendek, F. Microservice Based Architecture: Towards High-Availability for Stateful Applications with Kubernetes. In Proceedings of the 2019 IEEE 19th International Conference on Software Quality, Reliability and Security (QRS), Sofia, Bulgaria, 22–26 July 2019; pp. 176–185. [Google Scholar]
- Santos, J.; Wauters, T.; Volckaert, B.; De Turck, F. Towards network-aware resource provisioning in kubernetes for fog computing applications. In Proceedings of the 2019 IEEE Conference on Network Softwarization (NetSoft), Paris, France, 24–28 June 2019; pp. 351–359. [Google Scholar]
- Santos, J.; Wauters, T.; Volckaert, B.; De Turck, F. Resource provisioning in Fog computing: From theory to practice. Sensors 2019, 19, 2238. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Nguyen, N.D.; Phan, L.A.; Park, D.H.; Kim, S.; Kim, T. ElasticFog: Elastic Resource Provisioning in Container-Based Fog Computing. IEEE Access 2020, 8, 183879–183890. [Google Scholar] [CrossRef]
- Gawel, M.; Zielinski, K. Analysis and Evaluation of Kubernetes based NFV management and orchestration. In Proceedings of the 2019 IEEE 12th International Conference on Cloud Computing (CLOUD), Milan, Italy, 8–13 July 2019; pp. 511–513. [Google Scholar]
- Vayghan, L.A.; Saied, M.A.; Toeroe, M.; Khendek, F. Deploying microservice based applications with Kubernetes: Experiments and lessons learned. In Proceedings of the 2018 IEEE 11th international conference on cloud computing (CLOUD), San Francisco, CA, USA, 2–7 July 2018; pp. 970–973. [Google Scholar]
- Lamport, L. The part-time parliament. ACM Trans. Comput. Syst. 1998, 16, 133–169. [Google Scholar] [CrossRef]
- Ongaro, D.; Ousterhout, J. In search of an understandable consensus algorithm. In Proceedings of the USENIX Annual Technical Conference, Philadelphia, PA, USA, 19–20 June 2014; pp. 305–319. [Google Scholar]
- Kim, T.; Myung, J.; Yoo, S.E. Load balancing of distributed datastore in opendaylight controller cluster. IEEE Trans. Netw. Serv. Manag. 2019, 16, 72–83. [Google Scholar] [CrossRef]
- Oliveira, C.; Lung, L.C.; Netto, H.; Rech, L. Evaluating raft in docker on kubernetes. In International Conference on Systems Science; Springer: Berlin/Heidelberg, Germany, 2016; pp. 123–130. [Google Scholar]
- Netto, H.V.; Luiz, A.F.; Correia, M.; de Oliveira Rech, L.; Oliveira, C.P. Koordinator: A service approach for replicating Docker containers in Kubernetes. In Proceedings of the 2018 IEEE Symposium on Computers and Communications (ISCC), Natal, Brazil, 25–28 June 2018; pp. 00058–00063. [Google Scholar]
- Docker. Available online: https://www.docker.com/ (accessed on 19 October 2020).
- Containerd. Available online: https://containerd.io/ (accessed on 19 October 2020).
- Deploying a Stateful Application. Available online: https://cloud.google.com/ (accessed on 19 October 2020).
- Hunt, P.; Konar, M.; Junqueira, F.P.; Reed, B. ZooKeeper: Wait-free Coordination for Internet-scale Systems. In Proceedings of the USENIX Annual Technical Conference, Boston, MA, USA, 23–25 June 2010; Volume 8. [Google Scholar]
- Consul. Available online: https://www.consul.io/ (accessed on 19 October 2020).
- Hey. Available online: https://github.com/rakyll/hey (accessed on 19 October 2020).
Algorithm | Default | BLD | ||||
---|---|---|---|---|---|---|
Number of Applications | 3 | 5 | 7 | 3 | 5 | 7 |
Std. dev. | 1.01 | 1.2 | 1.79 | 0 | 0.47 | 0.5 |
Minimum value | 0 | 0 | 0 | 1 | 1 | 2 |
Maximum value | 3 | 5 | 6 | 1 | 2 | 3 |
Algorithm | Default | BLD | ||||
---|---|---|---|---|---|---|
Number of Applications | 3 | 5 | 7 | 3 | 5 | 7 |
Mean value (ms) | 11.91 | 12.44 | 11.92 | 34.46 | 33.41 | 33.77 |
Std. dev. (ms) | 4.65 | 5.71 | 5 | 10.51 | 10.32 | 10.93 |
Minimum value (ms) | 5 | 5 | 5 | 13 | 13 | 12 |
Maximum value (ms) | 30 | 37 | 52 | 64 | 67 | 87 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
Share and Cite
Nguyen, N.D.; Kim, T. Balanced Leader Distribution Algorithm in Kubernetes Clusters. Sensors 2021, 21, 869. https://doi.org/10.3390/s21030869
Nguyen ND, Kim T. Balanced Leader Distribution Algorithm in Kubernetes Clusters. Sensors. 2021; 21(3):869. https://doi.org/10.3390/s21030869
Chicago/Turabian StyleNguyen, Nguyen Dinh, and Taehong Kim. 2021. "Balanced Leader Distribution Algorithm in Kubernetes Clusters" Sensors 21, no. 3: 869. https://doi.org/10.3390/s21030869