With the maturity of web services, containers, and cloud computing technologies, large services in traditional systems (e.g. the computation services of machine learning and artificial intelligence) are gradually being broken down into many microservices to increase service reusability and flexibility. Therefore, this study proposes an efficiency analysis framework based on queuing models to analyze the efficiency difference of breaking down traditional large services into n microservices. For generalization, this study considers different service time distributions (e.g. exponential distribution of service time and fixed service time) and explores the system efficiency in the worst-case and best-case scenarios through queuing models (i.e. M/M/1 queuing model and M/D/1 queuing model). In each experiment, it was shown that the total time required for the original large service was higher than that required for breaking it down into multiple microservices, so breaking it down into multiple microservices can improve system efficiency. It can also be observed that in the best-case scenario, the improvement effect becomes more significant with an increase in arrival rate. However, in the worst-case scenario, only slight improvement was achieved. This study found that breaking down into multiple microservices can effectively improve system efficiency and proved that when the computation time of the large service is evenly distributed among multiple microservices, the best improvement effect can be achieved. Therefore, this study's findings can serve as a reference guide for future development of microservice architecture.
翻译:随着Web服务、容器和云计算技术的成熟,传统系统中的大型服务(例如机器学习和人工智能的计算服务)正逐步分解为多个微服务,以提升服务的可复用性和灵活性。为此,本研究提出一种基于排队模型的效率分析框架,用以分析将传统大型服务分解为n个微服务时的效率差异。为增强普适性,本研究考虑了不同的服务时间分布(如服务时间服从指数分布和固定服务时间),并通过排队模型(即M/M/1排队模型和M/D/1排队模型)探索最差与最优场景下的系统效率。每项实验均表明,原始大型服务所需的总时间高于将其分解为多个微服务的时间,因此分解为多个微服务可提升系统效率。同时可观察到,在最优场景下,随着到达率的增加,改进效果愈发显著;但在最差场景下,仅能实现微小的改进。本研究发现,分解为多个微服务能有效提升系统效率,并证明当大型服务的计算时间均匀分配给多个微服务时,可获得最佳改进效果。因此,本研究的发现可为未来微服务架构的开发提供参考指南。