Microservice Testing via User Space Kernel Isolation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Testing microservices in production environments is challenging due to the lack of a universally accepted best practice, with pre-deployment testing being limited and in-production testing posing risks to users and resources.

Innovation Solution

A regression testing system that isolates the microservice under test from production resources by loading a Domain-Specific Language (DSL) program within a user space kernel of the host operating system, allowing deterministic and reproducible testing using production requests without modifying the microservice code.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If microservices are tested in the production environment, then testing reliability and realism are improved, but risks to users and production resources increase

Engineering Contradiction:
Improvetesting reliabilityVSAvoidrisks to users and resources
Core Design Contradiction:
ReliabilityVSObject-affected harmful factors

Solution Approach 1:

The patent introduces a user space kernel as an intermediary layer between the production environment and the microservice under test. This kernel captures and replays production requests in an isolated testing environment, enabling realistic testing without direct exposure of production resources to potential test failures or security vulnerabilities.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The system segments the testing process into distinct phases: capturing production requests in the user space kernel, storing them separately, and then replaying them in an isolated testing environment. This segmentation allows the production environment to remain stable while enabling comprehensive testing of updated microservices.

Inventive Principle:
Principle #1Segmentation

2Object-affected harmful factors

If pre-deployment testing is performed with synthetic test code, then risks to production are reduced, but testing realism and accuracy deteriorate

Engineering Contradiction:
Improverisks to productionVSAvoidtesting accuracy
Core Design Contradiction:
Object-affected harmful factorsVSMeasurement precision

Solution Approach 1:

The patent creates accurate copies of production requests by capturing them in the user space kernel during normal production operation. These captured requests are then replayed against updated microservices in an isolated testing environment, providing realistic testing data without requiring synthetic test code or exposing production systems to test risks.

Inventive Principle:
Principle #26Copying

3Measurement precision

If microservices are tested with real production requests, then testing realism is improved, but the complexity of managing test environments increases

Engineering Contradiction:
Improvetesting realismVSAvoidtest environment complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The user space kernel serves multiple functions: it captures production requests during normal operation, stores them for later replay, and provides an isolated environment for testing updated microservices. This multi-functional approach simplifies the overall test environment complexity while maintaining high testing realism.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS11175902B2Testing an upgrade to a microservice in a production environment
Publication Date: 2021.11.16 HEWLETT PACKARD ENTERPRISE DEV LP
  • US11175902B2 patent drawing
  • US11175902B2 patent drawing
  • US11175902B2 patent drawing

AI summary

Embodiments described herein are generally directed to testing an upgrade to a microservice in a production environment. According to an example, a first domain specific language (DSL) program is loaded into a kernel that wraps a container of a production environment of a container orchestration system hosting a known working version of the microservice. Production interactions with the microservice are intercepted by the first DSL program and state information associated with the production interactions is persisted. A second DSL program is loaded into a kernel that wraps a container of the production environment hosting the upgraded microservice. The upgraded microservice is isolated from the production environment by using the persisted state information as a source of data for all requests issued by the upgraded microservice. Outputs of the upgraded microservice and the known working version of the microservice are compared by replaying the production interactions to the upgraded microservice.