Skip to main content

A Machine Learning Approach to Service Discovery for Microservice Architectures

  • Conference paper
  • First Online:
Software Architecture (ECSA 2021)

Abstract

Service discovery mechanisms have continuously evolved during the last years to support the effective and efficient service composition in large-scale microservice applications. Still, the dynamic nature of services (and of their contexts) are being rarely taken into account for maximizing the desired quality of service. This paper proposes using machine learning techniques, as part of the service discovery process, to select microservice instances in a given context, maximize QoS, and take into account the continuous changes in the execution environment. Both deep neural networks and reinforcement learning techniques are used. Experimental results show how the proposed approach outperforms traditional service discovery mechanisms.

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 79.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 99.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.

    We use interchangeably the terms interface and type to denote the functionality of a service s.

  2. 2.

    https://github.com/karthikv1392/ML-SD.

References

  1. Abdullah, M., Iqbal, W., Erradi, A.: Unsupervised learning approach for web application auto-decomposition into microservices. J. Syst. Softw. 151, 243–257 (2019)

    Article  Google Scholar 

  2. Andersson, J., Heberle, A., Kirchner, J., Lowe, W.: Service level achievements - distributed knowledge for optimal service selection. In: 2011 IEEE Ninth European Conference on Web Services, pp. 125–132 (2011)

    Google Scholar 

  3. Caporuscio, M., Grassi, V., Marzolla, M., Mirandola, R.: GoPrime: a fully decentralized middleware for utility-aware service assembly. IEEE Trans. Softw. Eng. 42(2), 136–152 (2016)

    Article  Google Scholar 

  4. Chang, H., Kodialam, M., Lakshman, T., Mukherjee, S.: Microservice fingerprinting and classification using machine learning. In: 2019 IEEE 27th International Conference on Network Protocols (ICNP), pp. 1–11 (2019)

    Google Scholar 

  5. Chatfield, C.: Time-Series Forecasting. Chapman and Hall/CRC, London (2000)

    Book  Google Scholar 

  6. D’Angelo, M., Caporuscio, M., Grassi, V., Mirandola, R.: Decentralized learning for self-adaptive QoS-aware service assembly. Future Gener. Comput. Syst. 108, 210–227 (2020)

    Article  Google Scholar 

  7. Di Francesco, P., Malavolta, I., Lago, P.: Research on architecting microservices: trends, focus, and potential for industrial adoption. In: 2017 IEEE International Conference on Software Architecture (ICSA), pp. 21–30 (2017)

    Google Scholar 

  8. Graves, A.: Supervised sequence labelling. In: Supervised Sequence Labelling with Recurrent Neural Networks. Studies in Computational Intelligence, vol. 385. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-24797-2_2

  9. Hester, T., et al.: Deep q-learning from demonstrations. In: AAAI (2018)

    Google Scholar 

  10. Hochreiter, S., Bengio, Y., Frasconi, P., Schmidhuber, J., et al.: Gradient flow in recurrent nets: the difficulty of learning long-term dependencies (2001)

    Google Scholar 

  11. Hochreiter, S., Schmidhuber, J.: Long short-term memory. Neural Comput. 9(8), 1735–1780 (1997)

    Article  Google Scholar 

  12. Houmani, Z., Balouek-Thomert, D., Caron, E., Parashar, M.: Enhancing microservices architectures using data-driven service discovery and QoS guarantees. In: 20th International Symposium on Cluster, Cloud and Internet Computing (2020)

    Google Scholar 

  13. Khaleq, A.A., Ra, I.: Intelligent autoscaling of microservices in the cloud for real-time applications. IEEE Access 9, 35464–35476 (2021)

    Article  Google Scholar 

  14. Kingma, D.P., Ba, J.: Adam: a method for stochastic optimization. arXiv preprint arXiv:1412.6980 (2014)

  15. Lv, J., Wei, M., Yu, Y.: A container scheduling strategy based on machine learning in microservice architecture. In: 2019 IEEE International Conference on Services Computing (SCC), pp. 65–71 (2019)

    Google Scholar 

  16. Mokhtar, S.B., Preuveneers, D., Georgantas, N., Issarny, V., Berbers, Y.: EASY: efficient semantic service discovery in pervasive computing environments with QoS and context support. J. Syst. Softw. 81, 785–808 (2008)

    Article  Google Scholar 

  17. Muccini, H., Vaidhyanathan, K.: PIE-ML: a machine learning-driven proactive approach for architecting self-adaptive energy efficient IoT systems. Tech. rep., University of L’Aquila, Italy (2020). https://tinyurl.com/y98weaat

  18. Nayak, R., Tong, C.: Applications of data mining in web services. In: Zhou, X., Su, S., Papazoglou, M.P., Orlowska, M.E., Jeffery, K. (eds.) WISE 2004. LNCS, vol. 3306, pp. 199–205. Springer, Heidelberg (2004). https://doi.org/10.1007/978-3-540-30480-7_22

    Chapter  Google Scholar 

  19. Richardson, C.: Microservices Patterns. Manning, New York (2018)

    Google Scholar 

  20. Siami-Namini, S., Tavakoli, N., Namin, A.S.: A comparison of ARIMA and LSTM in forecasting time series. In: 2018 17th IEEE International Conference on Machine Learning and Applications (ICMLA), pp. 1394–1401. IEEE (2018)

    Google Scholar 

  21. Stevenson, G., Ye, J., Dobson, S., Pianini, D., Montagna, S., Viroli, M.: Combining self-organisation, context-awareness and semantic reasoning: the case of resource discovery in opportunistic networks. In: Proceedings of the 28th Annual ACM Symposium on Applied Computing, SAC 2013, pp. 1369–1376 (2013)

    Google Scholar 

  22. Tsymbal, A.: The problem of concept drift: definitions and related work. Comput. Sci. Dep. Trinity Coll. Dublin 106(2), 58 (2004)

    Google Scholar 

  23. W3C: OWL-S: Semantic Markup for Web Services (2004)

    Google Scholar 

  24. Watkins, C.J., Dayan, P.: Q-learning. Mach. Learn. 8(3–4), 279–292 (1992)

    MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Mauro Caporuscio .

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

Caporuscio, M., De Toma, M., Muccini, H., Vaidhyanathan, K. (2021). A Machine Learning Approach to Service Discovery for Microservice Architectures. In: Biffl, S., Navarro, E., Löwe, W., Sirjani, M., Mirandola, R., Weyns, D. (eds) Software Architecture. ECSA 2021. Lecture Notes in Computer Science(), vol 12857. Springer, Cham. https://doi.org/10.1007/978-3-030-86044-8_5

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-86044-8_5

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-86043-1

  • Online ISBN: 978-3-030-86044-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics