Microservice Agent for Java Reflection Metrics

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Traditional application performance management (APM) solutions are not well suited for microservice frameworks due to resource constraints, as they often incur additional overhead that is incompatible with the smaller and more dynamic runtimes used in microservices, making it challenging to monitor and optimize performance effectively.

Innovation Solution

A lightweight agent is introduced that detects and instruments Java reflection invocations in microservices to capture metrics and optimize their performance, using MethodHandles for faster execution and controlling reflection inflation to manage resource consumption, while providing metrics to a user interface.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If traditional APM solutions are used to monitor microservices, then performance data can be captured, but the additional overhead is incompatible with resource constraints in microservice frameworks

Engineering Contradiction:
Improveperformance data captureVSAvoidresource overhead
Core Design Contradiction:
Measurement precisionVSUse of energy by moving object

Solution Approach 1:

The APM functionality is segmented into a separate agent component that runs independently from the microservice runtime. This agent intercepts and captures performance data without being tightly coupled to the microservice execution environment, thereby reducing overhead while maintaining measurement capabilities.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

An intermediary agent is introduced between the monitoring system and the microservice runtime. This agent acts as a mediator that captures performance metrics through interception techniques rather than direct instrumentation, reducing the burden on the microservice framework while enabling comprehensive performance monitoring.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Measurement precision

If instrumentation code is inserted into applications to capture performance data, then performance monitoring is enabled, but the complexity increases and is not compatible with dynamic microservice runtimes

Engineering Contradiction:
Improveperformance data captureVSAvoidinstrumentation complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The instrumentation complexity is extracted from the microservice application code and relocated to a separate agent. This agent handles all instrumentation logic externally, allowing the microservice runtime to remain simple and dynamic while still enabling comprehensive performance capture through the external agent's interception capabilities.

Inventive Principle:
Principle #2Taking out (Extraction)

3Productivity

If microservices use smaller and more dynamic runtimes, then resource efficiency improves, but traditional APM solutions become incompatible due to overhead

Engineering Contradiction:
Improveresource efficiencyVSAvoidAPM compatibility
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The monitoring agent is designed to be dynamic and adaptable to different microservice runtime environments. It can dynamically attach to and detach from microservice processes, adjusting its behavior based on the specific runtime characteristics, thereby maintaining compatibility across diverse microservice architectures without compromising resource efficiency.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS11349909B2Microservice manager and optimizer
Publication Date: 2022.05.31 CISCO TECHNOLOGY INC
  • US11349909B2 patent drawing
  • US11349909B2 patent drawing
  • US11349909B2 patent drawing

AI summary

In one embodiment, an agent executed by a device detects an invocation that is made using Java reflection of a method associated with a microservice. The agent instruments the invocation of the method associated with the microservice, to capture one or more metrics regarding the microservice. The agent optimizes the invocation of the method associated with the microservice. The agent provides the one or more metrics regarding the microservice to a user interface.