Container Log Data Caching via Message Queue

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In a highly concurrent Docker container environment, log data storage is incomplete due to resource contention, leading to potential data loss and storage issues during peak log data generation.

Innovation Solution

A log data collection method that involves acquiring log data from containers, caching it in a message queue component, and then using a data stream migration component to transmit it to a distributed file system for storage, thereby avoiding direct file storage and mitigating resource contention.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If log data is directly stored in a file system during high concurrency, then storage speed may be fast, but resource contention causes incomplete storage and data loss

Engineering Contradiction:
Improvelog data storage speedVSAvoidlog data storage completeness
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent introduces a message queue as an intermediary component between log data generation and storage. The message queue decouples the high-speed log generation from the file system storage, acting as a buffer that absorbs resource contention. Log data is first published to the message queue by the container, then consumed and stored by the file system at its own pace, eliminating direct contention while ensuring complete storage.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Quantity of substance

If multiple containers generate log data simultaneously, then log data collection coverage is improved, but resource contention increases causing storage failures

Engineering Contradiction:
Improvelog data collection volumeVSAvoidlog data storage reliability
Core Design Contradiction:
Quantity of substanceVSReliability

Solution Approach 1:

The message queue serves as a centralized intermediary that handles log data from multiple containers simultaneously. Each container publishes its log data to the message queue independently without interfering with others. The file system consumes data from the message queue at a controlled rate, ensuring that increased log volume from multiple containers does not translate to increased contention or storage failures.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Reliability

If log data is cached in a message queue before storage, then resource contention is reduced, but system complexity increases

Engineering Contradiction:
Improvelog data storage completenessVSAvoidlog data collection system complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The message queue component performs multiple functions within a single system element: it acts as a buffer to manage data flow, a queue to organize log data from multiple sources, and a decoupling mechanism between production and consumption. This multi-functionality reduces the need for additional separate components, thereby limiting the increase in system complexity while achieving reliable log data storage.

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

Data Source

PatentUS11755452B2Log data collection method based on log data generated by container in application container environment, log data collection device, storage medium, and log data collection system
Publication Date: 2023.09.12 BOE TECHNOLOGY GROUP CO LTD
  • US11755452B2 patent drawing
  • US11755452B2 patent drawing
  • US11755452B2 patent drawing

AI summary

A log data collection method, a log data collection device, a storage medium, and a log data collection system are provided. The log data collection method includes: acquiring log data generated by at least one container in an application container environment; transmitting the log data to a log cache unit for cache; and allowing a log collection unit to collect the log data cached in the log cache unit and transmit the log data to a log storage unit for storage.