Microservice Testing via User Space Kernel Isolation
Find Innovative SolutionsGenerate 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
Engineering 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
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.
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.
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
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.
3Measurement precision
If microservices are tested with real production requests, then testing realism is improved, but the complexity of managing test environments increases
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.
Data Source
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.


