Cost Aware Resource Sizing and Scaling of Microservices
Preyashi Agarwal, J. Lakshmi · 2019
Microservices are small, independent, loosely coupled components which provide flexibility, agility, and scalability to an application. While these are aimed for scalability, achieving it needs judicious trade-offs between size, number and cost of provisioning. In this architecture, sizing in both homogeneous and heterogeneous resources plays a key role to balance application performance and resource requirement, as workload demand varies. This paper provides insights where the importance of considering workload characterization to decide a homogeneous or heterogeneous scaling strategy for a microservice is discussed. The work exploits the correlation of workload characterization, predicted workload demand and selection of right-sized microservice to minimize resource costs. Size of microservice is referred with respect to the amount of resources allocated to the microservice. This work also evaluates trade-offs between considering the entire predicted workload demand for resource cost optimization against algorithmic computational complexity and designs a heuristic to reduce such complexity. Evaluation of results demonstrate two important outcomes. Firstly, workload characterization helps to choose between homogeneous or heterogeneous sizing for different microservices. And secondly, by considering workload demand prediction beyond the current scheduling interval, allows to make scaling decision in the current cycle keeping in view whether the demand is going to increase or decrease. The paper also details on how to use the insights of application characterization and workload trend for choosing an appropriate scaling strategy.