Detecting Inconsistencies in Microservice-Based Systems: An Annotation-Assisted Scenario-Oriented Approach

Chang‐ai Sun, Yufei Gong, Meng Li, Luo Xu, Jun Han, Yanbo Han · IEEE Transactions on Services Computing · 2024

Microservice architecture (MSA) has been widely adopted to develop various large-scale distributed systems. Microservice-based systems (MBSs) comprise a number of independently deployed microservices fulfilling the specific functionalities. Unique characteristics of microservices, such as independent and parallel development, rapid iteration, and distributed deployment, result in low observability and reliability of MBSs. A typical solution is to regulate system behavior in specifications of MBSs, and then develop and test MBSs based on these specifications. However, current microservice specifications focus on describing the APIs of microservices without describing the behavior expectation for an MBS. In this article, we propose an annotation-assisted and scenario-oriented approach, called MSA_Sighter, to detect behavior inconsistencies in MBSs. In MSA_Sighter, the details of an MBS are captured in a description model (MSDM), which can be extracted automatically from the functional services through annotation-assisted runtime component instance analysis and static program analysis. Given a specific business scenario, inconsistency detection is conducted by analyzing the actual behavior's conformance to the expected behavior, where the former is collected through distributed tracing while the latter is derived from the MSDM. We have developed a supporting tool called ConsChecker and evaluated MSA_Sighter's effectiveness on three open-source MBSs in GitHub. The experimental results have shown that MSA_Sighter can effectively detect inconsistencies in MBSs during system development and evolution.

Read the paper · More papers on PaperTik