Proxy Server Node Crash Recovery via Slave Persistence

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In a master-slave system, when both the master node and all its corresponding slave nodes crash, the cache data is lost, leading to unavailability of data read and write services.

Innovation Solution

A method and apparatus where the target slave node, configured with a persistence mechanism, generates a persistent file based on cache data, allowing for the deployment of a new target master node and slave node, enabling recovery of cache data and restoring the system to a functional state.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If a master-slave system is used for cache database, then data read and write services are provided with high availability, but when both master node and all slave nodes crash, cache data is lost and services become unavailable

Engineering Contradiction:
Improveavailability of master-slave systemVSAvoidcache data loss
Core Design Contradiction:
ReliabilityVSLoss of information

Solution Approach 1:

The slave node performs preliminary persistence of cache data to a persistent file before any crash occurs. This persistent file serves as a pre-prepared recovery mechanism that allows the system to restore cache data after a complete node failure, preventing data loss while maintaining high availability during normal operation.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

A persistent file acts as an intermediary between the volatile cache data and the recovery process. This intermediary stores a copy of cache data in a persistent format, enabling recovery without requiring the original master or slave nodes to be intact, thus resolving the contradiction between availability and data preservation.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If persistence mechanism is configured on target master node, then cache data can be recovered after crash, but system performance is compromised

Engineering Contradiction:
Improvecache data recovery capabilityVSAvoidsystem performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The persistence mechanism is extracted from the master node and placed solely on the slave node. This extraction allows the master node to maintain high performance without persistence overhead, while the slave node handles the persistence burden. The master node can recover through the slave node's persistent file, maintaining reliability without compromising productivity.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

Different nodes are assigned different qualities: the master node is optimized for performance with no persistence mechanism, while the slave node is configured with persistence capability. This local differentiation allows each node to excel at its specific function without the performance penalty of universal persistence configuration.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS11249860B2Node down recovery method and apparatus, electronic device, and storage medium
Publication Date: 2022.02.15 BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
  • US11249860B2 patent drawing
  • US11249860B2 patent drawing
  • US11249860B2 patent drawing

AI summary

A method and apparatus for recovery from node crash, an electronic device, and a storage medium are provided. The method is applicable to a proxy server in a master-slave system. The master-slave system further includes a target master node controlled by the proxy server and a target slave node corresponding to the target master node. If the target master node and the target slave node crash, the proxy server obtains a pre-stored persistent file from the target slave node. The target slave node stores a backup of cache data cached in the target master node, and the persistent file is generated based on cache data in the target slave node. A target master node that does not crash is deployed based on the persistent file; and a target slave node corresponding to the target master node that does not crash is deployed. In this solution, after the target master node and the target slave node both crash, the master-slave system can be recovered to a normal working state.