A framework for microservices synchronization. (13th August 2020) - De Iasio, Antonio; Zimeo, Eugenio
Summary: Microservices architecture and continuous software engineering are becoming popular approaches for developing and operating software products. The enabling feature of this success is the independence of the execution environments hosting microservices: by insulating failures and versioning in specific microservices, a complex application benefits of high availability at runtime and agility at development time. However, execution independence does not mean functional independence. Microservices need to interact among them to fulfill a common goal of an application. The unavailability of a microservice may seriously impact other dependent microservices, limiting continuity. To address this new kind of problem in microservices architecture, we argue the necessity of a synchronization mechanism able to support microservices coordination according to their running states: dependent microservices should wait for unready ones to avoid useless and faulty interactions. In this article, we propose a new framework, Synchronizer, able to support synchronization among microservices by exploiting distributed registries for collecting health/state information about deployed containers and hosted microservices. It has been implemented for the OpenShift platform and validated in different use cases: for example, for coordinating applications bootstrap and for programming scripts of continuous deployment orchestrators, such as Jenkins. In both cases, Synchronizer worked as expected and showed the positive effects of synchronization, giving us a valuable feedback about the possibility of further extending its application and of integrating the feature in existing microservices frameworks (eg, services mesh).