Request coordination method and device based on Zookeeper, computer device and storage medium

A coordination method and technology for writing requests, applied in transmission systems, electrical components, etc., can solve the problems of limiting ZooKeeper scalability and fault tolerance, low processing efficiency, waste of resources, etc., to improve horizontal scalability and fault tolerance, avoid Low efficiency and load balancing effect

Active Publication Date: 2019-06-28
中国移动通信集团重庆有限公司 +1
View PDF6 Cites 6 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] The ZooKeeper technology in the related art has the following defects: on the one hand, the election of the leader node (Leader) of ZooKeeper is based on the message delivery consensus algorithm (paxos algorithm), and the paxos algorithm obtains the majority of Server supported by a certain service node (Server). Therefore, the process is a repeated recursive process, so that the number of Servers participating in the election cannot be too many. At the same time, the total number of Servers must be an odd number 2n+1, and the number of surviving Servers must not be less than n+1, which limits the scalability and fault tolerance of ZooKeeper
Or only select m servers from n servers to run the ZooKeeper service to ensure that the data of the ZooKeeper service will not be migrated when the entire cluster is restarted or more than half of the servers where the ZooKeeper service is located are down, but in this case, there will be n-m servers. In the standby state, the processing capacity of the entire server cluster is only all m / n, resulting in waste of resources
Or choose the node with the smallest number as the Leader node every time, but this situation does not consider the load of the node and achieve load balancing
[0004] On the other hand, the read and write access of the client has two modes: write-master and write-arbitrary. In the write-master mode, the modification of the data by the client is submitted to the Leader, and all write requests submitted to the follower (Follower) client It needs to be transferred from Follower to Leader for processing, and the processing efficiency is not high; when writing any mode, the modification of data by the client can be submitted to any Server node, and there is a risk of data consistency and deadlock

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
  • Request coordination method and device based on Zookeeper, computer device and storage medium
  • Request coordination method and device based on Zookeeper, computer device and storage medium
  • Request coordination method and device based on Zookeeper, computer device and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0035] The characteristics and exemplary embodiments of various aspects of the present invention will be described in detail below. In order to make the purpose, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described here are only configured to explain the present invention, not to limit the present invention. It will be apparent to one skilled in the art that the present invention may be practiced without some of these specific details. The following description of the embodiments is only to provide a better understanding of the present invention by showing examples of the present invention.

[0036]It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation,...

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 request coordination method and device based on a Zookeeper, a computer device and a storage medium. The request coordination method based on the Zookeeper comprises the following steps: receiving a write request of a client; mapping all the service nodes in the Zookeeper cluster to a node ring; calculating the distance between every two adjacent nodes on the node ring through the agent node, and obtaining a leader node according to the distance; and querying the routing table through the agent node, and submitting the write request to the leader node for processing.According to the embodiment of the invention, the requirement on the number of servers in the existing Leader election of the ZooKeeper cluster is made up, and the transverse expansion capability andfault tolerance of the ZooKeper cluster are improved. And the proxy node is introduced to inquire the routing table to quickly route the client request, so that the problem of low efficiency caused bya main writing mode of the existing client or the problem of data consistency caused by writing in any mode are avoided.

Description

technical field [0001] The invention belongs to the technical field of distributed system clusters, and in particular relates to a Zookeeper-based request coordination method, a Zookeeper-based request coordination device, computer equipment and a computer storage medium. Background technique [0002] ZooKeeper is a software that provides consistent services for distributed applications. Distributed applications can implement functions such as configuration management, name service, distributed locks, cluster management, and queue management based on it. [0003] The ZooKeeper technology in the related art has the following defects: on the one hand, the election of the leader node (Leader) of ZooKeeper is based on the message delivery consensus algorithm (paxos algorithm), and the paxos algorithm obtains the majority of Server supported by a certain service node (Server). Therefore, the process is a repeated recursive process, so that the number of Servers participating in t...

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
Patent Type & Authority Applications(China)
IPC IPC(8): H04L29/08
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