# Assessing Database Contribution via Distributed Tracing for Microservice Systems
###### Abstract  
Microservice architecture is the latest trend in software systems development and transformation. In microservice systems, databases are deployed in corresponding services. To better optimize runtime deployment and improve system stability, system administrators need to know the contributions of databases in the system. For the high dynamism and complexity of microservice systems, distributed tracing can be introduced to observe the behavior of business scenarios on databases. However, it is challenging to evaluate the database contribution by combining the importance weight of business scenarios with their behaviors on databases. To solve this problem, we propose a business-scenario-oriented database contribution assessment approach (DBCAMS) via distributed tracing, which consists of three steps: (1) determining the importance weight of business scenarios in microservice system by analytic hierarchy process (AHP); (2) reproducing business scenarios and aggregating the same operations on the same database via distributed tracing; (3) calculating database contribution by formalizing the task as a nonlinear programming problem based on the defined operators and solving it. To the best of our knowledge, our work is the first research to study this issue. The results of a series of experiments on two open-source benchmark microservice systems show the effectiveness and rationality of our proposed method. microservice system; database contribution assessment; distributed tracing; scenario-oriented approach; nonlinear programming +
Footnote †: journal: Applied Sciences  
obtain the support information of the databases for business scenarios by analyzing the log sequence similar to monolithic applications [8; 9]. However, in the process of running and maintaining a microservice system, the support information of databases is important for operation engineers and developers. We define the support of databases to the business scenarios as the contribution of databases, and the task of this paper is to study how to assess the contributions of business-related databases to upper-level business scenarios in microservice systems. As far as we know, there is little previous research on assessing database contribution in microservice systems, but it is meaningful and valuable to study this issue from the perspective of runtime deployment optimization and system stability. Specifically, for example, in the scene where the resources of cluster are relatively sufficient, appropriately increasing the number of instances of services where the databases with high contribution are located can reduce the average response time of businesses to a certain extent [10]. In addition, it can perform multiservice hot standby operations on services hosted by databases with high contribution to improve the stability of the entire application [11]. In order to evaluate the contributions of databases to business scenarios in the microservice system, for the dynamic and complex features of the microservice system mentioned above, distributed tracing [12] can be introduced to observe the invocations between the services, which include behavior information on the database (tables). At the same time, business scenarios in a system always have different importance weight [13] (for example, for an online shopping store, purchasing goods is more important than viewing historical orders). The challenge of this study is determining how to consider both the importance weight of business scenarios and their operations on databases in assessing database contribution. In this paper, we propose a business-scenario-oriented database contribution assessment approach via distributed tracing for microservice systems. First, the importance weight of the main business scenarios of the microservice system is determined by the analytic hierarchy process (AHP) [14]. Second, we reproduce the business scenarios of the system.