Skip to main content

KOSMOS: Vertical and Horizontal Resource Autoscaling for Kubernetes

  • Conference paper
  • First Online:
Service-Oriented Computing (ICSOC 2021)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 13121))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 109.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 139.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    https://docker.com.

  2. 2.

    https://kubernetes.io.

  3. 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. 4.

    The source of KOSMOS is available at https://github.com/deib-polimi/kosmos.

  5. 5.

    Kubernetes distinguishes between Custom Resources and Monitored Resource; herein we omit this distinction for simplicity.

  6. 6.

    An in-depth assessment of the formal guarantees provided by our control-theoretical planners is omitted for lack of space.

  7. 7.

    https://knative.dev.

References

  1. In-place update of pod resources pull request. https://github.com/kubernetes/enhancements/issues/1287

  2. Kubernetes 1.20 changelog. https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.20.md

  3. Kubernetes HPA. https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/

  4. Kubernetes logging architecture. https://kubernetes.io/docs/concepts/cluster-administration/logging/

  5. kubernetes vpa. https://github.com/kubernetes/autoscaler/tree/master/vertical-pod-autoscaler

  6. The state of enterprise open source. https://www.redhat.com/en/enterprise-open-source-report/2021

  7. Balla, D., Simon, C., Maliosz, M.: Adaptive scaling of kubernetes pods. In: 2020 IEEE/IFIP Network Operations and Management Symposium, pp. 1–5 (2020)

    Google Scholar 

  8. Baresi, L., Quattrocchi, G.: COCOS: a scalable architecture for containerized heterogeneous systems. In: IEEE International Conference on Software Architecture, pp. 103–113 (2020)

    Google Scholar 

  9. 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)

    Google Scholar 

  10. 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)

    Google Scholar 

  11. 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)

    Google Scholar 

  12. 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)

    Google Scholar 

  13. 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)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Giovanni Quattrocchi .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2021 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics