Abstract
Cloud applications are increasingly executed onto lightweight containers that can be efficiently managed to cope with highly varying and unpredictable workloads. Kubernetes, the most popular container orchestrator, provides means to automatically scale containerized applications to keep their response time under control. Kubernetes provisions resources using two main components: i) Horizontal Pod Autoscaler (HPA), which controls the amount of containers running for an application, and ii) Vertical Pod Autoscaler (VPA), which oversees the resource allocation of existing containers. These two components have several limitations: they must control different metrics, they use simple threshold-based rules, and the reconfiguration of existing containers requires stopping and restarting them.
To overcome these limitations this paper presents KOSMOS, a novel autoscaling solution for Kubernetes. Containers are individually controlled by control-theoretical planners that manage container resources on-the-fly (vertical scaling). A dedicated component is in charge of handling resource contention scenarios among containers deployed in the same node (a physical or virtual machine). Finally, at the cluster-level a heuristic-based controller is in charge of the horizontal scaling of each application.
This work has been partially supported by the SISMA national research project, which has been funded by the MIUR under the PRIN 2017 program (Contract 201752ENYB) and by the European Commission grant no. 825480 (H2020), SODALITE.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
- 2.
- 3.
In some edge cases a pod can also contain multiple “main” containers. Our solution supports this case, but for simplicity are not considering herein. In the rest of the paper we will use word “container” to refer to the main container of a pod.
- 4.
The source of KOSMOS is available at https://github.com/deib-polimi/kosmos.
- 5.
Kubernetes distinguishes between Custom Resources and Monitored Resource; herein we omit this distinction for simplicity.
- 6.
An in-depth assessment of the formal guarantees provided by our control-theoretical planners is omitted for lack of space.
- 7.
References
In-place update of pod resources pull request. https://github.com/kubernetes/enhancements/issues/1287
Kubernetes 1.20 changelog. https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.20.md
Kubernetes HPA. https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/
Kubernetes logging architecture. https://kubernetes.io/docs/concepts/cluster-administration/logging/
kubernetes vpa. https://github.com/kubernetes/autoscaler/tree/master/vertical-pod-autoscaler
The state of enterprise open source. https://www.redhat.com/en/enterprise-open-source-report/2021
Balla, D., Simon, C., Maliosz, M.: Adaptive scaling of kubernetes pods. In: 2020 IEEE/IFIP Network Operations and Management Symposium, pp. 1–5 (2020)
Baresi, L., Quattrocchi, G.: COCOS: a scalable architecture for containerized heterogeneous systems. In: IEEE International Conference on Software Architecture, pp. 103–113 (2020)
Felter, W., Ferreira, A., Rajamony, R., Rubio, J.: An updated performance comparison of virtual machines and linux containers. In: 2015 IEEE International Symposium on Performance Analysis of Systems and Software (ISPASS), pp. 171–172 (2015)
Kwan, A., Wong, J., Jacobsen, H., Muthusamy, V.: Hyscale: hybrid and network scaling of dockerized microservices in cloud data centres. In: 2019 IEEE 39th International Conference on Distributed Computing Systems (ICDCS), pp. 80–90 (2019)
Rattihalli, G., Govindaraju, M., Lu, H., Tiwari, D.: Exploring potential for non-disruptive vertical auto scaling and resource estimation in kubernetes. In: 2019 IEEE 12th International Conference on Cloud Computing (CLOUD), pp. 33–40 (2019)
Seo, K.T., Hwang, H.S., Moon, I., Kwon, O., jun Kim, B.: Performance comparison analysis of linux container and virtual machine for building cloud, pp. 105–111 (2014)
Tang, X., Zhang, F., Li, X., Khan, S.U., Li, Z.: Quantifying cloud elasticity with container-based autoscaling. In: IEEE 15th International Conference on Dependable, Autonomic and Secure Computing, pp. 853–860 (2017)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2021 Springer Nature Switzerland AG
About this paper
Cite this paper
Baresi, L., Hu, D.Y.X., Quattrocchi, G., Terracciano, L. (2021). KOSMOS: Vertical and Horizontal Resource Autoscaling for Kubernetes. In: Hacid, H., Kao, O., Mecella, M., Moha, N., Paik, Hy. (eds) Service-Oriented Computing. ICSOC 2021. Lecture Notes in Computer Science(), vol 13121. Springer, Cham. https://doi.org/10.1007/978-3-030-91431-8_59
Download citation
DOI: https://doi.org/10.1007/978-3-030-91431-8_59
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-91430-1
Online ISBN: 978-3-030-91431-8
eBook Packages: Computer ScienceComputer Science (R0)