Quick fault-tolerant processing method for data-writing Redis failure

A technology of data writing and processing methods, applied in the field of fault-tolerant processing, which can solve problems such as business data loss and incorrect communication establishment, and achieve the effects of solving data loss, ensuring fluency, and being convenient and simple to use

Inactive Publication Date: 2017-11-07
上海哎媲媲网络技术有限公司
View PDF5 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] The purpose of the present invention is to provide a fast fault-tolerant processing method for the failure of data writing into Redis, to solve the problem that durin

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Quick fault-tolerant processing method for data-writing Redis failure

Examples

Experimental program
Comparison scheme
Effect test

Example Embodiment

[0021] Example 1:

[0022] A fast fault-tolerant processing method for failure of data writing to Redis, such as figure 1 As shown, including: business start, execute Redis business, determine whether the Redis business is executed successfully, if the execution is successful, save to the Redis server cluster, if the Redis business execution fails, execute the following steps:

[0023] S1: Add the failed Redis service as a fault-tolerant task to the queue for fault-tolerant processing;

[0024] S2: Obtain the fault-tolerant to-be-processed task from the fault-tolerant to-be-processed queue and determine whether there is a fault-tolerant to-be-processed task. If there is a fault-tolerant to-be-processed task, re-execute the Redis business, and the number of repeated executions of the Redis business is increased by 1 (the Redis business The initial value of the number of repeated executions is 0), continue to execute step S3; if there is no fault-tolerant pending task, execute step S4...

Example Embodiment

[0030] Example 2:

[0031] In order to ensure the order of the added and processed fault-tolerant tasks, on the basis of Embodiment 1, the fault-tolerant pending processing queue is a self-defined synchronization linked list.

Example Embodiment

[0032] Example 3:

[0033] In order to ensure the global unified processing of fault-tolerant tasks, on the basis of Embodiment 1 or Embodiment 2, the fault-tolerant pending processing queue is implemented by using a database.

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a quick fault-tolerant processing method for data-writing Redis failure. The method includes S1, adding a Redis service failed in play as a fault-tolerant task to a fault-tolerant to-be-processed queue; S2, acquiring a fault-tolerant to-be-processed task from the fault-tolerant to-be-processed queue, replaying the Redis service if the fault-tolerant to-be-processed task exists, adding one time in replaying the Redis service, continuously performing the S3, and performing the S4 if the fault-tolerant to-be-processed task does not exist; S3, judging whether replaying of the Redis service in the S2 is successful or not, if yes, storing the Redis service to a Redis server cluster, skipping to the S2 for continuous performance, and if not, adding the Redis service to the fault-tolerant to-be-processed queue and skipping to the S2 for continuous performance; S4, closing the Redis service. The task failed in processing is retried continuously till processed successfully, the problem about data loss caused by interruption of network connection or Redis service is effectively solved, and smoothness in service performance is guaranteed.

Description

technical field [0001] The invention relates to a fault-tolerant processing method, in particular to a fast fault-tolerant processing method for failure of data writing into Redis. Background technique [0002] Redis is currently the most commonly used cache data storage system. Compared with cache storage systems such as Memcached, Redis not only supports publish / subscribe, master-slave and other deployment methods; it also supports more data types, and each data type provides Rich operating instructions. Redis middleware provides unified interface access services for other business systems. Master-slave and sentinel integrated service management can increase server fault tolerance under disasters, but because the service is provided through the network, communication may not be established correctly during use due to network signals or Redis itself. At this time, In-progress business data will be lost. Contents of the invention [0003] The purpose of the present inve...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F11/14
CPCG06F11/1489
Inventor 胡勇夏仁吉李红
Owner 上海哎媲媲网络技术有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products