CN110198269B - Route synchronization system, method and related device for distributed cluster - Google Patents
Route synchronization system, method and related device for distributed cluster Download PDFInfo
- Publication number
- CN110198269B CN110198269B CN201810290404.7A CN201810290404A CN110198269B CN 110198269 B CN110198269 B CN 110198269B CN 201810290404 A CN201810290404 A CN 201810290404A CN 110198269 B CN110198269 B CN 110198269B
- Authority
- CN
- China
- Prior art keywords
- storage node
- routing table
- client
- routing
- updating
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/02—Topology update or discovery
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/54—Organization of routing tables
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L7/00—Arrangements for synchronising receiver with transmitter
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the application discloses a system, a method and a related device for route synchronization of a distributed cluster, belonging to the field of route synchronization of distributed systems. In the system: the central control node is responsible for maintaining the routing information, pushes the routing information to the storage node after the routing is updated, and when the client accesses the storage node, the storage node forwards the routing information to update the routing of the client. Thus, in the embodiment of the application, the central control node does not need to perform route synchronization for each client, but is forwarded by the storage node, so that the load of the central control node can be reduced. In addition, the routing information is updated when the client accesses the storage node, and the on-demand synchronization can be realized.
Description
Technical Field
The embodiment of the application relates to the technical field of route synchronization, in particular to a route synchronization system, a route synchronization method and a related device of a distributed cluster.
Background
Distributed storage systems typically include: the system comprises a central control node (master), a storage node (chunk) and an access node (access). The central control node is responsible for cluster control, maintenance of routing information, storage node negative data storage, and the access node provides user access. The client module (client) typically accesses the storage system through an access node. So when the route changes, the central control node synchronizes the route directly to the access node.
However, the scheme is only suitable for access architecture with limited access nodes, such as layer 3 access architecture of client- > access- > chunk. If the number of access nodes is too large, or each client is a client (access) -chunk 2-layer architecture of the access, the master can push routing information for the excessive clients (access), so that the problem of too high load of the master is caused, and the normal work of the distributed cluster is influenced.
Disclosure of Invention
In order to solve the problem that a master pushes routing information for too many clients (accesses), which causes too high load, the embodiments of the present application provide a routing synchronization system, a routing synchronization method, and a related device for a distributed cluster. The technical scheme is as follows:
according to a first aspect of the embodiments of the present application, there is provided a routing synchronization system for a distributed cluster, including:
the central control node stores a routing table containing version identification, maintains the routing table, and sends an updating instruction after the routing table is updated, wherein the updating instruction comprises the updated version identification and the updating information of the content of the routing table;
the storage node stores the copy of the routing table, receives the updating instruction sent by the central control node and updates the routing table stored by the storage node according to the version identification and the updating information in the updating instruction; when an access request from a client is received and the version identification in the access request is confirmed to be lower than the version identification of a routing table stored in the client, routing table updating information is sent to the client.
According to a second aspect of the embodiments of the present application, there is provided a method for route synchronization of a distributed cluster, applied to a storage node, including:
receiving an updating instruction sent by a central control node; the updating instruction comprises updated version identification and updating information used for updating the content of the routing table; updating a routing table stored in the routing table according to the version identification and the updating information in the updating instruction; and the number of the first and second groups,
and receiving an access request sent by a client, and sending routing table updating information to the client when confirming that the version identification in the access request is lower than the version identification of a routing table stored in the client.
According to a third aspect of the embodiments of the present application, a method for route synchronization of a distributed cluster is provided, which is applied to a client, and includes:
sending an access request to a storage node, wherein the access request comprises a version identifier of a routing table stored by the client;
receiving routing table updating information sent by the storage node;
and updating the routing table stored by the routing table according to the routing table updating information.
According to a fourth aspect of the embodiments of the present application, a method for route synchronization of a distributed cluster is provided, which is applied to a central control node, and includes:
updating a routing table containing the version identification;
and sending an updating instruction to the storage node after the routing table is updated, wherein the updating instruction comprises updated version identification and updating information of the content of the routing table.
Another embodiment of the present application further provides a routing synchronization apparatus for a distributed cluster, configured to execute a routing synchronization method for any distributed cluster in the embodiment of the present application.
Another embodiment of the present application further provides a computing device, which includes a memory and a processor, where the memory is configured to store program instructions, and the processor is configured to call the program instructions stored in the memory, and execute a route synchronization method of any distributed cluster in the embodiments of the present application according to the obtained program instructions.
Another embodiment of the present application further provides a computer storage medium, where the computer storage medium stores computer-executable instructions, and the computer-executable instructions are configured to cause a computer to execute a route synchronization method of any one of the distributed clusters in the embodiments of the present application.
In the embodiment of the application, the central control node is responsible for maintaining the routing information and pushes the routing information to the storage node after the routing is updated. When the client accesses the storage node, the storage node forwards the routing information to update the routing of the client. Thus, in the embodiment of the application, the central control node does not need to perform route synchronization for each client, but is forwarded by the storage node, so that the load of the central control node can be reduced. In addition, the routing information is updated when the client accesses the storage node, and the on-demand synchronization can be realized.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a block diagram illustrating one of the methods for route synchronization for a distributed cluster according to one embodiment of the present application;
FIG. 2 is a flowchart illustrating a method for route synchronization of a distributed cluster according to an embodiment of the present application;
FIG. 3 illustrates an architecture diagram of a route synchronization system for a distributed cluster provided by an embodiment of the present application;
fig. 4 is a flowchart illustrating a second method for route synchronization of a distributed cluster according to an embodiment of the present application;
fig. 5 is a third flowchart illustrating a method for route synchronization of a distributed cluster according to an embodiment of the present application;
FIG. 6 is a flow chart of a method for route synchronization of a distributed cluster according to an embodiment of the present application;
fig. 7 is a schematic diagram illustrating a route synchronization apparatus for a distributed cluster according to an embodiment of the present application;
fig. 8 is a second schematic diagram of a route synchronization apparatus for a distributed cluster according to an embodiment of the present application;
fig. 9 is a third schematic diagram illustrating a route synchronization apparatus for a distributed cluster according to an embodiment of the present application;
FIG. 10 is a schematic diagram of a server according to an embodiment of the present application;
fig. 11 shows a schematic structural diagram of a terminal according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
Reference herein to "a plurality" means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
In the embodiment of the present application, the routing table refers to a routing information table stored in a router or other internet network device, where paths to a specific network terminal and, in some cases, some metrics related to the paths are stored in the routing information table.
The following is a brief description of the basic principles of the present application: in order to reduce the load of the central control node for route synchronization, the central control node in the embodiment of the application is used for maintaining route information, and the storage node and the client store route copies. And after updating the routing information, the central control node synchronizes the routing information to the storage node, and when the client accesses the storage node, the storage node synchronizes the routing information to the client. Thus, the central control node in the embodiment of the application does not need to perform route synchronization for each client, but is realized by forwarding through the storage node, so that the load of the central control node can be reduced. In addition, the routing information of the client is updated when the client accesses the storage node, so that the synchronization as required can be realized, the routing synchronization of a plurality of clients at the same time is avoided, and the normal work of the cluster is ensured.
Some brief descriptions are given below to application scenarios to which the embodiments of the present application can be applied, and it should be noted that the application scenarios are only used for illustrating the embodiments of the present application and are not limited. In specific implementation, the technical scheme provided by the embodiment of the application can be applied according to actual needs.
Referring to fig. 1, it is one of schematic diagrams of application scenarios provided in an embodiment of the present application, and the scenario may include, for example, a user 10, a terminal device 11, a storage node 12, and a central control node 13. Among them, various clients such as a client for searching and viewing a video, a client for searching and purchasing a commodity, and the like may be installed in the terminal device 11.
The terminal device 11 and the storage node 12 may be communicatively connected through a communication network, which may be a local area network, a wide area network, or the like. The terminal device 11 may be a mobile phone, a tablet computer, a notebook computer, a personal computer, or the like.
For ease of understanding, a brief description is provided for a flow of route synchronization of a distributed cluster according to an embodiment of the present application with reference to fig. 2, where:
and the master updates the route.
And secondly, pushing the updated route to each storage node chunk by the master.
And thirdly, the client accesses the chunk by adopting an IO interface, and the access request comprises the version identification of the route stored by the client.
And fourthly, when the chunk determines that the version identification in the access request is lower than the version identification of the route stored by the chunk, informing the client of abnormal route.
And fifthly, the client sends a route updating request to the chunk.
And sixthly, returning the routing increment to the client according to the update request.
And seventhly, when the client fails to acquire the route from the chunk, the client sends a route updating request to the master.
And the master sends the route increment to the client to update the route of the client.
To further illustrate the technical solutions provided in the embodiments of the present application, the following embodiments are further described below.
Referring to fig. 3, it is a schematic structural diagram of a route synchronization system of a distributed cluster according to an embodiment of the present application, including: central control node 31, storage node 32, wherein: in one embodiment, the central control node and the storage node may be in the same server or in different servers. In the specific implementation:
the central control node 31 stores the routing table containing the version identifier, maintains the routing table, and sends an updating instruction to the storage node after the routing table is updated, wherein the updating instruction comprises the updated version identifier and the updating information of the content of the routing table;
the storage node 32 is used for storing a copy of the routing table, receiving an updating instruction sent by the central control node and updating the routing table stored in the storage node according to the version identification and the updating information in the updating instruction; when an access request from a client is received and the version identification in the access request is lower than the version identification of a routing table stored in the client, routing table updating information is sent to the client.
Therefore, the client can update the route of the client according to the route updating information sent by the storage node, and the route synchronization is realized.
In an embodiment, in order to further implement lazy synchronization and facilitate a client to update a routing table of the client as needed, in this embodiment of the present application, when determining that a version identifier in the access request is lower than a version identifier of a routing table stored in the client, the storage node may first send a routing exception instruction to the client, and when receiving a routing update request sent by the client according to the routing exception instruction, send routing table update information to the client. In this way, the client updates its routing table when requesting an update.
In one embodiment, in order to ensure that the client can update its own routing table, when the client cannot obtain routing update information from the storage node, the client may further implement routing update through the central control node. Specifically, the central control node is further configured to receive a route update request of the client, and send a routing table update message to the client when determining that the version identifier in the route update request is lower than the version identifier stored in the central control node. Therefore, as long as the client side obtains the routing abnormal instruction, the client side can know that the client side needs to update the routing, and if the routing synchronization can not be carried out through the storage node, the routing synchronization can be realized through the central control node.
In one embodiment, the maintenance of the routing information by the central control node may include adding or deleting routes and modifying routes. But the routes of addition, deletion and modification are usually partial routes, and the partial routes are not changed. Therefore, in order to improve the efficiency of route synchronization and reduce the traffic occupied by route synchronization, the update information in the embodiment of the present application is incremental update information of the routing table. In this way, incremental updating of routing information is achieved.
In one embodiment, when the client accesses for the first time, the storage node does not access the route of the storage node, so that the client needs to obtain the route from the central control node, and the storage node accessed for the first time also needs to obtain a route backup so as to provide access service for the client. In view of this, in the embodiment of the present application, the central control node is further configured to receive a first access request of the access device, and send a routing table stored in the central control node to the access device according to the first access request, where the access device includes a client and/or a storage node.
In one embodiment, to implement disaster backup, the storage nodes include a master storage node and a slave storage node, wherein the slave storage node is used for backing up contents stored by the master storage node. On the basis of the architecture, in order to realize the routing synchronization between the master storage node and the slave storage node, in the embodiment of the application, the master storage node is also used for acquiring routing information from the slave storage node for updating if the version of the routing table is determined to be low according to the version identifier stored in the master storage node and the version identifier stored in the slave storage node when master-slave copy is carried out; and the slave storage node is used for acquiring the routing information from the master storage node for updating if the version of the routing table is determined to be low according to the version identifier stored in the slave storage node and the version identifier stored in the slave storage node when master-slave copying is carried out.
Therefore, when storage nodes in the master storage node and the slave storage node have faults and cannot realize the route synchronization with the central control node, the route synchronization can be realized through the associated storage nodes, and the burden of the central control node is reduced.
Of course, in specific implementation, if a storage node fails and cannot acquire routing information from a related storage node for synchronization, a routing synchronization request may be generated to the central control node for routing synchronization.
In one embodiment, in order to further reduce the burden of the central control node when there are many storage nodes, in the embodiment of the present application, the central control node selectively sends an update instruction to different storage nodes. Specifically, the following two implementation manners may be included:
the method comprises the following steps that 1, a control node selects a storage node to be tested from a storage node list, wherein the storage node list comprises storage nodes governed by a central control node; sending a heartbeat detection packet to a storage node to be tested; and if the response of the storage node to be tested to the heartbeat detection packet is received within a specified time, sending the updating instruction to the storage node to be tested.
Mode 2, a central control node selects a storage node to be tested from a storage node list, wherein the storage node list comprises storage nodes governed by the central control node; requesting the designated data stored by the storage node to be tested; and if the specified data returned by the storage node to be tested is received within a specified time, sending the updating instruction to the storage node to be tested.
For example, if the storage node stores video data, the central control node may request the storage node for the video data, and if the storage node can return the requested video data, it indicates that the storage node is alive and capable of providing a service normally.
Therefore, the storage nodes which normally operate can be known through the two modes, and the updating instruction is only sent to the storage nodes which normally operate. I.e. only route updates are performed on normal storage nodes.
To sum up, in the embodiment of the present application, the route synchronization of the client is implemented by the storage node, so that the heavy load of the central control node due to the route synchronization is reduced. In addition, only when the client accesses the storage node, if the routing version is found to be low, routing synchronization is performed, so that inert synchronization of routing is realized, and the storage node can be better ensured to provide access service.
Based on the same inventive concept, an embodiment of the present application provides a method for route synchronization of a distributed cluster, where the method is applied to a storage node, and as shown in fig. 4, the method may include:
step 401: receiving an updating instruction sent by a central control node; the update instruction includes an updated version identification and update information for updating the contents of the routing table.
Step 402: and updating the routing table stored in the routing table according to the version identification and the updating information in the updating instruction.
Step 403: and receiving an access request sent by the client.
Step 404: and when the version identification in the access request is lower than the version identification of the routing table stored in the access request, sending routing table updating information to the client.
Further, as mentioned above, in order to implement on-demand update of the client, for example, when the current signal quality of the client is poor, the update of the routing table may be suspended. Or when the traffic of the client is limited, the routing table can be suspended to be updated. In order to achieve the purpose, when the storage node confirms that the version identifier in the access request is lower than the version identifier of the routing table stored in the storage node, the storage node may first send a routing exception instruction to the client, and when receiving a routing update request sent by the client according to the routing exception instruction, the storage node sends a routing table update message to the client.
In addition, as also described above, in order to save traffic and reduce the load of updating the route, the update information is incremental update information of the routing table.
Wherein, in one embodiment, to implement disaster backup, the storage nodes have associated storage nodes, i.e., a master storage node has a slave storage node and a slave storage node has a master storage node. In view of this, in order to further reduce the load of the central control node, in the embodiment of the present application, when a storage node performs master-slave copy with another storage node, if it is determined that its version is low according to the version identifier of the routing table stored in the storage node and the version identifiers of the routing tables of other storage nodes, route information is obtained from the other storage node; and then updating the routing table stored by the router according to the acquired routing information.
In summary, the storage node not only stores data and provides access function, but also can implement route synchronization for the accessed client, thereby reducing the load of the central control node. In addition, when the routing is synchronized, the routing table of the routing table is not pushed to all the clients once the routing table is updated, but the routing table of the client is updated when the client accesses and finds that the version of the routing table of the client is low, so that inertia synchronization is realized, and the fact that the routing table of the client has enough processing capacity to provide access service is guaranteed.
Based on the same inventive concept, an embodiment of the present application further provides a method for synchronizing a route of a distributed cluster, where the method is applied to a client, and as shown in fig. 5, the method includes:
step 501: and sending an access request to the storage node, wherein the access request comprises the version identification of the routing table stored by the client.
In an embodiment, in order to provide a new scheme for confirming which storage node to send, in an embodiment of the present application, the access request further includes an identifier of the requested data. In this way, the client can determine the storage node where the requested data is located according to the corresponding relationship between the data identifier and the storage node in the pre-stored routing table, and then send the access request to the determined storage node.
Step 502: and receiving the routing table updating information sent by the storage node.
Step 503: and updating the routing table stored by the routing table according to the routing table updating information.
In one embodiment, a client may fail in the process of acquiring the update information of the routing table from the storage node, so that the acquisition of the update information of the routing table fails. In order to realize the route synchronization of the client, the client can send a route updating request to the central control node, wherein the route updating request comprises a version identifier of a route table stored by the client; and receiving routing table updating information sent by the central control node, wherein the routing table updating information is sent when the central control node determines that the version identifier in the routing updating request is lower than the version identifier stored in the central control node.
In the embodiment of the application, the client carries the version identifier of the routing table of the client in the access request and sends the access request to the storage node, so that the storage node can know whether the routing table of the client needs to be updated or not according to the version identifier of the routing table in the client. Therefore, the client can update the routing table of the client through the storage node when needing to access, and the processing load of the central control node is reduced.
Based on the same inventive concept, an embodiment of the present application further provides a method for synchronizing routes of a distributed cluster, where the method is applied to a central control node, and as shown in fig. 6, the method includes:
step 601: and updating the routing table containing the version identification.
The version identifier may be an update time or a predefined sequence number. Of course, in specific implementation, any identifier capable of distinguishing the version of the routing table is applicable to the embodiment of the present application, and is not limited thereto.
Step 602: and sending an updating instruction to the storage node after the routing table is updated, wherein the updating instruction comprises the updated version identification and the updating information of the content of the routing table.
That is, in the embodiment of the present application, the central control node does not directly update the routing table of the client, but updates the routing table of the storage node, and then the storage node updates the routing table of the client. Because the number of the storage nodes is much less than that of the clients, the number of the routing tables updated by the central control node is reduced, and the load of the central control node is reduced.
The following is an embodiment of the apparatus of the present application, and for details that are not described in detail in the embodiment of the apparatus, reference may be made to the above one-to-one corresponding method embodiment, where the apparatus provided in the present application is used to execute the foregoing route synchronization method for a distributed cluster.
Referring to fig. 7, a block diagram of a routing synchronization apparatus for a distributed cluster according to an embodiment of the present application is shown, where the apparatus is implemented as a storage node 12 in fig. 1 through hardware or a combination of hardware and software, and includes:
a first route updating module 701, configured to receive an updating instruction sent by a central control node; the updating instruction comprises updated version identification and updating information for updating the content of the routing table; updating the routing table stored in the routing table according to the version identification and the updating information in the updating instruction;
and the second routing update module 702 is configured to receive an access request sent by the client, and send routing table update information to the client when it is determined that the version identifier in the access request is lower than the version identifier of the routing table stored in the second routing update module.
Wherein, in one embodiment, the update information is incremental update information of the routing table.
Wherein, in one embodiment, the apparatus further comprises:
the routing information acquisition module is used for acquiring routing information from other storage nodes when the version of the routing information acquisition module is determined to be low according to the version identification of the routing table stored by the routing information acquisition module and the version identification of the routing table of other storage nodes when master-slave copying is carried out on the routing information acquisition module and other storage nodes;
and the third updating module is used for updating the routing table stored by the third updating module according to the acquired routing information.
Referring to fig. 8, a block diagram of a routing synchronization apparatus for a distributed cluster according to an embodiment of the present application is shown, where the apparatus is implemented as a client in fig. 1 through hardware or a combination of hardware and software, and the apparatus includes:
an access request sending module 801, configured to send an access request to a storage node, where the access request includes a version identifier of a routing table stored by a client;
a routing table update information receiving module 802, configured to receive routing table update information sent by the storage node;
and an updating module 803, configured to update the routing table stored in the updating module according to the routing table updating information.
Wherein, in one embodiment, the access request further includes an identification of the requested data; the access request sending module is specifically used for determining a storage node where the requested data is located according to a corresponding relation between a data identifier and the storage node in a pre-stored routing table; and sending the access request to the determined storage node.
Wherein, in one embodiment, the apparatus further comprises:
the updating request sending module is used for sending a routing updating request to the central control node after failure of receiving the routing table updating information from the storage node, wherein the routing updating request comprises the version identification of the routing table stored by the client;
and the central control node update information receiving module is used for receiving the routing table update information sent by the central control node, wherein the routing table update information is sent when the central control node determines that the version identifier in the routing update request is lower than the version identifier stored in the central control node.
Referring to fig. 9, a block diagram of a routing synchronization apparatus for a distributed cluster according to an embodiment of the present application is shown, where the apparatus is implemented as a control node 13 in fig. 1 through hardware or a combination of hardware and software, and includes:
an updating module 901, configured to update a routing table containing a version identifier;
an update instruction sending module 902, configured to send an update instruction to the storage node after the routing table is updated, where the update instruction includes an updated version identifier and update information of the routing table content.
Next, please refer to fig. 10, which shows a block diagram of a server according to an embodiment of the present application. The server 1000 is implemented as a central node or a storage node in fig. 1 or fig. 2. Specifically, the method comprises the following steps:
the server 1000 includes a Central Processing Unit (CPU)1001, a system memory 1004 including a Random Access Memory (RAM)1002 and a Read Only Memory (ROM)1003, and a system bus 1005 connecting the system memory 1004 and the central processing unit 1001. The server 1000 also includes a basic input/output system (I/O system) 1006, which facilitates the transfer of information between devices within the computer, and a mass storage device 1007, which stores an operating system 1013, application programs 1014, and other program modules 1015.
The basic input/output system 1006 includes a display 1008 for displaying information and an input device 1009, such as a mouse, keyboard, etc., for user input of information. Wherein the display 1008 and input device 1009 are connected to the central processing unit 1001 through an input-output controller 1010 connected to the system bus 1005. The basic input/output system 1006 may also include an input/output controller 1010 for receiving and processing input from a number of other devices, such as a keyboard, mouse, or electronic stylus. Similarly, the input-output controller 1010 also provides output to a display screen, a printer, or other type of output device.
The mass storage device 1007 is connected to the central processing unit 1001 through a mass storage controller (not shown) connected to the system bus 1005. The mass storage device 1007 and its associated computer-readable media provide non-volatile storage for the server 1000. That is, the mass storage device 1007 may include a computer readable medium (not shown) such as a hard disk or CD-ROM drive.
Without loss of generality, the computer-readable media may comprise computer storage media and communication media. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes RAM, ROM, EPROM, EEPROM, flash memory or other solid state memory technology, CD-ROM, DVD, or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that the computer storage media is not limited to the foregoing. The system memory 1004 and mass storage device 1007 described above may be collectively referred to as memory.
The server 1000 may also operate as a remote computer connected to a network via a network, such as the internet, according to various embodiments of the present application. That is, the server 1000 may be connected to the network 1012 through the network interface unit 1011 connected to the system bus 1005, or the network interface unit 1011 may be used to connect to another type of network or a remote computer system (not shown).
The memory also includes one or more programs, which are stored in the memory, and the one or more programs include instructions for performing the method for determining the repeated information provided by the embodiment of the present application.
Those skilled in the art will appreciate that all or part of the steps in the route synchronization method for a distributed cluster according to the above embodiments may be implemented by a program instructing associated hardware, where the program may be stored in a computer-readable storage medium, and the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Referring to fig. 11, a schematic structural diagram of a terminal according to an embodiment of the present application is shown. The terminal 1100 is the terminal in fig. 1. Specifically, the method comprises the following steps:
terminal 1100 can include, among other components, RF (Radio Frequency) circuitry 1110, memory 1120 including one or more computer-readable storage media, input unit 1130, display unit 1140, sensors 1150, audio circuitry 1160, near field communication module 1170, processor 1180 including one or more processing cores, and power supply 1190. Those skilled in the art will appreciate that the terminal structure shown in fig. 11 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
The memory 1120 may be used to store software programs and modules, and the processor 1180 may execute various functional applications and data processing by operating the software programs and modules stored in the memory 1120. The memory 1120 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the terminal 1100, and the like. Further, the memory 1120 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 1120 may also include a memory controller to provide the processor 1180 and the input unit 1130 access to the memory 1120.
The input unit 1130 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. Specifically, the input unit 1130 may include an image input device 1131 and other input devices 1132. The image input device 1131 may be a camera or a photoelectric scanning device. The input unit 1130 may include other input devices 1132 in addition to the image input device 731. In particular, other input devices 1132 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 1140 may be used to display information input by or provided to the user and various graphical user interfaces of the terminal 1100, which may be made up of graphics, text, icons, video, and any combination thereof. The Display unit 1140 may include a Display panel 1141, and optionally, the Display panel 1141 may be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like.
The terminal 1100 can also include at least one sensor 1150, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that adjusts the brightness of the display panel 1141 according to the brightness of ambient light, and a proximity sensor that turns off the display panel 1141 and/or the backlight when the terminal 1100 moves to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when the mobile phone is stationary, and can be used for applications of recognizing the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured in the terminal 1100, detailed descriptions thereof are omitted.
The terminal 1100 establishes a near field communication connection with an external device through the near field communication module 1170, and performs data interaction through the near field communication connection. In this embodiment, the near field communication module 1170 specifically includes a bluetooth module and/or a WiFi module.
The processor 1180 is a control center of the terminal 1100, connects various parts of the entire mobile phone using various interfaces and lines, and performs various functions of the terminal 1100 and processes data by operating or executing software programs and/or modules stored in the memory 1120 and calling data stored in the memory 1120, thereby performing overall monitoring of the mobile phone. Optionally, processor 1180 may include one or more processing cores; preferably, the processor 1180 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated within processor 1180.
Terminal 1100 can also include a power supply 1190 (e.g., a battery) for providing power to various components, which can be logically coupled to processor 1180 via a power management system that can be configured to manage charging, discharging, and power consumption. Power supply 1190 may also include one or more dc or ac power supplies, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, or any other component.
Although not shown, the terminal 1100 may further include a bluetooth module or the like, which is not described in detail herein.
In this embodiment, the terminal 1100 further includes a memory, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by one or more processors to implement the route synchronization method of the distributed cluster.
Those skilled in the art will appreciate that all or part of the steps in the check-in method of the above embodiments may be implemented by a program instructing associated hardware, and the program may be stored in a computer-readable storage medium, and the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.
Claims (11)
1. A system for routing synchronization in a distributed cluster, comprising:
the central control node stores a routing table containing the version identification and maintains the routing table, and after the routing table is updated, the central control node selects a storage node to be tested from a storage node list and requests the storage node to be tested for the stored specified data; if the specified data returned by the storage node to be tested is received within a specified time, sending an updating instruction to the storage node to be tested, wherein the storage node list comprises the storage nodes governed by the central control node, and the updating instruction comprises an updated version identifier and updating information of the content of the routing table;
the storage node is used for storing data, providing a data access function for a client, storing a copy of the routing table, receiving an updating instruction sent by the central control node and updating the routing table stored by the storage node according to the version identification and the updating information in the updating instruction; when an access request from a client is received, sending a routing exception instruction to the client when the version identification in the access request is confirmed to be lower than the version identification of a routing table stored by the client, and sending routing table update information to the client when a routing update request sent by the client according to the routing exception instruction is received, wherein the access request is used for requesting access to data on a storage node and carries the version identification of the routing table stored by the client;
the storage nodes comprise a main storage node and a secondary storage node, wherein the secondary storage node is used for backing up the content stored by the main storage node; the master storage node is also used for acquiring routing information from the slave storage node for updating when the version of the routing table is determined to be low according to the version identification stored in the master storage node and the version identification stored in the slave storage node when master-slave copying is carried out; and the slave storage node is used for acquiring the routing information from the master storage node for updating if the version of the routing table is determined to be low according to the version identification stored in the slave storage node and the version identification stored in the slave storage node when master-slave copying is carried out.
2. The system according to claim 1, wherein the central control node is further configured to receive a route update request from the client, and send a routing table update message to the client when determining that a version identifier in the route update request is lower than a version identifier stored in the central control node.
3. The system according to claim 1, wherein the central control node is further configured to receive a first access request from an access device, and send a routing table stored in the central control node to the access device according to the first access request, where the access device includes a client and/or a storage node.
4. The system of claim 1, wherein the central control node is specifically configured to,
selecting a storage node to be tested from a storage node list, wherein the storage node list comprises storage nodes governed by the central control node;
sending a heartbeat detection packet to a storage node to be tested;
and if the response of the storage node to be tested to the heartbeat detection packet is received within a specified time, sending the updating instruction to the storage node to be tested.
5. A route synchronization method for a distributed cluster is applied to a storage node, wherein the storage node is used for storing data and providing a data access function for a client, and the method comprises the following steps:
receiving an updating instruction sent by a central control node; the updating instruction comprises an updated version identifier and updating information used for updating the content of the routing table, wherein the updating instruction is sent when the central control node selects a storage node to be tested from a storage node list, requests the storage node to be tested for stored specified data and receives the specified data returned by the storage node to be tested within a specified time length; and the number of the first and second electrodes,
updating a routing table stored by the routing table according to the version identification and the updating information in the updating instruction; and the number of the first and second groups,
receiving an access request sent by a client, sending a routing exception instruction to the client when confirming that a version identifier in the access request is lower than a version identifier of a routing table stored in the client, and sending routing table update information to the client when receiving a routing update request sent by the client according to the routing exception instruction, wherein the access request is used for requesting access to data on a storage node and carries the version identifier of the routing table stored in the client;
and, the method further comprises:
when master-slave copying is carried out with other storage nodes, if the version of the storage node is determined to be low according to the version identification of the routing table stored by the storage node and the version identification of the routing table of the other storage nodes, the routing information is obtained from the other storage nodes; and updating the routing table stored by the routing table according to the acquired routing information.
6. A route synchronization method for a distributed cluster is applied to a client, and comprises the following steps:
sending an access request to a storage node, wherein the access request comprises a version identifier of a routing table stored by the client, the storage node is used for storing data and providing a data access function for the client, and the access request is used for requesting to access the data on the storage node and carrying the version identifier of the routing table stored by the client;
receiving a routing abnormal instruction sent by the storage node when the version identification in the access request is lower than the version identification of a routing table stored in the storage node;
sending a route updating request to the storage node based on the route abnormal instruction;
receiving routing table updating information sent by the storage node;
and updating the routing table stored by the routing table according to the routing table updating information.
7. The method of claim 6, wherein the access request further includes an identification of the requested data; the sending of the access request to the storage node specifically includes:
determining a storage node where the requested data is located according to the corresponding relation between the data identifier and the storage node in the pre-stored routing table;
and sending the access request to the determined storage node.
8. The method of claim 6, further comprising:
after failure of receiving the routing table updating information from the storage node, sending a routing updating request to a central control node, wherein the routing updating request comprises a version identifier of a routing table stored by the client;
and receiving routing table updating information sent by the central control node, wherein the routing table updating information is sent when the central control node determines that the version identifier in the routing updating request is lower than the version identifier stored in the central control node.
9. A routing synchronization apparatus for a distributed cluster, configured to perform the routing synchronization method for a distributed cluster according to any one of claims 5 to 8.
10. A computing device comprising a memory for storing program instructions and a processor for calling the program instructions stored in the memory to execute the method for route synchronization for a distributed cluster according to any one of claims 5-8 according to the obtained program instructions.
11. A computer storage medium having stored thereon computer-executable instructions for causing a computer to perform a method for route synchronization for a distributed cluster according to any one of claims 5-8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810290404.7A CN110198269B (en) | 2018-04-03 | 2018-04-03 | Route synchronization system, method and related device for distributed cluster |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810290404.7A CN110198269B (en) | 2018-04-03 | 2018-04-03 | Route synchronization system, method and related device for distributed cluster |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110198269A CN110198269A (en) | 2019-09-03 |
CN110198269B true CN110198269B (en) | 2021-10-08 |
Family
ID=67751292
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810290404.7A Active CN110198269B (en) | 2018-04-03 | 2018-04-03 | Route synchronization system, method and related device for distributed cluster |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110198269B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113542135B (en) * | 2021-08-04 | 2023-04-07 | 湖南快乐阳光互动娱乐传媒有限公司 | CDN communication method, system, client and server |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101505472A (en) * | 2008-02-05 | 2009-08-12 | 华为技术有限公司 | User data server system and apparatus |
CN102708165A (en) * | 2012-04-26 | 2012-10-03 | 华为软件技术有限公司 | Method and device for processing files in distributed file system |
CN103036796A (en) * | 2011-09-29 | 2013-04-10 | 阿里巴巴集团控股有限公司 | Method and device for updating routing information |
CN103259824A (en) * | 2012-02-21 | 2013-08-21 | 深圳市腾讯计算机系统有限公司 | Method and device for synchronizing data route in distributed data storage system |
CN104618127A (en) * | 2013-11-01 | 2015-05-13 | 深圳市腾讯计算机系统有限公司 | Master and standby storage node switching method and system |
CN105471964A (en) * | 2015-11-16 | 2016-04-06 | 中国建设银行股份有限公司 | Data pushing method, server, client and data pushing system |
CN106302607A (en) * | 2015-06-05 | 2017-01-04 | 腾讯科技(深圳)有限公司 | It is applied to block storage system and the method for cloud computing |
CN106911769A (en) * | 2017-02-09 | 2017-06-30 | 腾讯科技(深圳)有限公司 | The processing method of cloud platform route data and the physical server of cloud platform |
Family Cites Families (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7801912B2 (en) * | 2005-12-29 | 2010-09-21 | Amazon Technologies, Inc. | Method and apparatus for a searchable data service |
US8291052B2 (en) * | 2008-06-24 | 2012-10-16 | Nokia Corporation | Method, apparatus, and computer program product for determining a path update via distributed information management |
US8019732B2 (en) * | 2008-08-08 | 2011-09-13 | Amazon Technologies, Inc. | Managing access of multiple executing programs to non-local block data storage |
CN103067433B (en) * | 2011-10-24 | 2016-04-20 | 阿里巴巴集团控股有限公司 | A kind of data migration method of distributed memory system, equipment and system |
CN104050250B (en) * | 2011-12-31 | 2018-06-05 | 北京奇虎科技有限公司 | A kind of distributed key-value querying method and query engine system |
CN103078927B (en) * | 2012-12-28 | 2015-07-22 | 合一网络技术(北京)有限公司 | Key-value data distributed caching system and method thereof |
US9667490B1 (en) * | 2013-06-05 | 2017-05-30 | Parallels IP Holdings GmbH | Method for high availability of services in cloud computing systems |
CN104283906B (en) * | 2013-07-02 | 2018-06-19 | 华为技术有限公司 | Distributed memory system, clustered node and its section management method |
US9922135B1 (en) * | 2013-12-12 | 2018-03-20 | Amazon Technologies, Inc. | Distributed storage and retrieval of directed acyclic graphs |
CN104516967A (en) * | 2014-12-25 | 2015-04-15 | 国家电网公司 | Electric power system mass data management system and use method thereof |
US20160306822A1 (en) * | 2015-04-17 | 2016-10-20 | Samsung Electronics Co., Ltd. | Load balancing of queries in replication enabled ssd storage |
-
2018
- 2018-04-03 CN CN201810290404.7A patent/CN110198269B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101505472A (en) * | 2008-02-05 | 2009-08-12 | 华为技术有限公司 | User data server system and apparatus |
CN103036796A (en) * | 2011-09-29 | 2013-04-10 | 阿里巴巴集团控股有限公司 | Method and device for updating routing information |
CN103259824A (en) * | 2012-02-21 | 2013-08-21 | 深圳市腾讯计算机系统有限公司 | Method and device for synchronizing data route in distributed data storage system |
CN102708165A (en) * | 2012-04-26 | 2012-10-03 | 华为软件技术有限公司 | Method and device for processing files in distributed file system |
CN104618127A (en) * | 2013-11-01 | 2015-05-13 | 深圳市腾讯计算机系统有限公司 | Master and standby storage node switching method and system |
CN106302607A (en) * | 2015-06-05 | 2017-01-04 | 腾讯科技(深圳)有限公司 | It is applied to block storage system and the method for cloud computing |
CN105471964A (en) * | 2015-11-16 | 2016-04-06 | 中国建设银行股份有限公司 | Data pushing method, server, client and data pushing system |
CN106911769A (en) * | 2017-02-09 | 2017-06-30 | 腾讯科技(深圳)有限公司 | The processing method of cloud platform route data and the physical server of cloud platform |
Also Published As
Publication number | Publication date |
---|---|
CN110198269A (en) | 2019-09-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108667884B (en) | Mirror image distribution method, mirror image acquisition method and device | |
CN104518953B (en) | Method for deleting message, instant communication terminal and system | |
EP2775743A1 (en) | Communication processing method and device, and terminal | |
CN111416745A (en) | Network slice determining method and related device | |
CN107634962B (en) | The management method and Related product of network bandwidth | |
CN108595483B (en) | Data processing method and related device | |
CN103390034A (en) | Image display method, device, terminal and server | |
CN104142868A (en) | Connection establishment method and device | |
CN104980455A (en) | Multi-terminal data synchronization method based on cloud storage, device and system thereof | |
CN109428839B (en) | CDN scheduling method, device and system | |
CN109561014A (en) | A kind of web instant communication method and system | |
CN112269842A (en) | Information processing method and device, storage medium and computer equipment | |
US9838313B2 (en) | Method, system, control device and node device for data transmission | |
CN105530684B (en) | Network access method, device and system | |
CN103491421A (en) | Content display method and device and smart television | |
CN110196662B (en) | Method, device, terminal and storage medium for displaying synchronization state | |
CN105376761B (en) | Establish the method, apparatus and phone system of call connection | |
CN110198269B (en) | Route synchronization system, method and related device for distributed cluster | |
CN114221985A (en) | Device control method, device, electronic device and computer-readable storage medium | |
CN114130016B (en) | Control resource management method and related device | |
CN106209601B (en) | State update message pushing method and device | |
CN115065609A (en) | B-end SaaS system hybrid deployment method and system | |
CN113852450A (en) | Message push feedback method and device, electronic equipment and storage medium | |
CN111144845A (en) | Mobile terminal conference reminding method and device | |
CN109426572B (en) | Task processing method and device and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |