Master-Slave Switchover via Synchronization Time Monitoring

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing data disaster tolerance solutions, such as master-master replication, face challenges in ensuring data consistency and usability due to the need for strict device distinction in the service layer, leading to potential primary key conflicts and complex implementation.

Innovation Solution

A data disaster tolerance method that monitors each node in a logic set, selects a slave node with the closest synchronization time point as a target node, and switches services to this node when the master node fails, ensuring data consistency and simplifying the implementation by avoiding the need for strict device distinction.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If master-master replication is used to enable automatic failover, then reliability is improved, but device complexity increases due to the need for strict device distinction in the service layer

Engineering Contradiction:
Improveautomatic failover capabilityVSAvoidservice layer complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent segments the system into a service layer and a data layer, allowing the service layer to treat all nodes uniformly while the data layer handles master-slave relationships. This segmentation resolves the contradiction by enabling automatic failover through master-master replication without requiring the service layer to implement complex device distinction logic.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces an intermediary mechanism (the unified node access interface) that abstracts the underlying master-slave relationships from the service layer. This intermediary allows automatic failover to occur at the data layer while presenting a simple, uniform interface to the service layer, thereby resolving the contradiction between reliability and device complexity.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If master-master replication is implemented to achieve automatic switchover, then productivity is improved, but manufacturing precision deteriorates due to potential primary key conflicts

Engineering Contradiction:
Improveswitchover speedVSAvoiddata consistency
Core Design Contradiction:
ProductivityVSManufacturing precision

Solution Approach 1:

The patent applies local quality by allowing different nodes to have different roles (master or slave) dynamically assigned at the data layer, while the service layer maintains uniform access to all nodes. This enables rapid switchover by changing node roles without affecting service logic, while data consistency is maintained through controlled replication relationships at the local data layer.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The patent uses parameter changes by dynamically adjusting the master-slave relationship parameters at the data layer without changing the service layer configuration. When failover is needed, the system changes the operational parameters of nodes (promoting a slave to master) while maintaining data consistency through synchronized parameter updates across the replication group.

Inventive Principle:
Principle #35Parameter changes

3Device complexity

If manual switchover is used in master-slave replication, then device complexity is reduced, but reliability deteriorates due to delayed failover response

Engineering Contradiction:
Improvesystem simplicityVSAvoidfailover timeliness
Core Design Contradiction:
Device complexityVSReliability

Solution Approach 1:

The patent implements self-service by enabling the system to automatically detect master node failures and perform switchover without manual intervention. The service layer maintains simplicity by not implementing complex detection logic, while the data layer automatically monitors node health and executes failover, thereby achieving both reliability and simplicity.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent incorporates feedback mechanisms at the data layer where nodes continuously report their status to the replication management system. This feedback loop enables automatic detection of master node failures and triggers timely switchover to a slave node, achieving reliable automatic failover while keeping the service layer simple and unchanged.

Inventive Principle:
Principle #23Feedback

Data Source

PatentEP3493471B1Data disaster recovery method, apparatus and system
Publication Date: 2020.07.29 TENCENT TECHNOLOGY (SHENZHEN) CO LTD
  • EP3493471B1 patent drawingFigure 1a
  • EP3493471B1 patent drawingFigure 1b~1c
  • EP3493471B1 patent drawingFigure 2a

AI summary

The embodiments of the present application disclose a data disaster tolerance method, device and system. The method comprising: monitoring each node of multiple nodes in a logic set, the multiple nodes comprising a master node and a plurality of slave nodes; acquiring log information of a slave node when it is monitored that the master node is abnormal, the log information of the slave node comprising a time point when data is synchronized between the slave node and the master node; selecting a slave node having the time point closest to current time from the plurality of slave nodes as a target node; and updating the master node to be the target node. Thus, master-slave switchover is realized.