Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

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 during the use of Redis service, communication may not be established correctly due to network signals or Redis itself, and the business data being executed will be lost question

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

Embodiment 1

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

[0023] S1: Add the failed Redis business to the fault-tolerant pending queue as a fault-tolerant task;

[0024] S2: Obtain fault-tolerant pending tasks from the fault-tolerant pending queue and determine whether there are fault-tolerant pending tasks. If there are fault-tolerant pending tasks, re-execute the Redis business, and add 1 to the number of times the Redis business is repeatedly executed (the Redis business The initial value of the number of repeated execution times is 0), continue to execute step S3; if there is no fault-tolerant pending task, execute step S4;

[0025] S3: Determine whether the r...

Embodiment 2

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

Embodiment 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 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 Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products