CN106790563B - Distributed memory system and method - Google Patents

Distributed memory system and method Download PDF

Info

Publication number
CN106790563B
CN106790563B CN201611221617.1A CN201611221617A CN106790563B CN 106790563 B CN106790563 B CN 106790563B CN 201611221617 A CN201611221617 A CN 201611221617A CN 106790563 B CN106790563 B CN 106790563B
Authority
CN
China
Prior art keywords
server
primary server
data
primary
switched
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
Application number
CN201611221617.1A
Other languages
Chinese (zh)
Other versions
CN106790563A (en
Inventor
朱欣灿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Telecom Corp Ltd
Original Assignee
China Telecom Corp Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by China Telecom Corp Ltd filed Critical China Telecom Corp Ltd
Priority to CN201611221617.1A priority Critical patent/CN106790563B/en
Publication of CN106790563A publication Critical patent/CN106790563A/en
Application granted granted Critical
Publication of CN106790563B publication Critical patent/CN106790563B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0668Management of faults, events, alarms or notifications using network fault recovery by dynamic selection of recovery network elements, e.g. replacement by the most appropriate element after failure
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/30Decision processes by autonomous network management units using voting and bidding

Abstract

The present invention proposes a kind of distributed memory system and method, is related to big data field of storage.Wherein, a kind of distributed memory system of the invention, comprising: primary server for handling data and storing data, and sends the data to secondary primary server and from server;Secondary primary server is switched to primary server according to from the election results of server for storing the data for carrying out primary server, and when primary server delay machine;With from server, for storing the data for carrying out primary server, provide corrupt data for user, and new primary server is elected from secondary primary server when primary server delay machine.Data service is provided for user by a variety of servers in such system, improves access efficiency;When primary server failure, there can be secondary primary server and be switched to primary server in time, improve failure and solve efficiency, improve the stability and reliability of system.

Description

Distributed memory system and method
Technical field
The present invention relates to big data field of storage, especially a kind of distributed memory system and method.
Background technique
With social networks, the continuous development of mobile Internet and e-commerce technology, that is managed based on network is mutual Networking enterprise is increasingly liked by people.People also create a large amount of content while frequently using internet.This A little contents are exactly data, and each Internet company is substantially all in rear end and has a set of mature and stable distributed system and be used for Data value is extracted in storage, calculating and the analysis of data.A set of efficient, reliable data buffering system is also required to simultaneously to be used for The fast reaction of Internet application, a sluggish application cannot get user's favor certainly.
The prior art mainly adopts the design methods based on Multi-Paxos algorithm, but since such algorithm is more difficult To understand, engineer is easy error in programming, causes the unstable of system;And another is based on Raft algorithm Design method is barely satisfactory in reading speed and troubleshooting speed.
Summary of the invention
An object of the present invention is to provide a kind of Distributed Storage schemes of stability and high efficiency.
According to an aspect of the present invention, a kind of distributed memory system is proposed, comprising: primary server Main-Leader, For handling data and storing data, and send the data to secondary primary server and from server;Secondary primary server Deputy- Leader is cut for storing the data for carrying out primary server, and when primary server delay machine according to from the election results of server It is changed to primary server;With from server Follower, for storing the data for carrying out primary server, it is unreliable to provide for user Data, and new primary server is elected from secondary primary server when primary server delay machine.
It optionally, include a primary server in distributed memory system, at least one secondary primary server and at least two From server.
Optionally, primary server keeps connecting with from server by heartbeat message;Primary server is also used in delay machine Restart and is switched to from server;It is specifically used for from server: when the heartbeat message for carrying out primary server can not be received, really Determine primary server delay machine;By being elected from secondary primary server based on the first predetermined policy new from the interaction between server Primary server;Secondary primary server is also used to be switched to primary server when being new primary server from Server election.
Optionally, it is also used to from server: after electing new primary server from secondary primary server, by from service Interaction between device elects new secondary primary server based on the second predetermined policy from from server;When being elected as new pair Secondary primary server is switched to when primary server.
Optionally, primary server is specifically used for: receiving write-in data from the user, storage write-in data simultaneously generate log Information;Write-in data are based on reliable data transmission mode and are sent to secondary primary server;Write-in data are passed through into corrupt data Transmission mode is sent to from server;Secondary primary server is also used to generate log information when the data is written.
Optionally, secondary primary server is also used to when being switched to primary server, updates storage data based on log information.
Distributed storage is carried out using primary server, secondary primary server, from server architecture in such system, by a variety of Server provides data service for user, improves access efficiency;When primary server failure, it is timely there is secondary primary server It is switched to primary server, failure is improved and solves efficiency, improve the stability and reliability of system.
According to another aspect of the present invention, propose a kind of distributed storage method, comprising: when primary server delay machine from Server elects new primary server from secondary primary server, wherein primary server handles data and storing data, and will count According to being sent to secondary primary server and from server;Secondary primary server storage carrys out the data of primary server;Come from server storage The data of primary server simultaneously provide corrupt data for user;According to the election results from server, secondary primary server switching For primary server.
Optionally, the quantity of primary server is 1, and the quantity of secondary primary server is 1 or more, is from the quantity of server 2 or more.
Optionally, further includes: primary server and between server pass through heartbeat message keep connect;When primary server is delayed When machine, primary server is restarted and is switched to from server;New primary server packet is elected from secondary primary server from server It includes: when from server the heartbeat message for carrying out primary server can not be received, determining primary server delay machine;Pass through from server From the interaction between server, new primary server is elected from secondary primary server based on the first predetermined policy;According to from service The election results of device, it includes: the pair when being new primary server from Server election that secondary primary server, which is switched to primary server, Primary server is switched to primary server.
Optionally, further includes: after electing new primary server from secondary primary server from server, by from service Interaction between device elects new secondary primary server based on the second predetermined policy from from server;When being elected as new pair When primary server, secondary primary server is switched to from server.
Optionally, further includes: primary server receives write-in data from the user, and storage write-in data simultaneously generate log letter Breath;Write-in data are based on reliable data transmission mode and are sent to secondary primary server;Write-in data are passed by corrupt data Defeated mode is sent to from server;Secondary primary server storage write-in data, and generate log information.
Optionally, further includes: when secondary primary server is switched to primary server, data are updated storage based on log information.
By such method, it can be deposited using primary server, secondary primary server, from server architecture progress distribution Storage, provides data service by a variety of servers for user, improves access efficiency;When primary server failure, can exist secondary main Server is switched to primary server in time, improves failure and solves efficiency, improves the stability and reliability of system.
Detailed description of the invention
The drawings described herein are used to provide a further understanding of the present invention, constitutes part of this application, this hair Bright illustrative embodiments and their description are used to explain the present invention, and are not constituted improper limitations of the present invention.In the accompanying drawings:
Fig. 1 is the schematic diagram of one embodiment of distributed memory system of the invention.
Fig. 2 is the schematic diagram of one embodiment of server switching in distributed memory system of the invention.
Fig. 3 is the signaling diagram of one embodiment of data write-in in distributed memory system of the invention.
Fig. 4 is the signaling diagram of one embodiment of reading data in distributed memory system of the invention.
Fig. 5 is the flow chart of one embodiment of distributed storage method of the invention.
Fig. 6 is the flow chart of another embodiment of distributed storage method of the invention.
Fig. 7 is the flow chart of one embodiment of data write-in in distributed storage method of the invention.
Specific embodiment
Below by drawings and examples, technical scheme of the present invention will be described in further detail.
The schematic diagram of one embodiment of distributed memory system of the invention is as shown in Figure 1.Wherein, primary server 101 Data and storing data are capable of handling, and send the data to secondary primary server and from server;Secondary primary server 111, secondary master Server 112 can store the data for carrying out primary server respectively, and when primary server delay machine according to the election from server As a result it is switched to primary server, may include multiple secondary primary servers in system;It can store to come independently from server 121,122 The data of server provide corrupt data for user, and elect from secondary primary server when primary server delay machine new Primary server may include multiple from server in system.
Distributed storage is carried out using primary server, secondary primary server, from server architecture in such system, by a variety of Server provides data service for user, improves access efficiency;Secondary primary server and carry out primary server from server storage Data, to ensure that the data consistency of multiple servers;When primary server failure, it is timely there is secondary primary server It is switched to primary server, failure is improved and solves efficiency, improve the stability and reliability of system.
It in one embodiment, may include multiple parallel servers when initial start, in system, after start completion, A primary server, at least one secondary server and multiple from server are generated in distributed memory system.Distributed storage The structure of system can be divided into two layers, and wherein primary server and secondary primary server are located at active layers, execute user data processing, number According to the function of backup and distributed network heartbeat processing;It is located at passive layer from server, executes the operation of synchronous active layer data. In one embodiment, system maintenance personnel can according to need the quantity of specified secondary primary server.In one embodiment, may be used With the weight of each server in configuration system, primary server, secondary primary server are determined according to the size of weight, by its in system His server is used as from server.
Such system can be quickly generated by primary server, secondary main service and from the structure of server, and it is raw to improve system At efficiency.
In one embodiment, at least there are three servers in distributed memory system, wherein service based on one Device, it is from server there are also one that one, which had not only been secondary primary server but also had been from server,.Such distributed memory system can It being capable of compliance meaning when enough meeting the structure using major and minor master and slave server, and can guarantee to conduct an election from server See, ensure that the normal operation of system.
In one embodiment, the determination of multiple role servers can be divided into two stages: primary server role determines It is determined with secondary primary server role.From server by interaction elect determine primary server, and then by interaction election determine from Server.If there are multiple secondary primary servers in system maintenance personnel depaly system, successively carried out from server repeatedly secondary main Server election, until meeting the quantity of secondary primary server.In one embodiment, it can be calculated according to Raft algorithm or Paxos Method realizes the election of primary server, secondary primary server.In another embodiment, different power can be configured for each server Weight, the size based on weight realize the election of primary server, secondary primary server.
Such distributed memory system compliance can anticipate rapidly in primary server, secondary primary server election See, improves the starting speed of system.
The schematic diagram of one embodiment that server switches in distributed memory system of the invention is as shown in Figure 2.Main clothes Device of being engaged in from server by heartbeat message keeps connection, therefore, when 201 delay machine of primary server, from server 221, from clothes Business device 222 etc. can discover rapidly the heartbeat message that can not receive primary server, determine 201 delay machine of primary server.Delay machine Primary server 201 is restarted and is switched to from server.From server by the way that it is pre- that first can be based on from the interaction between server Fixed strategy elects new primary server from secondary primary server.In one embodiment, the first predetermined policy can be according to The size of secondary primary server weight elects primary server.As shown in Fig. 2, determine that pair primary server 212 becomes new primary server, Secondary primary server 212 is switched to primary server.It can also make a reservation for from server by from the interaction between server based on second Strategy elects a secondary primary server from from server.In one embodiment, the second predetermined policy can be according to from The size of server weight elects secondary primary server, can also elect secondary primary server based on Paxos algorithm, Raft algorithm.Such as Shown in Fig. 2, determine that electing from server 222 is secondary primary server, is switched to secondary primary server from server 222.
In such distributed memory system, primary server delay machine can be discovered in time from server, and main from pair in time New primary server is elected in server, new secondary primary server is elected from from server, to ensure that system Stablize.
In one embodiment, access speed can be improved based on server weight election primary server, secondary primary server, It makes up and haves the defects that livelock using Paxos algorithm, keep the election cycle stably and controllable, guarantee the seamless switching of system, improve system System stability.
The signaling diagram of one embodiment that data are written in distributed memory system of the invention is as shown in Figure 3.Wherein, main Server 301, secondary primary server 311, secondary primary server 322, the structure and function from server 321 and from server 322 with It is similar in the embodiment of Fig. 1.In distributed memory system, all write data requests are all pointed to primary server 301.
In 340, primary server 301 receives write-in data.In one embodiment, primary server 301 can also receive Data processing request, primary server 301 carry out data processing, generate write-in data.Primary server 301 is written data and generates day Will information.
In 341, primary server 301 is sent to secondary primary server for data are written.
In 342, for secondary primary server after data are written in storage, transmission is successfully written feedback information to primary server 301. Primary server 301 receives be successfully written feedback information after, confirmation message synchronizes success.Secondary primary server can also generate log letter Breath, so as to data rewind operation.In one embodiment, it is come from if primary server 301 fails to receive at preset time intervals Secondary primary server is successfully written feedback information, then sends write-in data to secondary primary server again.
In 343, primary server 301 is sent to data are written from server.Due to without guaranteeing to deposit from server The information of storage is completely correct, comprehensive, therefore is not necessarily to be successfully written feedback information to the transmission of primary server 301 from server, Primary server 301 is successfully written feedback information without equal this.
Such system can send the data to secondary primary server when data are written and from server;Due to secondary main clothes Business device needs to keep consistent with the data of primary server, therefore sends the data to secondary main service using reliable data transmission mode Device;Due to there is no need to wait replying, improving system effectiveness without being consistent from the data of server with primary server.
In one embodiment, primary server can also use 2PC (Two Phase Commit Protocol, two stages Committing protocol) algorithm is to secondary primary server transmission write-in information, to guarantee the consistency of data;Primary server uses multicasting technology It sends data and reduces the resource occupation of primary server to improve efficiency.
In one embodiment, primary server and secondary primary server execution journal consistency operation when data are written, it is right In the data of modification, log information only does addition and does not make an amendment operation.When primary server is abnormal, new primary server exists After new secondary primary server elects, first had between primary server before carry out a log information it is synchronous, so The responsibility of primary server can be just exercised afterwards.
Such system can guarantee the content in primary server be it is newest, comprehensive, so as to avoid due to main clothes Loss of data caused by device delay machine of being engaged in, ensure that the safety of data.
The signaling diagram of one embodiment of reading data is as shown in Figure 4 in distributed memory system of the invention.Wherein, main Server 40, secondary primary server 411, secondary primary server 422, from server 421 and from the structure and function and figure of server 422 It is similar in 1 embodiment.Client-initiated read data request can be divided into two kinds of operation modes: correct read mode and quickly reading Mode.
Under correct read mode, user needs to obtain reliable, accurate data, therefore the read data operation of user Eventually point to primary server, and by primary server by the data feedback of reading to user.
For fast read mode, user can be completed by any server in distributed memory system reads data behaviour Make.In one embodiment, from server and there is no user need data.
In 441, the slave server 421 in distributed memory system receives quick read requests user request.
In 442, there is no the data that user needs from server 421, synchronize and ask to the initiation of primary server 401 data It asks.
In 443, primary server 401 gives the data distributing requested from server from server 421.
In 444, data are synchronized in the storage of itself from server 421, and feed back to user.
Such system can be by providing a user data from server, when the number that user's needs are not present from server According to when, can be requested to primary server and supplement itself storage, to improve data extraction efficiency, improve the fault-tolerant of system Property, alleviate the burden of primary server.
In one embodiment, can by based on any one distributed memory system being mentioned above or member save Point extended, generate more massive distributed storage network, thus provide it is more stable, efficiently and have bigger carrying energy The storage system of power meets the needs of network data expansion.
In one embodiment, it can be provided using distributed memory system of the invention as single-node login system for platform Proof of identification bill.
When users log on, username and password information is submitted application backstage by user, after background authentication success, access point Cloth storage system carries out write operation;A billing information is written according to user's unique identification in distributed memory system;Bill letter Breath has carried out writing data, Backup Data and data cached operation within the storage system;Distributed memory system surrender of bills information Give application backstage;Billing information is returned into user using backstage, shows that user has logged on.
When user accesses the service in application, service routine obtains the current billing information A of user;Service routine according to User's unique identification reads a data to distributed memory system;Distributed memory system returns to a bill to service routine Data B;Whether service routine compares billing information A consistent with bill data B.
If billing information A and B is inconsistent, then service routine reads a number to distributed memory system is synchronous again According to distributed memory system returns to a bill data C to service routine;Service routine compares billing information A and bill data C It is whether consistent, if inconsistent show that user is not logged in, stop providing services to the user;If it is consistent, show that user has stepped on Record, service routine obtain new billing information (process is similar with login process), Xiang Yong to write operation of storage system application Family provides service and new bill, and used stamp is according to failure.
If billing information A is consistent with B, then represents user and have logged on, service routine is once write to storage system application Operation, obtains new billing information, service routine knows that user has logged on, and provides services to the user and new bill, used stamp According to failure.
Such distributed memory system can provide proof of identification bill as single-node login system for platform, on the one hand It ensure that the accuracy of authentication, on the other hand also improve the efficiency of verifying;Simultaneously as distributed memory system is seamless The characteristics of switching, can be improved the stability of the application based on distributed memory system, improve secure user data, improve user Experience.
The flow chart of one embodiment of distributed storage method of the invention is as shown in Figure 5.
In step 501, delay machine occurs for primary server.It in one embodiment, include main clothes in distributed memory system It is engaged in device, secondary primary server and from server;Primary server handles data and storing data, and sends the data to secondary main service Device and from server;Secondary primary server storage carrys out the data of primary server;Carry out the data of primary server from server storage And corrupt data is provided for user.
In step 502, new primary server is elected from secondary primary server from server.
In step 503, according to the election results from server, secondary primary server is switched to primary server.
By such method, it can be deposited using primary server, secondary primary server, from server architecture progress distribution Storage, provides data service by a variety of servers for user, improves access efficiency;When primary server failure, can exist secondary main Server is switched to primary server in time, improves failure and solves efficiency, improves the stability and reliability of system.
It in one embodiment, may include multiple parallel servers, distributed storage system when initial start, in system A primary server, at least one secondary server and multiple from server are generated in system.In one embodiment, system is tieed up Shield personnel can according to need the quantity for formulating secondary server.It in one embodiment, can each server in configuration system Weight, primary server, secondary primary server are determined according to the size of weight, using servers other in system as from service Device.
By such method, it can be quickly generated by primary server, secondary main service and from the structure of server, improve system The efficiency that system generates.
The flow chart of another embodiment of distributed storage method of the invention is as shown in Figure 6.
In step 601, primary server breaks down and delay machine.
In step 602, primary server is restarted and is switched to from server.
In step 603, judge whether can to receive the heartbeat message of primary server from server.When from service When device can not receive the heartbeat message for carrying out primary server, primary server delay machine is determined, execute step 604.
In step 604, from server by being based on the first predetermined policy from secondary main service from the interaction between server New primary server is elected in device.In one embodiment, the first predetermined policy can be according to secondary primary server weight Size elects primary server.
In step 605, the secondary server for being elected as new primary server is switched to primary server.
In step 606, from server by from the interaction between server, based on the second predetermined policy from from server In elect a secondary primary server.In one embodiment, the second predetermined policy can be according to from the big of server weight The secondary primary server of small election can also elect secondary primary server based on Paxos algorithm, Raft algorithm.
In step 607, the slave server for being elected as new secondary primary server is switched to secondary primary server.
By such method, primary server delay machine can be discovered in time from server, and in time from secondary primary server New primary server is elected, new secondary primary server is elected from from server, thus seamless between realizing server Switching, ensure that the stabilization of system.
The flow chart of one embodiment that data are written in distributed storage method of the invention is as shown in Figure 7.
In step 701, primary server receives write-in data.In one embodiment, primary server 301 can also receive Data processing request, primary server carry out data processing, generate write-in data.Primary server write-in data simultaneously generate log letter Breath.
In a step 702, primary server is sent to secondary primary server for data are written.Since secondary primary server needs to keep It is consistent with the data of primary server, secondary primary server is sent the data to using reliable data transmission mode.
In step 703, for secondary primary server after data are written in storage, transmission is successfully written feedback information to main service Device, and log information is generated, so as to data rewind operation.
In step 704, primary server is sent to data are written from server.Due to without guaranteeing to deposit from server The information of storage is completely correct, comprehensive, therefore primary server is successfully written feedback information without waiting.
In step 705, the write-in data that are received from server storage.
By such method, secondary primary server can be sent the data to when data are written and from server;Due to Secondary primary server needs to keep consistent with the data of primary server, therefore sends the data to pair using reliable data transmission mode Primary server;Due to there is no need to wait replying, improving system without being consistent from the data of server with primary server Efficiency.
In one embodiment, primary server and secondary primary server execution journal consistency operation when data are written, it is right In the data of modification, log information only does addition and does not make an amendment operation.When primary server is abnormal, new primary server exists After new secondary primary server elects, first had between primary server before carry out a log information it is synchronous, so The responsibility of primary server can be just exercised afterwards.
By such method, can guarantee the content in primary server be it is newest, comprehensive, so as to avoid due to Loss of data caused by primary server delay machine ensure that the safety of data.
In one embodiment, Client-initiated read data request can be divided into two kinds of operation modes: correct read mode and Fast read mode.Under correct read mode, user needs to obtain reliable, accurate data, therefore the reading number of user Eventually point to primary server according to operation, and by primary server by the data feedback of reading to user.
By such method, it can ensure that user obtains accurate data, improve the data precision guarantee.
In one embodiment, for fast read mode, user passes through any server in distributed memory system Reading data manipulation can be completed, to improve data feedback speed, and reduce the burden of primary server.
In another embodiment, if from server and user's needs are not present when user uses fast read mode Data, then from server to primary server initiate data synchronization request.The data distributing that primary server will be requested from server To from server;Data are synchronized in the storage of itself from server 421, and feed back to user.
By such method, on the one hand guarantee that user can obtain feedback data, on the other hand can also make from service Device supplements itself storage, avoids repeating to inquire primary server, improves data extraction efficiency, alleviate the burden of primary server.
Finally it should be noted that: the above embodiments are merely illustrative of the technical scheme of the present invention and are not intended to be limiting thereof;To the greatest extent The present invention is described in detail with reference to preferred embodiments for pipe, it should be understood by those ordinary skilled in the art that: still It can modify to a specific embodiment of the invention or some technical features can be equivalently replaced;Without departing from this hair The spirit of bright technical solution should all cover within the scope of the technical scheme claimed by the invention.

Claims (10)

1. a kind of distributed memory system characterized by comprising
One primary server for handling data and storing data, and sends the data to secondary primary server and from service Device;
It is described pair primary server, for storing the data from the primary server, and when the primary server delay machine according to It is described to be switched to the primary server from the election results of server;With,
It is described from server, be used for:
The data from the primary server are stored, provide corrupt data for user;
And the new primary server is elected from the secondary primary server when the primary server delay machine;And
After electing the new primary server from the secondary primary server, pass through the interaction between server, base The new secondary primary server is elected from server from described in the second predetermined policy;When the pair for being elected as new is main The secondary primary server is switched to when server.
2. system according to claim 1, which is characterized in that include the main clothes in the distributed memory system It is engaged in device, at least one described secondary primary server and at least two described from server.
3. system according to claim 1, which is characterized in that the primary server is disappeared from server by heartbeat with described Breath keeps connection;
The primary server is also used to restart in delay machine and be switched to from server;
It is described to be specifically used for from server:
When that can not receive from the heartbeat message of the primary server, the primary server delay machine is determined;
By the interaction between server, new main clothes are elected from the secondary primary server based on the first predetermined policy Business device;
The pair primary server be also used to by it is described from Server election be the new primary server when, be switched to the master Server.
4. system according to claim 1, which is characterized in that
The primary server is specifically used for:
Write-in data from the user are received, said write data are stored and generate log information;
Said write data are based on reliable data transmission mode and are sent to the secondary primary server;
Said write data are sent to by corrupt data transmission mode described from server;
The pair primary server is also used to generate the log information when the data is written.
5. system according to claim 1, which is characterized in that
The pair primary server is also used to when being switched to the primary server, updates storage data based on log information.
6. a kind of distributed storage method characterized by comprising
Elect the new primary server from secondary primary server from server when primary server delay machine, wherein distributed It include a primary server in storage, the primary server processing data and storing data, and send the data to secondary master Server and from server;The pair primary server stores the data from the primary server;It is described to come from server storage From the data of the primary server and corrupt data is provided for user;
According to the election results from server, the pair primary server is switched to the primary server;
By the interaction between server, the new pair is elected from described from server based on the second predetermined policy Primary server;
It is described to be switched to the secondary primary server from server when being elected as the new secondary primary server.
7. according to the method described in claim 6, it is characterized in that, the quantity of the primary server be 1, the main service of pair The quantity of device be 1 or more, it is described from the quantity of server be 2 or more.
8. according to the method described in claim 6, it is characterized in that,
Further include:
The primary server passes through heartbeat message holding connection from server with described;
When the primary server delay machine, the primary server is restarted and is switched to described from server;
It is described to elect the new primary server from secondary primary server from server and include:
When it is described can not receive from server from the heartbeat message of the primary server when, determine the primary server Delay machine;
It is described from server by described from the interaction between server, selected from the secondary primary server based on the first predetermined policy Enumerate new primary server;
It is described according to from the election results of server, it includes: to work as quilt that the pair primary server, which is switched to the primary server, It is described from Server election be the new primary server when, the pair primary server is switched to the primary server.
9. according to the method described in claim 6, it is characterized by further comprising:
The primary server receives write-in data from the user, stores said write data and generates log information;
Said write data are based on reliable data transmission mode and are sent to the secondary primary server;
Said write data are sent to by corrupt data transmission mode described from server;
The pair primary server stores said write data, and generates the log information.
10. according to the method described in claim 9, it is characterized by further comprising:
When the secondary primary server is switched to the primary server, data are updated storage based on the log information.
CN201611221617.1A 2016-12-27 2016-12-27 Distributed memory system and method Active CN106790563B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611221617.1A CN106790563B (en) 2016-12-27 2016-12-27 Distributed memory system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611221617.1A CN106790563B (en) 2016-12-27 2016-12-27 Distributed memory system and method

Publications (2)

Publication Number Publication Date
CN106790563A CN106790563A (en) 2017-05-31
CN106790563B true CN106790563B (en) 2019-11-15

Family

ID=58925699

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611221617.1A Active CN106790563B (en) 2016-12-27 2016-12-27 Distributed memory system and method

Country Status (1)

Country Link
CN (1) CN106790563B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108388487B (en) * 2018-03-01 2020-09-04 上海达梦数据库有限公司 Data loading method, device, equipment and storage medium
CN111277616B (en) * 2018-12-04 2023-11-03 中兴通讯股份有限公司 RDMA-based data transmission method and distributed shared memory system
CN110166542A (en) * 2019-05-16 2019-08-23 广东电网有限责任公司信息中心 Distributed memory system and data read-write method based on ICP/IP protocol
CN110557399A (en) * 2019-09-12 2019-12-10 苏州浪潮智能科技有限公司 Management data synchronization method and device, storage equipment and readable storage medium
CN111653052B (en) * 2020-04-26 2022-06-21 北京三快在线科技有限公司 Cash register system and cash register switching method
CN113656348A (en) * 2021-08-25 2021-11-16 北京微纳星空科技有限公司 Distributed cluster management system and method for satellite application big data

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101278540A (en) * 2005-10-03 2008-10-01 阿玛得斯两合公司 System and method to maintain coherence of cache contents in a multi-tier software system aimed at interfacing large databases
CN102006330A (en) * 2010-12-01 2011-04-06 北京瑞信在线系统技术有限公司 Distributed cache system, data caching method and inquiring method of cache data
CN102629903A (en) * 2011-12-21 2012-08-08 奇智软件(北京)有限公司 System and method for disaster recovery in internet application
CN103516549A (en) * 2013-09-27 2014-01-15 浪潮电子信息产业股份有限公司 File system metadata log mechanism based on shared object storage
CN104317803A (en) * 2014-09-23 2015-01-28 厦门美柚信息科技有限公司 Data access structure and method of database cluster
CN105554143A (en) * 2015-12-25 2016-05-04 浪潮(北京)电子信息产业有限公司 High-availability cache server and data processing method and system thereof

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101278540A (en) * 2005-10-03 2008-10-01 阿玛得斯两合公司 System and method to maintain coherence of cache contents in a multi-tier software system aimed at interfacing large databases
CN102006330A (en) * 2010-12-01 2011-04-06 北京瑞信在线系统技术有限公司 Distributed cache system, data caching method and inquiring method of cache data
CN102629903A (en) * 2011-12-21 2012-08-08 奇智软件(北京)有限公司 System and method for disaster recovery in internet application
CN103516549A (en) * 2013-09-27 2014-01-15 浪潮电子信息产业股份有限公司 File system metadata log mechanism based on shared object storage
CN104317803A (en) * 2014-09-23 2015-01-28 厦门美柚信息科技有限公司 Data access structure and method of database cluster
CN105554143A (en) * 2015-12-25 2016-05-04 浪潮(北京)电子信息产业有限公司 High-availability cache server and data processing method and system thereof

Also Published As

Publication number Publication date
CN106790563A (en) 2017-05-31

Similar Documents

Publication Publication Date Title
CN106790563B (en) Distributed memory system and method
US20210406279A1 (en) System and method for maintaining a master replica for reads and writes in a data store
US11388043B2 (en) System and method for data replication using a single master failover protocol
US10929240B2 (en) System and method for adjusting membership of a data replication group
AU2019203865B2 (en) Consensus system downtime recovery
US9411873B2 (en) System and method for splitting a replicated data partition
US10248704B2 (en) System and method for log conflict detection and resolution in a data store
US11057504B2 (en) System and method for ending view change protocol
CN106685691B (en) The efficient update configuration method of terminal device in Internet of things system
CN103297529B (en) Based on the tree-type structure data synchronous method of timestamp
US7636868B2 (en) Data replication in a distributed system
CN107040594A (en) The method and device of license block chain node access based on PBFT
CN105607954A (en) Stateful container online migration method and apparatus
CN104391930A (en) Distributed file storage device and method
CN109189751A (en) Method of data synchronization and terminal device based on block chain
CN109547512A (en) A kind of method and device of the distributed Session management based on NoSQL
EP4213038A1 (en) Data processing method and apparatus based on distributed storage, device, and medium
CN104468651B (en) Distributed more copy data storage methods and device
CN111400112A (en) Writing method and device of storage system of distributed cluster and readable storage medium
CN105493474A (en) System and method for supporting partition level journaling for synchronizing data in a distributed data grid
US20200127945A1 (en) Consensus system downtime recovery
TW201724001A (en) System and method for acquiring, processing and updating global information
CN106850724A (en) Data push method and device
CN103428288A (en) Method for synchronizing copies on basis of partition state tables and coordinator nodes
CN106331081A (en) Information synchronization method and device

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