Container Image Recovery via Health-Based Stable Version Selection

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current auto-recovery mechanisms for container-based applications are inefficient when the container image is corrupt or defective, as they rely on recreating containers using the same image, which can lead to failures and infinite loops, especially in cases where the server is stuck handling new connections.

Innovation Solution

A method and system that determine the health of a container, identify the most recent stable version of its image, and deploy a new container using this stable image, while updating the deployment specification with a RestoreToStable flag to prevent undesired looping and ensure the container is refreshed with a reliable image.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If a new container is created to replace a terminated container using the same image version, then the auto-recovery mechanism can restore the container, but if the image itself is corrupt or defective, the recovery will fail and create an infinite loop

Engineering Contradiction:
Improvecontainer recovery reliabilityVSAvoidrecovery efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The system performs preliminary actions by identifying and locking the RestoreToStable flag in the deployment specification before deploying a new container. This flag prevents the system from attempting to use the same potentially corrupt image version again, breaking the infinite loop cycle before it can recur. The flag is set based on the container health determination, ensuring that recovery actions are taken in advance with knowledge of the image's stability status.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system implements feedback by determining the health of the container and using this information to decide whether to set the RestoreToStable flag. The health determination feeds into the deployment decision-making process, allowing the system to adapt its recovery strategy based on the actual state of the container and image, thereby avoiding repeated failures from corrupt images.

Inventive Principle:
Principle #23Feedback

2Reliability

If the container image has defective code, then recreating the container using the same image version will eventually fail, but without a mechanism to detect and prevent this, the system continues to deploy failed containers

Engineering Contradiction:
Improvedeployment stabilityVSAvoiddowntime
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system performs preliminary health determination and flag locking before deployment, preventing the deployment of containers based on potentially defective images. By checking container health and setting the RestoreToStable flag in advance, the system avoids the time loss associated with deploying and then failing containers multiple times.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system provides self-service by automatically determining container health, identifying stable image versions, and managing the deployment process without external intervention. The automatic health checking and flag management enable the system to recover from defective images autonomously, reducing both downtime and manual intervention requirements.

Inventive Principle:
Principle #25Self-service

3Reliability

If a web server is stuck in an infinite loop and unable to handle new connections, then the server process is still running but not functioning, and standard auto-recovery cannot detect this state

Engineering Contradiction:
Improveservice availabilityVSAvoidcontainer health detection
Core Design Contradiction:
ReliabilityVSDifficulty of detecting and measuring

Solution Approach 1:

The system implements health determination feedback that can detect non-functional states such as infinite loops. By continuously assessing container health and using this feedback to trigger recovery actions, the system can identify when a server is stuck and initiate appropriate recovery measures, even though the process appears to be running.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The system replaces traditional mechanical restart mechanisms with a smarter health-based determination system. Instead of simply restarting containers on termination, the system uses health assessment to detect subtle failures like infinite loops and applies appropriate recovery strategies, substituting blind mechanical recovery with intelligent health-based recovery.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Data Source

PatentUS11204840B2Efficient container based application recovery
Publication Date: 2021.12.21 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US11204840B2 patent drawing
  • US11204840B2 patent drawing
  • US11204840B2 patent drawing

AI summary

Stabilizing a container-based application includes determining a health of a container. Based on the container health, a most recent stable version of an image for the container is identified. A container image is considered stable if containers spawned from the image have a relatively high MTTF and relatively low MTTR compared to other versions of same image. The container is then deployed using the most recent stable version of the image for the container.