Microservice Synchronization Using Shared Readiness Entries
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Microservice-based computing applications face challenges in coordinating the simultaneous update of multiple microservices, such as switching to a new TLS certificate, to prevent downtime during the update process.
Innovation Solution
A synchronizer process that monitors 'ready-to-proceed' entries written by each microservice to a shared database, determining when all microservices are ready, and sets a synchronized time for all microservices to initiate the task.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If microservices are updated independently without coordination, then each microservice can be updated flexibly and quickly, but the application experiences downtime during the update process
Solution Approach 1:
The synchronizer process performs preliminary actions by monitoring readiness-to-proceed entries from all microservices before initiating the coordinated update. Each microservice writes its readiness status to a shared database entry, and the synchronizer waits until all microservices indicate readiness before proceeding with the simultaneous update, thus preventing downtime while maintaining update speed
Solution Approach 2:
The system implements feedback through the synchronizer process that continuously monitors the shared database for readiness-to-proceed entries from all microservices. This feedback mechanism allows the system to detect when all microservices are ready and coordinate the update timing accordingly, ensuring both high availability and efficient updates
2Reliability
If microservices are synchronized to update simultaneously, then application availability is maintained, but coordination complexity increases
Solution Approach 1:
The synchronizer process acts as an intermediary between microservices and the update mechanism. It monitors readiness-to-proceed entries in a shared database and coordinates the simultaneous update by setting a time-at-which-to-proceed value, simplifying the coordination complexity while maintaining application availability
Solution Approach 2:
The synchronization logic is extracted into a separate synchronizer process that operates independently from the individual microservices. This extraction reduces the complexity within each microservice by centralizing the coordination function in a dedicated component that monitors and manages the synchronized update process
Data Source
AI summary
An example embodiment may include one or more of writing, by a computing resource, an entry to a database, the entry comprising an identifier of the computing resource, an identifier of a cluster with which the computing resource is associated, and a count of computing resources associated with that cluster, monitoring the entry, detecting, based on the monitoring, that the entry includes a time-at-which-to-proceed value, and proceeding with a first task based on the time-at-which-to-proceed.


