Journal Home > Volume 26 , Issue 3

The microservices architecture has been proposed to overcome the drawbacks of the traditional monolithic architecture. Scalability is one of the most attractive features of microservices. Scaling in the microservices architecture requires the scaling of specified services only, rather than the entire application. Scaling services can be achieved by deploying the same service multiple times on different physical machines. However, problems with load balancing may arise. Most existing solutions of microservices load balancing focus on individual tasks and ignore dependencies between these tasks. In the present paper, we propose TCLBM, a task chain-based load balancing algorithm for microservices. When an Application Programming Interface (API) request is received, TCLBM chooses target services for all tasks of this API call and achieves load balancing by evaluating the system resource usage of each service instance. TCLBM reduces the API response time by reducing data transmissions between physical machines. We use three heuristic algorithms, namely, Particle Swarm Optimization (PSO), Simulated Annealing (SA), and Genetic Algorithm (GA), to implement TCLBM, and comparison results reveal that GA performs best. Our findings show that TCLBM achieves load balancing among service instances and reduces API response times by up to 10% compared with existing methods.


menu
Abstract
Full text
Outline
About this article

TCLBM: A Task Chain-Based Load Balancing Algorithm for Microservices

Show Author's information You LiangYuqing Lan( )
School of Computer Science and Engineering, Beihang University, Beijing 100191, China.

Abstract

The microservices architecture has been proposed to overcome the drawbacks of the traditional monolithic architecture. Scalability is one of the most attractive features of microservices. Scaling in the microservices architecture requires the scaling of specified services only, rather than the entire application. Scaling services can be achieved by deploying the same service multiple times on different physical machines. However, problems with load balancing may arise. Most existing solutions of microservices load balancing focus on individual tasks and ignore dependencies between these tasks. In the present paper, we propose TCLBM, a task chain-based load balancing algorithm for microservices. When an Application Programming Interface (API) request is received, TCLBM chooses target services for all tasks of this API call and achieves load balancing by evaluating the system resource usage of each service instance. TCLBM reduces the API response time by reducing data transmissions between physical machines. We use three heuristic algorithms, namely, Particle Swarm Optimization (PSO), Simulated Annealing (SA), and Genetic Algorithm (GA), to implement TCLBM, and comparison results reveal that GA performs best. Our findings show that TCLBM achieves load balancing among service instances and reduces API response times by up to 10% compared with existing methods.

Keywords: load balancing, microservices, task chain

References(20)

[1]
A. Krylovskiy, M. Jahn, and E. Patti, Designing a smart city internet of things platform with microservice architecture, in Proc. 2015 3rd Int. Conf. Future Internet of Things and Cloud, Rome, Italy, 2015, pp. 25-30.
DOI
[2]
N. Alshuqayran, N. Ali, and R. Evans, A systematic mapping study in microservice architecture, in Proc. 2016 IEEE 9th Int. Conf. Service-Oriented Computing and Applications (SOCA), Macau, China, 2016, pp. 44-51.
DOI
[3]
S. Hassan and R. Bahsoon, Microservices and their design trade-offs: A self-adaptive roadmap, in Proc. 2016 IEEE Int. Conf. Services Computing (SCC), San Francisco, CA, USA, 2016, pp. 813-818.
DOI
[4]
C. Pahl and P. Jamshidi, Microservices: A systematic mapping study, in Proc. 6th Int. Conf. Cloud Computing and Services Science, Rome, Italy, 2016, pp. 137-146.
DOI
[5]
N. Dragoni, I. Lanese, S. T. Larsen, M. Mazzara, R. Mustafin, and L. Safina, Microservices: How to make your application scale, in Proc. Int. Andrei Ershov Memorial Conf. Perspectives of System Informatics, Moscow, Russia, 2017, pp. 95-104.
DOI
[6]
F. Montesi and J. Weber, Circuit breakers, discovery, and API gateways in microservices, arXiv preprint: 1609.05830, 2016.
[7]
W. Hasselbring and G. Steinacker, Microservice architectures for scalability, agility and reliability in e-commerce, in Proc. 2017 IEEE Int. Conf. Software Architecture Workshops (ICSAW), Gothenburg, Sweden, 2017, pp. 243-246.
DOI
[8]
C. Guerrero, I. Lera, and C. Juiz, Resource optimization of container orchestration: A case study in multi-cloud microservices-based applications, J. Supercomput., vol. 74, no. 7, pp. 2956-2983, 2018.
[9]
Y. H. Guo and W. B. Yao, A container scheduling strategy based on neighborhood division in micro service, in Proc. NOMS 2018-2018 IEEE/IFIP Network Operations and Management Symp., Taipei, China, 2018, pp. 1-6.
DOI
[10]
D. Bhamare, M. Samaka, A. Erbad, R. Jain, L. Gupta, and H. A. Chan, Multi-objective scheduling of micro-services for optimal service function chains, in Proc. 2017 IEEE Int. Conf. Communications (ICC), Paris, France, 2017, pp. 1-6.
DOI
[11]
N. H. Do, T. Van Do, X. T. Tran, L. Farkas, and C. Rotter, A scalable routing mechanism for stateful microservices, in Proc. 2017 20th Conf. Innovations in Clouds, Internet and Networks (ICIN), Paris, France, 2017, pp. 72-78.
DOI
[12]
S. Kehrer and W. Blochinger, Autogenic: Automated generation of self-configuring microservices. in Proc. 8th Int. Conf. Cloud Computing and Services Science, 2018, pp. 35-46.
DOI
[13]
C. Yi, X. G. Zhang, and W. Cao, Dynamic weight based load balancing for microservice cluster, in Proc. 2nd Int. Conf Computer Science and Application Engineering, New York, NY, USA, 2018, p. 2.
DOI
[14]
L. Bianchi, M. Dorigo, L. M. Gambardella, and W. J. Gutjahr, A survey on metaheuristics for stochastic combinatorial optimization, Nat. Comput., vol. 8, no. 2, pp. 239-287, 2009.
[15]
Y. D. Zhang, S. H. Wang, and G. L. Ji, A comprehensive survey on particle swarm optimization algorithm and its applications, Mathemat. Problems Eng., vol. 2015, p. 931256, 2015.
[16]
A. Biswas, Interpretation of residual gravity anomaly caused by simple shaped bodies using very fast simulated annealing global optimization, Geosci. Front., vol. 6, no. 6, pp. 875-893, 2015.
[17]
C. Sharma, S. Sabharwal, and R. Sibal, A survey on software testing techniques using genetic algorithm, arXiv preprint: 1411.1154, 2014.
[18]
R. N. Calheiros, R. Ranjan, A. Beloglazov, C. A. F. De Rose, and R. Buyya, Cloudsim: A toolkit for modeling and simulation of cloud computing environments and evaluation of resource provisioning algorithms, Software: Pract. Exp., vol. 41, no. 1, pp. 23-50, 2011.
[19]
Istio, Traffic management, https://istio.io/docs/concepts/traffic-management/, 2019.
[20]
GitHub, Working with load balancers, https://github.com/Netflix/ribbon/wiki/Working-with-load-balancers, 2014.
Publication history
Copyright
Rights and permissions

Publication history

Received: 17 July 2019
Accepted: 25 July 2019
Published: 12 October 2020
Issue date: June 2021

Copyright

© The author(s) 2021.

Rights and permissions

The articles published in this open access journal are distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/).

Return