Unused Microservice Detection via Network Traffic Monitoring
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In microservices-based applications, it is challenging to detect and manage obsolete microservices that are no longer in use, leading to codebase management issues and potential coding errors due to the complexity of tracking and removing unused services and their replicas.
Innovation Solution
A system and method for detecting unused microservices by monitoring network traffic through a resource allocation manager, which identifies microservices with no detected network activity and deletes them along with their sidecar proxies and replicas, facilitating codebase maintenance.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If microservices are continuously developed and separately maintained, then application flexibility and maintainability are improved, but the complexity of tracking and managing microservices increases
Solution Approach 1:
The system implements automated feedback mechanisms by monitoring network traffic between microservices and maintaining dependency graphs. This feedback loop continuously tracks which microservices are being called and identifies obsolete ones, resolving the management complexity issue while preserving the flexibility of continuous development
Solution Approach 2:
The system enables self-service automation where the platform automatically detects, identifies, and removes obsolete microservices without manual intervention. This self-service approach handles the tracking and management complexity automatically, allowing developers to focus on flexible microservice development
2Reliability
If obsolete microservices are manually tracked and removed, then codebase management is maintained, but time consumption and operational overhead increase
Solution Approach 1:
The system performs preliminary actions by continuously monitoring network traffic and maintaining updated dependency graphs in the background. This preliminary tracking ensures that when microservices become obsolete, they are already identified and ready for removal, eliminating manual tracking time while maintaining codebase reliability
Solution Approach 2:
The system automates the entire process of detecting and removing obsolete microservices without requiring manual intervention. This self-service automation maintains codebase reliability while eliminating the time consumption associated with manual tracking and removal operations
3Measurement precision
If network traffic monitoring is continuously performed to detect unused microservices, then detection accuracy is improved, but system resource consumption increases
Solution Approach 1:
The system achieves multi-functionality by using the same network traffic monitoring infrastructure for both operational purposes (ensuring microservices function correctly) and detection purposes (identifying obsolete microservices). This universal use of monitoring data improves detection accuracy without requiring additional dedicated monitoring resources
Solution Approach 2:
The system changes monitoring parameters dynamically by adjusting the intensity and frequency of traffic monitoring based on system conditions. During periods of low activity, monitoring can be reduced to conserve resources, while maintaining sufficient accuracy to detect obsolete microservices. The dependency graph maintenance also allows for optimized querying that reduces overall resource consumption
Data Source
AI summary
Systems and methods for detection and cleanup of unused microservices. An example method comprises: identifying, by a processing device, a microservice in a running state; identifying a network proxy associated with the microservice; monitoring traffic between the network proxy and the network; determining that the network proxy has no traffic with the network during a window, wherein the window is a predetermined period of time or a predetermined amount of data that is sent to or from the network; and deleting the microservice and the network proxy.


