CN104573428A - Method and system for improving resource effectiveness of server cluster - Google Patents

Method and system for improving resource effectiveness of server cluster Download PDF

Info

Publication number
CN104573428A
CN104573428A CN201310475814.6A CN201310475814A CN104573428A CN 104573428 A CN104573428 A CN 104573428A CN 201310475814 A CN201310475814 A CN 201310475814A CN 104573428 A CN104573428 A CN 104573428A
Authority
CN
China
Prior art keywords
server
data block
write
data
exclusive
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.)
Granted
Application number
CN201310475814.6A
Other languages
Chinese (zh)
Other versions
CN104573428B (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.)
FOUNDER BROADBAND NETWORK SERVICE CO LTD
Original Assignee
FOUNDER BROADBAND NETWORK SERVICE Co 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 FOUNDER BROADBAND NETWORK SERVICE Co Ltd filed Critical FOUNDER BROADBAND NETWORK SERVICE Co Ltd
Priority to CN201310475814.6A priority Critical patent/CN104573428B/en
Publication of CN104573428A publication Critical patent/CN104573428A/en
Application granted granted Critical
Publication of CN104573428B publication Critical patent/CN104573428B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/062Securing storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]

Abstract

The invention discloses a method and system for improving resource effectiveness of a server cluster. The method comprises the following steps: before a server requests a write operation to certain data, the server is controlled to have the exclusive write authority to the data block, and other servers except the server cannot perform the write operation to the data block; after the server performs the write operation to the data block, an exclusive write permission of the data block is removed. Therefore, when a server needs to perform the write operation to a data block, an operational permission of the data block is only owned by the server, after the server performs the write operation, a rewritten data block is memorized immediately, so that when other servers perform the write operation to the data block again, the data block is not the same as an old version data block. A coordination mechanism provided by the invention can avoid the loss of written data effectively and ensure the integrity and accuracy of data.

Description

A kind of method and system improving server cluster resource availability
Technical field
The present invention relates to domain name the application of cluster server technical field, specifically a kind of data relating to multi-node cluster server and server store, the method and system of buffer memory and the data syn-chronization between client and server cluster.
Background technology
Server cluster comprises one group of separate server, and it shows as triangular web in a network and is managed with the pattern of triangular web.Each station server in server cluster can be regarded as a node.It seems from client, the Servers-all in server cluster, just as a large-scale computer system, it runs the application service that client needs.
In group system, cluster environment configuration file is not what leave concentratedly, but has all deposited environment profile copy on each station server.In group system, can arrange a certain station server is master server, only has master server can change environment profile in theory, and can be synchronized on other servers in group system by the environment profile after change in real time.But when group system is normally run, client can be changed environment profile copy and be changed environment profile by master server on any node server, and this change can be synchronized on other node servers in group system.
When client is modified to environment profile by different node servers, its course of work is as follows:
Revised by a certain data block in server A in moment T01: the first client;
At moment T02: when the amendment that server A is made is not stored on the disk in server A, second client is revised identical data block by server B, also not being stored in disk the amendment of this data block due to server A and not being synchronized on other servers, therefore server B is still carried out when revising this data block on the basis of original data block;
At moment T03: as up-to-date data block on the disk that amendment server A made is stored to server A, and this amendment is synchronized on other servers by master server;
At moment T04: as up-to-date data block on the disk that amendment server B made is stored to server B, and this amendment is synchronized on other servers by master server.
Obviously, server A can cover the retouching operation that this data block is done the retouching operation that data block is done by server B, causes server A all to be lost the operation that this data block is carried out, has had influence on integrality and the correctness of data.
Summary of the invention
Technical matters to be solved by this invention is integrality and the accuracy that the partial write loss of data not carrying out coordinating to cause due to the read operation of data and write operation in server cluster of the prior art has influence on data, thus provides a kind of method and system improving server cluster resource availability.
For solving the problems of the technologies described above, the present invention is achieved by the following technical solutions:
The invention provides a kind of method improving server cluster resource availability, comprise the steps:
Before server request carries out write operation to a certain data, control described server and have exclusive write authority to described data block, other servers outside described server cannot carry out write operation to described data block;
The exclusive write authority of rear releasing to described data block has been grasped in the write of described server to described data block.
Further, the method for described raising server cluster resource availability, the described server of described control comprises the process that described data block has exclusive write authority:
Be confirmed whether that other servers have exclusive write authority to described data block:
If so, after then asking the server with exclusive write authority to discharge the exclusive write authority of described data block, set described server, to described data block, there is exclusive write authority;
If not, then directly the described server of setting has exclusive write authority to described data block.
Further, the method for described raising server cluster resource availability, also comprises the steps:
When described server reads described data block, obtain described data block and record the reading time in the data snapshot of current time simultaneously;
Before on the disk not being stored to described server in described data block:
If other servers have carried out write operation to described data block, then often carry out the data snapshot that write-once operation obtains once described data block and recorded the write time simultaneously;
If there are other servers to carry out read operation to described data block, then the data snapshot corresponding to the write time minimum with the read operation time interval or reading time is sent to the server of asking read operation.
Further, the method for described raising server cluster resource availability, also comprises the steps:
Minimum interval is set;
When there is empty data block in data snapshot, then proceed as follows:
Judge that the reading time of data snapshot at described empty data block place or the interval of the reading time between write time and adjacent data snapshot or write time are more than or equal to described minimum interval:
If so, then described empty data block, as valid data, is retained;
If not, then described empty data block is as invalid data, is deleted.
Further, the method for described raising server cluster resource availability, also comprises the steps:
The buffer memory of each station server is merged, obtains the mirror image data of the data block stored in the buffer memory of each station server;
When a certain data block of a station server acquisition request operates, if the mirror image data of this data block has been stored in the buffer memory of a certain station server, then the mirror image data that this server directly obtains this data block from buffer memory has operated.
Further, the method for described raising server cluster resource availability, also comprises the steps:
Set up Resource TOC list, in described Resource TOC list, record the application service that each station server can provide;
Control the application service that each station server can provide all identical;
Control the services request of client on average on each station server.
The present invention also provides a kind of system improving server cluster resource availability, comprising:
Write operation monitoring module, before server request carries out write operation to a certain data, control described server and have exclusive write authority to described data block, other servers outside described server cannot carry out write operation to described data block;
Also for removing the exclusive write authority to described data block after the write of described server to described data block has been grasped.
Further, the system of described raising server cluster resource availability, described write operation monitoring module controls described server and comprises the process that described data block has exclusive write authority:
Be confirmed whether that other servers have exclusive write authority to described data block:
If so, after then asking the server with exclusive write authority to discharge the exclusive write authority of described data block, set described server, to described data block, there is exclusive write authority;
If not, then directly the described server of setting has exclusive write authority to described data block.
Further, the system of described raising server cluster resource availability, described write operation monitoring module adopts DML process to realize.
Further, the system of described raising server cluster resource availability, also comprises:
Read operation monitoring module, when reading described data block for described server, obtains described data block and records the reading time in the data snapshot of current time simultaneously;
Before on the disk not being stored to described server in described data block:
If other servers have carried out write operation to described data block, then often carry out the data snapshot that write-once operation obtains once described data block and recorded the write time simultaneously;
If there are other servers to carry out read operation to described data block, then the data snapshot corresponding to the write time minimum with the read operation time interval or reading time is sent to the server of asking read operation.
Further, the system of described raising server cluster resource availability, described read operation monitoring module adopts CR process to realize.
Further, the system of described raising server cluster resource availability, also comprises:
The time interval arranges module, for arranging minimum interval;
First than sentencing module, during for occurring empty data block in described data snapshot, proceeds as follows:
Judge that the interval of the reading time of the data snapshot at empty data block place or the reading time between write time and adjacent data snapshot or write time is more than or equal to described minimum interval:
If so, then empty data block, as valid data, is retained;
If not, then empty data block is as invalid data, is deleted.
Further, the system of described raising server cluster resource availability, also comprises:
Buffer memory Fusion Module, for merging the buffer memory of each station server, obtains the mirror image data of the data block stored in the buffer memory of each station server;
Second than sentencing module, for when a certain data block of a station server acquisition request operates, if the mirror image data of this data block has been stored in the buffer memory of a certain server, then the mirror image data that this server directly obtains this data block from buffer memory has operated.
Further, the system of described raising server cluster resource availability, described buffer memory Fusion Module adopts LMON process to realize.
Further, the system of described raising server cluster resource availability, also comprises:
Module is set up in Resource TOC list, for setting up Resource TOC list, records the application service that each station server can provide in described Resource TOC list;
Buffer service module, controls the application service that each station server can provide all identical;
Queue service module, controls the services request of client on average on each station server.
Technique scheme of the present invention has the following advantages compared to existing technology:
(1) method and system of raising server cluster resource availability of the present invention, before server request carries out write operation to a certain data, control this server and have exclusive write authority to this data block, other servers outside this server cannot carry out write operation to this data block.Therefore, when a certain server needs to carry out write operation to a certain data block, this server is only had to have authority to this data block operation, and this server will store by the data block of having rewritten after executing write operation immediately, like this when other server carries out write operation to this data block again, not the data block of legacy version.Adopt the above-mentioned coordination system of the present invention, effectively can avoid the loss writing data, guarantee integrality and the accuracy of data.
(2) method and system of raising server cluster resource availability of the present invention, this server of described control comprises the process that this data block has exclusive write authority: be confirmed whether that other servers have exclusive write authority to this data block: if, after then asking the server with exclusive write authority to discharge the exclusive write authority of this data block, set this server, to this data block, there is exclusive write authority; If not, then directly set this server, to this data block, there is exclusive write authority.In such scheme, before server is rewritten data block each time, be all first confirmed whether that other servers have exclusive write authority to this data block.In actual applications, when there being other servers to have exclusive write authority to this data block, the processing mode that can take has multiple, such as, can wait for the write operation carrying out data block after automatically terminating exclusive write authority after the write operation of other servers to this data block completes again.And the exclusive write authority of directly asking the server with exclusive write authority to discharge this data block has higher data-handling efficiency.
(3) method and system of raising server cluster resource availability of the present invention, also comprise the steps: when a station server reads a certain data block, obtain this data block and record the reading time in the data snapshot of current time simultaneously; Before on the disk not being stored to this server in this data block: if other servers have carried out write operation to this data block, then often carry out the data snapshot that write-once operation obtains once this data block and record the write time simultaneously; If there are other servers to carry out read operation to this data block, then the data snapshot corresponding to the write time minimum to the read operation time interval or reading time is sent to corresponding server.Due to a new data block all can be obtained to the rewriting of data block each time, and data block is stored in the process on the disk of server, need the regular hour, if there are other server requests to read this data block within this time period, can ensure that its data block read is all the data block of latest edition by this programme.
(4) method and system of raising server cluster resource availability of the present invention, also comprise the steps: to arrange minimum interval; When there is empty data block in described data snapshot, then proceed as follows: judge that the interval of the reading time of the data snapshot at empty data block place or the reading time between write time and adjacent data snapshot or write time is more than or equal to described minimum interval: if, then empty data block is as valid data, is retained; If not, then empty data block is as invalid data, is deleted.When chance failure appears in server cluster, data block may be caused clear, namely in the process of digital independent and storage, cause data block surprisingly to be reset.Adopt said method by this unexpected situation and be distinguish the actual conditions that this data block has carried out clear operation really, the result that the clear operation unexpected situation caused obtains weeds out, the accuracy of guarantee data.
(5) method and system of raising server cluster resource availability of the present invention, also comprise the steps: to merge the buffer memory of each station server, obtain the mirror image data of the data block stored in the buffer memory of each station server; When a certain data block of a station server acquisition request operates, if the mirror image data of this data block has been stored in the buffer memory of a certain server, then the mirror image data that this server directly obtains this data block from buffer memory has operated.Because the time from buffer memory required for read block is than the direct time of read block short many from disk, if when therefore having saved the mirror image data of the data block of acquisition request in buffer memory, from buffer memory, directly obtain the mirror image data of data block, for the read operation of some larger data blocks, this programme can increase substantially treatment effeciency.
(6) method and system of raising server cluster resource availability of the present invention, also comprise the steps: to set up Resource TOC list, record the application service that each station server can provide in described Resource TOC list; Control the application service that each station server can provide all identical; Control the services request of client on average on each station server.The state can grasping each station server in server cluster by the form of Resource TOC list and the service that can provide, when there being client-requested to serve, according to the information in Resource TOC list, the request of client can be evenly distributed to proof load equilibrium on each station server as much as possible.
Accompanying drawing explanation
In order to make content of the present invention be more likely to be clearly understood, below in conjunction with accompanying drawing, the present invention is further detailed explanation, wherein,
Fig. 1 is the method flow diagram that one embodiment of the invention improves server cluster resource availability;
Fig. 2 is one embodiment of the invention write operation manner of execution process flow diagram;
Fig. 3 is one embodiment of the invention read operation manner of execution process flow diagram;
Fig. 4 is the schematic diagram of data snapshot chain in an embodiment of the present invention;
Embodiment
embodiment 1
The present embodiment provides a kind of method improving server cluster resource availability, as shown in Figure 1, comprises the steps:
Before server request carries out write operation to a certain data, control described server and have exclusive write authority to described data block, other servers outside described server cannot carry out write operation to described data block;
The exclusive write authority of rear releasing to described data block has been grasped in the write of described server to described data block.
Concrete write operation process is as shown in Figure 2:
At moment T1: server A request carries out write operation to a certain data block, ask, to this data block, there is exclusive write authority;
At moment T2: server A carries out write operation to this data block.
At moment T3: server B request carries out write operation to this data block, ask, to this data block, there is exclusive write authority; At this moment, server A has exclusive write authority to this data block, and therefore server B can not carry out write operation to this data block.
At moment T4: after server A completes the write operation to this data block, the data block of latest edition is stored in the buffer memory of server A and is not also stored on the disk of server A, the exclusive write authority of now server A release to this data block, and the data block of latest edition is passed in the buffer memory of server B from the buffer memory of server A, the data block after server B can operate performing write-once has exclusive write authority; Because server A has released the exclusive write authority to this data block, therefore server A stores the write operation that this data block is carried out, now server B obtain the exclusive write authority of this data block be performed write-once operation after data block basis on carry out, remained the write operation of server A to this data block.
At moment T5: server B carries out write operation to this data block.
Such scheme in obvious employing the present embodiment, when a certain server needs to carry out write operation to a certain data block, this server is only had to have authority to this data block operation, and this server will store by the data block of having rewritten after executing write operation immediately, like this when other server carries out write operation to this data block again, not the data block of legacy version.Adopt the above-mentioned coordination system of the present embodiment, effectively can avoid the loss writing data, guarantee integrality and the accuracy of data.
At this, it should be noted that in server cluster and only have master server can carry out tracing management to above-mentioned exclusive write authority, and master server can select any station server in server cluster.
Each Servers installed service processes DLM can be adopted as in the present embodiment, DLM process primary responsibility transmits the consistance copy data of data block from the buffer memory of the server of this data block of cache request of data block place server, and does not need to carry out disk write.Every station server can have at most 10 DLM processes, and the actual quantity of DLM process can change according to the message communicating flow between server, and client also can use the quantity of the interface Non-follow control DLM process of specifying.Each station server all arranges DML process, but only has the DLM process on master server can manage the exclusive write authority of data block, the DLM process on other servers is all the backups as the DML process on master server.Then the specific implementation of such scheme is as follows:
At moment t1: server A needs to modify to a certain data block, server A reads this data block from local disk, but, before reading, he must notify the intention preparing to do like this himself to the DLM process on master server, DLM process on behalf server A on master server adds an exclusive lock to show that server A has exclusive write authority to this data block to this data block, thus the lock status of data block that tracking server A revises;
At moment t2: the same data block of server B desired modifications, before modification, he must notify to the DLM process on master server that he prepares the intention of this data block of amendment.When the DLM process on master server receives the request from server B, he requires that the owner of current lock and server A discharge this lock, namely the exclusive write authority to this data block is discharged, therefore DLM process guarantees that server B obtains the latest edition of this data block, and writes privilege to his transmission.
At moment t3: server B obtains this data block latest edition of revising of serviced device A, and modifies to it.
At any one time, only have a server example to have the current version of this data block, only have this server can carry out write operation in this data block, thus ensure that the whole amendments to this data block is made all are saved and write disk when needed.The state of lock can be followed the tracks of for each data block being read by the server in cluster and revised, DLM process is a database being present in internal memory, and it contains the relevant information of the lock of all data blocks of the storage in current cluster in each server.
In addition, the present embodiment said write operates, and comprises all operations edited data block, such as, revises content wherein, writes new content or deletion content wherein etc.
In the present embodiment, the described server of described control comprises the process that described data block has exclusive write authority:
Be confirmed whether that other servers have exclusive write authority to described data block:
If so, after then asking the server with exclusive write authority to discharge the exclusive write authority of described data block, set described server, to described data block, there is exclusive write authority.
If not, then directly the described server of setting has exclusive write authority to described data block.
In such scheme, before server is rewritten data block each time, be all first confirmed whether that other servers have exclusive write authority to this data block.In actual applications, when there being other servers to have exclusive write authority to this data block, the processing mode that can take has multiple, such as, can wait for the write operation carrying out data block after automatically terminating exclusive write authority after the write operation of other servers to this data block completes again.And the exclusive write authority of directly asking the server with exclusive write authority to discharge this data block has higher data-handling efficiency.
embodiment 2
The method of the raising server cluster resource availability in the present embodiment, on the basis of embodiment 1, also comprises the step shown in Fig. 3:
When described server reads described data block, obtain described data block and record the reading time in the data snapshot of current time simultaneously.
Before on the disk not being stored to described server in described data block:
If other servers have carried out write operation to described data block, then often carry out the data snapshot that write-once operation obtains once described data block and recorded the write time simultaneously.
If there are other servers to carry out read operation to described data block, then the data snapshot corresponding to the write time minimum with the read operation time interval or reading time is sent to the server of asking read operation.
Such scheme object is the reading data that the write realizing concurrency does not hinder concurrency.Do not need when read data occurs to add data to write lock, can adopt in the present embodiment and each server in the cluster adopt consistance read machine-processed CR to realize keeping in each server reading consistance.With reference to figure 4, specific implementation is described:
For a certain data block, server A reads this data block in the Td moment, and the CR process on master server obtains the data snapshot of this data block at moment Td; During this data block is stored, as long as there are other servers to carry out write operation to this data block, capital obtains the data snapshot of the data block of the latest edition after a data snapshot preservation write operation, as shown in Figure 4, be added in Tx1, Tx2, Tx3 and Tx4 tetra-time points have server to carry out write operation to same data block, CR process then on master server just can obtain the data snapshot on these four time points, and to be kept on local cache and to be synchronized in the buffer memory of other servers.And in this course, add and also have other server to want to obtain this data block, such as at time point Td1 and time point Td2, server request is all had to read this data block, if it directly obtains this data block from disk, it must be the data block of virgin state, and have passed through write-once operation in this data block of time point Td1, three write operations have been have passed through in this data block of time point Td2, if the original data block therefore in direct reading disk, can cause the loss of write operation.And adopt the such scheme in the present embodiment, when reading this data block at time point Td1, what it obtained is the data snapshot of time point Tx1, has saved the mirror image data of the data block of first time write operation in this data snapshot.Same reason, when reading this data block at time Td2, what it obtained is the data snapshot of time point Tx3, has saved the mirror image data of the data block of three write operations in this data snapshot.Therefore when there being the read operation of the write operation of concurrent type frog and concurrent type frog, can't interact between both, and adopt the scheme in the present embodiment, also can not cause the loss of data, ensure that integrality and the accuracy of data.
In the present embodiment, also comprise the steps:
Minimum interval is set.
When there is empty data block in data snapshot, then proceed as follows:
Judge that the reading time of data snapshot at described empty data block place or the interval of the reading time between write time and adjacent data snapshot or write time are more than or equal to described minimum interval:
If so, then described empty data block, as valid data, is retained.
If not, then described empty data block is as invalid data, is deleted.
During the process of CR process, arrange a minimum interval, this gap length is specified by client.Sometimes, when chance failure appears in server cluster, data block may be caused clear, namely in the process of digital independent and storage, cause data block surprisingly to be reset.Adopt said method by this unexpected situation and be distinguish the actual conditions that this data block has carried out clear operation really, the result that the clear operation unexpected situation caused obtains weeds out, the accuracy of guarantee data.
Once this data block is eliminated, but or the interval of the reading time of data snapshot or the reading time between write time and adjacent data snapshot or write time is greater than or minimum interval time, then think that this data block is effective.Because the time interval between two data snapshot is less than the situation that default minimum interval formula should not occur, once there is this situation, think that deletion action occurs what chance failure caused due to group system, in this case think data invalid, deleted.
embodiment 3
The method of the raising server cluster resource availability in the present embodiment, on the basis of embodiment 1 or embodiment 2, also comprises the steps:
The buffer memory of each station server is merged, obtains the mirror image data of the data block stored in the buffer memory of each station server;
When a certain data block of a station server acquisition request operates, if the mirror image data of this data block has been stored in the buffer memory of a certain server, then the mirror image data that this server directly obtains this data block from buffer memory has operated.
Adopt LMON process to realize such scheme in the present embodiment, in each server, LMON process is all set, but identical with described by front, the function only having the LMON process in main control server can realize global buffer to merge.From a server buffer, obtain a data block mirror image, its speed wants far away from reading this data block from server disk.Therefore, under given conditions, buffer memory merges the mirror image data transmitting data block between server buffer, and does not need again from these data blocks of the reading disk, when needing the data block on another server, buffer memory merges can transmit data block mirror image between corresponding server.Such scheme in the present embodiment, for the read operation of some larger data blocks, this programme can increase substantially treatment effeciency.
embodiment 4
The present embodiment does following improvement on the basis of embodiment 1 to embodiment 3 any embodiment, and it also comprises the steps:
Set up Resource TOC list, in described Resource TOC list, record the application service that each station server can provide;
Control the application service that each station server can provide all identical;
Control the services request of client on average on each station server.
Resource TOC list can be set up in shared storage in the present embodiment, topology information in synchronized clusters system between Servers-all, all resource composition in group system pooling of resources database, the service application that each server runs is added up and is constituted Resource TOC list.Meanwhile, two kinds of system service mechanisms are used to monitor Resource TOC list: one is buffer service, and another is queue service.According to the distribution of its weight equality between servers, buffer service coordinates each server of cluster internal to resource in group system, makes each server in internal memory, store same application service or data, and can share between each server; Queue service is responsible for cushioning the client-requested for group system, come then when there being multiple client-requested, first can by Requests routing to the server in cluster, when whole server all has load, user side request will enter service queue, waits for that issuing this server after having server free serves.The request of client can be evenly distributed to proof load equilibrium on each station server according to the information in Resource TOC list by this programme as much as possible.
In addition, as a kind of implementation of the present embodiment, in server cluster system, the process DIAG for meeting the server diagnosis needs in cluster can also be set.Group system needs the running status diagnosing Servers-all, needs to carry out interactive diagnosis among multiple servers, therefore, can diagnose process by independent design DIAG.Diagnose process to introduce DIAG framework with DIAG, this framework can not the normal running of interfere with or compromise group system, if DIAG diagnoses process dead, so process monitoring device can restart a new DIAG and diagnoses process, to continue its service.DIAG diagnoses process also can monitor the health status of group system, when a basic service process failures, DIAG in home server diagnoses process can catch group system state and other useful informations, for diagnosing later, then notify that the DIAG on another server diagnoses process to catch similar information, DIAG diagnoses process to be responsible for active degree monitoring local cluster database or group system Service Instance operated, and performs the recovery operation of any necessity when operation stopping being detected.Diagnostic procedure can adopt conventional establishing a communications link in prior art, when setting up its communication connection between two servers, if two servers are all in normal operating conditions, then one of them server can receive signal that another server sends over and be responded, if a station server sends a signal to another station server but cannot receive the answer signal that another station server returns, then think that it goes wrong, the server gone wrong can be got rid of by group system from cluster, until this server recovers normal again.
embodiment 5
The present embodiment provides a kind of system improving server cluster resource availability, and as shown in Figure 4, it comprises:
Write operation monitoring module, before server request carries out write operation to a certain data, control described server and have exclusive write authority to described data block, other servers outside described server cannot carry out write operation to described data block; Also for removing the exclusive write authority to described data block after the write of described server to described data block has been grasped.
In the such scheme of the present embodiment, when a certain server needs to carry out write operation to a certain data block, this server is only had to have authority to this data block operation, and this server will store by the data block of having rewritten after executing write operation immediately, like this when other server carries out write operation to this data block again, not the data block of legacy version.Adopt the above-mentioned coordination system of the present invention, effectively can avoid the loss writing data, guarantee integrality and the accuracy of data.
In the present embodiment, described write operation monitoring module controls described server and comprises the process that described data block has exclusive write authority:
Be confirmed whether that other servers have exclusive write authority to described data block:
If so, after then asking the server with exclusive write authority to discharge the exclusive write authority of described data block, set described server, to described data block, there is exclusive write authority.
If not, then directly the described server of setting has exclusive write authority to described data block.
In the present embodiment, described write operation monitoring module adopts DML process to realize.
Each Servers installed service processes DLM can be adopted as in the present embodiment, DLM process primary responsibility transmits the consistance copy data of data block from the buffer memory of the server of this data block of cache request of data block place server, and does not need to carry out disk write.Every station server can have at most 10 DLM processes, and the actual quantity of DLM process can change according to the message communicating flow between server, and client also can use the quantity of the interface Non-follow control DLM process of specifying.Each station server all arranges DML process, but only has the DLM process on master server can manage the exclusive write authority of data block, the DLM process on other servers is all the backups as the DML process on master server.Then the specific implementation of such scheme is as follows:
At moment t1: server A needs to modify to a certain data block, server A reads this data block from local disk, but, before reading, he must notify the intention preparing to do like this himself to the DLM process on master server, DLM process on behalf server A on master server adds an exclusive lock to show that server A has exclusive write authority to this data block to this data block, thus the lock status of data block that tracking server A revises;
At moment t2: the same data block of server B desired modifications, before modification, he must notify to the DLM process on master server that he prepares the intention of this data block of amendment.When the DLM process on master server receives the request from server B, he requires that the owner of current lock and server A discharge this lock, namely the exclusive write authority to this data block is discharged, therefore DLM process guarantees that server B obtains the latest edition of this data block, and writes privilege to his transmission.
At moment t3: server B obtains this data block latest edition of revising of serviced device A, and modifies to it.
At any one time, only have a server example to have the current version of this data block, only have this server can carry out write operation in this data block, thus ensure that the whole amendments to this data block is made all are saved and write disk when needed.The state of lock can be followed the tracks of for each data block being read by the server in cluster and revised, DLM process is a database being present in internal memory, and it contains the relevant information of the lock of all data blocks of the storage in current cluster in each server.
In such scheme, before server is rewritten data block each time, be all first confirmed whether that other servers have exclusive write authority to this data block.In actual applications, when there being other servers to have exclusive write authority to this data block, the processing mode that can take has multiple, such as, can wait for the write operation carrying out data block after automatically terminating exclusive write authority after the write operation of other servers to this data block completes again.And the exclusive write authority of directly asking the server with exclusive write authority to discharge this data block has higher data-handling efficiency.
embodiment 6
The system of the raising server cluster resource availability in the present embodiment, on the basis of embodiment 5, also comprises:
Read operation monitoring module, when reading described data block for described server, obtains described data block and records the reading time in the data snapshot of current time simultaneously.
Before on the disk not being stored to described server in described data block:
If other servers have carried out write operation to described data block, then often carry out the data snapshot that write-once operation obtains once described data block and recorded the write time simultaneously.
If there are other servers to carry out read operation to described data block, then the data snapshot corresponding to the write time minimum with the read operation time interval or reading time is sent to the server of asking read operation.
In the present embodiment, described read operation monitoring module adopts CR process to realize.
Such scheme object is the reading data that the write realizing concurrency does not hinder concurrency.Do not need when read data occurs to add data to write lock, can adopt in the present embodiment and each server in the cluster adopt consistance read machine-processed CR to realize keeping in each server reading consistance.
Said system in the present embodiment also comprises:
The time interval arranges module, for arranging minimum interval;
First than sentencing module, during for occurring empty data block in described data snapshot, proceeds as follows:
Judge that the interval of the reading time of the data snapshot at empty data block place or the reading time between write time and adjacent data snapshot or write time is more than or equal to described minimum interval:
If so, then empty data block, as valid data, is retained;
If not, then empty data block is as invalid data, is deleted.
During the process of CR process, arrange a minimum interval, this gap length is specified by client.Sometimes, when chance failure appears in server cluster, data block may be caused clear, namely in the process of digital independent and storage, cause data block surprisingly to be reset.Adopt said method by this unexpected situation and be distinguish the actual conditions that this data block has carried out clear operation really, the result that the clear operation unexpected situation caused obtains weeds out, the accuracy of guarantee data.
Once this data block is eliminated, but or the interval of the reading time of data snapshot or the reading time between write time and adjacent data snapshot or write time is greater than or minimum interval time, then think that this data block is effective.Because the time interval between two data snapshot is less than the situation that default minimum interval formula should not occur, once there is this situation, think that deletion action occurs what chance failure caused due to group system, in this case think data invalid, deleted.
embodiment 7
The system of the raising server cluster resource availability described in the present embodiment, on the basis of embodiment 5 or embodiment 6, also comprises:
Buffer memory Fusion Module, for merging the buffer memory of each station server, obtains the mirror image data of the data block stored in the buffer memory of each station server;
Second than sentencing module, for when a certain data block of a station server acquisition request operates, if the mirror image data of this data block has been stored in the buffer memory of a certain server, then the mirror image data that this server directly obtains this data block from buffer memory has operated.
Wherein, described buffer memory Fusion Module adopts LMON process to realize.
In each server, LMON process is all set, but identical with described by front, the function only having the LMON process in main control server can realize global buffer to merge.From a server buffer, obtain a data block mirror image, its speed wants far away from reading this data block from server disk.Therefore, under given conditions, buffer memory merges the mirror image data transmitting data block between server buffer, and does not need again from these data blocks of the reading disk, when needing the data block on another server, buffer memory merges can transmit data block mirror image between corresponding server.Such scheme in the present embodiment, for the read operation of some larger data blocks, this programme can increase substantially treatment effeciency.
embodiment 8
The present embodiment, on the basis of embodiment 5 to embodiment 7 any embodiment, also comprises:
Module is set up in Resource TOC list, for setting up Resource TOC list, records the application service that each station server can provide in described Resource TOC list;
Buffer service module, controls the application service that each station server can provide all identical.
Queue service module, controls the services request of client on average on each station server.
Resource TOC list can be set up in shared storage in the present embodiment, topology information in synchronized clusters system between Servers-all, all resource composition in group system pooling of resources database, the service application that each server runs is added up and is constituted Resource TOC list.Meanwhile, two kinds of system service mechanisms are used to monitor Resource TOC list: one is buffer service, and another is queue service.According to the distribution of its weight equality between servers, buffer service coordinates each server of cluster internal to resource in group system, makes each server in internal memory, store same application service or data, and can share between each server; Queue service is responsible for cushioning the client-requested for group system, come then when there being multiple client-requested, first can by Requests routing to the server in cluster, when whole server all has load, user side request will enter service queue, waits for that issuing this server after having server free serves.The request of client can be evenly distributed to proof load equilibrium on each station server according to the information in Resource TOC list by this programme as much as possible.
In addition, as a kind of implementation of the present embodiment, in server cluster system, the process DIAG for meeting the server diagnosis needs in cluster can also be set.Group system needs the running status diagnosing Servers-all, needs to carry out interactive diagnosis among multiple servers, therefore, can diagnose process by independent design DIAG.Diagnose process to introduce DIAG framework with DIAG, this framework can not the normal running of interfere with or compromise group system, if DIAG diagnoses process dead, so process monitoring device can restart a new DIAG and diagnoses process, to continue its service.DIAG diagnoses process also can monitor the health status of group system, when a basic service process failures, DIAG in home server diagnoses process can catch group system state and other useful informations, for diagnosing later, then notify that the DIAG on another server diagnoses process to catch similar information, DIAG diagnoses process to be responsible for active degree monitoring local cluster database or group system Service Instance operated, and performs the recovery operation of any necessity when operation stopping being detected.Diagnostic procedure can adopt conventional establishing a communications link in prior art, when setting up its communication connection between two servers, if two servers are all in normal operating conditions, then one of them server can receive signal that another server sends over and be responded, if a station server sends a signal to another station server but cannot receive the answer signal that another station server returns, then think that it goes wrong, the server gone wrong can be got rid of by group system from cluster, until this server recovers normal again.
The present invention describes with reference to according to the process flow diagram of the method for the embodiment of the present invention, equipment (system) and computer program and/or block scheme.Should understand can by the combination of the flow process in each flow process in computer program instructions realization flow figure and/or block scheme and/or square frame and process flow diagram and/or block scheme and/or square frame.These computer program instructions can being provided to the processor of multi-purpose computer, special purpose computer, Embedded Processor or other programmable data processing device to produce a machine, making the instruction performed by the processor of computing machine or other programmable data processing device produce device for realizing the function of specifying in process flow diagram flow process or multiple flow process and/or block scheme square frame or multiple square frame.These computer program instructions also can be stored in can in the computer-readable memory that works in a specific way of vectoring computer or other programmable data processing device, the instruction making to be stored in this computer-readable memory produces the manufacture comprising command device, and this command device realizes the function of specifying in process flow diagram flow process or multiple flow process and/or block scheme square frame or multiple square frame.These computer program instructions also can be loaded in computing machine or other programmable data processing device, make on computing machine or other programmable devices, to perform sequence of operations step to produce computer implemented process, thus the instruction performed on computing machine or other programmable devices is provided for the step realizing the function of specifying in process flow diagram flow process or multiple flow process and/or block scheme square frame or multiple square frame.Although describe the preferred embodiments of the present invention, those skilled in the art once obtain the basic creative concept of cicada, then can make other change and amendment to these embodiments.Obviously, those skilled in the art can carry out various change and modification to the present invention and not depart from the spirit and scope of the present invention.Like this, if these amendments of the present invention and modification belong within the scope of the claims in the present invention and equivalent technologies thereof, then the present invention is also intended to comprise these change and modification.

Claims (10)

1. improve a method for server cluster resource availability, it is characterized in that, comprise the steps:
Before server request carries out write operation to a certain data, control described server and have exclusive write authority to described data block, other servers outside described server cannot carry out write operation to described data block;
The exclusive write authority of rear releasing to described data block has been grasped in the write of described server to described data block.
2. the method for raising server cluster resource availability according to claim 1, is characterized in that, the described server of described control comprises the process that described data block has exclusive write authority:
Be confirmed whether that other servers have exclusive write authority to described data block:
If so, after then asking the server with exclusive write authority to discharge the exclusive write authority of described data block, set described server, to described data block, there is exclusive write authority;
If not, then directly the described server of setting has exclusive write authority to described data block.
3. the method for raising server cluster resource availability according to claim 1 and 2, is characterized in that, also comprise the steps:
When described server reads described data block, obtain described data block and record the reading time in the data snapshot of current time simultaneously;
Before on the disk not being stored to described server in described data block:
If other servers have carried out write operation to described data block, then often carry out the data snapshot that write-once operation obtains once described data block and recorded the write time simultaneously;
If there are other servers to carry out read operation to described data block, then the data snapshot corresponding to the write time minimum with the read operation time interval or reading time is sent to the server of asking read operation.
4. the method for raising server cluster resource availability according to claim 3, is characterized in that, also comprise the steps:
Minimum interval is set;
When there is empty data block in data snapshot, then proceed as follows:
Judge that the reading time of data snapshot at described empty data block place or the interval of the reading time between write time and adjacent data snapshot or write time are more than or equal to described minimum interval:
If so, then described empty data block, as valid data, is retained;
If not, then described empty data block is as invalid data, is deleted.
5., according to the method for the arbitrary described raising server cluster resource availability of claim 1-4, it is characterized in that, also comprise the steps:
The buffer memory of each station server is merged, obtains the mirror image data of the data block stored in the buffer memory of each station server;
When a certain data block of a station server acquisition request operates, if the mirror image data of this data block has been stored in the buffer memory of a certain station server, then the mirror image data that this server directly obtains this data block from buffer memory has operated.
6., according to the method for the arbitrary described raising server cluster resource availability of claim 1-5, it is characterized in that, also comprise the steps:
Set up Resource TOC list, in described Resource TOC list, record the application service that each station server can provide;
Control the application service that each station server can provide all identical;
Control the services request of client on average on each station server.
7. improve a system for server cluster resource availability, it is characterized in that, comprising:
Write operation monitoring module, before server request carries out write operation to a certain data, control described server and have exclusive write authority to described data block, other servers outside described server cannot carry out write operation to described data block;
Also for removing the exclusive write authority to described data block after the write of described server to described data block has been grasped.
8. the system of raising server cluster resource availability according to claim 7, is characterized in that, described write operation monitoring module controls described server and comprises the process that described data block has exclusive write authority:
Be confirmed whether that other servers have exclusive write authority to described data block:
If so, after then asking the server with exclusive write authority to discharge the exclusive write authority of described data block, set described server, to described data block, there is exclusive write authority;
If not, then directly the described server of setting has exclusive write authority to described data block.
9. the system of the raising server cluster resource availability according to claim 7 or 8, is characterized in that, described write operation monitoring module adopts DML process to realize.
10., according to the system of the arbitrary described raising server cluster resource availability of claim 7-9, it is characterized in that, also comprise:
Read operation monitoring module, when reading described data block for described server, obtains described data block and records the reading time in the data snapshot of current time simultaneously;
Before on the disk not being stored to described server in described data block:
If other servers have carried out write operation to described data block, then often carry out the data snapshot that write-once operation obtains once described data block and recorded the write time simultaneously;
If there are other servers to carry out read operation to described data block, then the data snapshot corresponding to the write time minimum with the read operation time interval or reading time is sent to the server of asking read operation.
CN201310475814.6A 2013-10-12 2013-10-12 A kind of method and system for improving server cluster resource availability Expired - Fee Related CN104573428B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310475814.6A CN104573428B (en) 2013-10-12 2013-10-12 A kind of method and system for improving server cluster resource availability

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310475814.6A CN104573428B (en) 2013-10-12 2013-10-12 A kind of method and system for improving server cluster resource availability

Publications (2)

Publication Number Publication Date
CN104573428A true CN104573428A (en) 2015-04-29
CN104573428B CN104573428B (en) 2018-02-13

Family

ID=53089471

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310475814.6A Expired - Fee Related CN104573428B (en) 2013-10-12 2013-10-12 A kind of method and system for improving server cluster resource availability

Country Status (1)

Country Link
CN (1) CN104573428B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107066877A (en) * 2017-03-31 2017-08-18 武汉票据交易中心有限公司 A kind of permission modification method and system of transaction system
CN108153492A (en) * 2017-12-22 2018-06-12 联想(北京)有限公司 Data processing method, system and electronic equipment
CN109992566A (en) * 2019-04-12 2019-07-09 苏州浪潮智能科技有限公司 A kind of file access method, device, equipment and readable storage medium storing program for executing
CN110442372A (en) * 2019-08-12 2019-11-12 安徽赛福贝特信息技术有限公司 A kind of preservation management system for software development
CN112491986A (en) * 2016-02-29 2021-03-12 华为技术有限公司 Method, device and system for distributing commands in distributed system
CN112511359A (en) * 2021-02-04 2021-03-16 上海爱可生信息技术股份有限公司 Method, system and computer readable storage medium for configuration change in service system

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1786918A (en) * 2004-12-10 2006-06-14 惠普开发有限公司 Distributed lock
CN101090401A (en) * 2007-05-25 2007-12-19 金蝶软件(中国)有限公司 Data buffer store method and system at duster environment
CN101149755A (en) * 2007-10-25 2008-03-26 中国科学院计算技术研究所 Distributed file system file writing system and method
US7552122B1 (en) * 2004-06-01 2009-06-23 Sanbolic, Inc. Methods and apparatus facilitating access to storage among multiple computers
US20100011178A1 (en) * 2008-07-14 2010-01-14 Vizioncore, Inc. Systems and methods for performing backup operations of virtual machine files
CN102088484A (en) * 2010-12-20 2011-06-08 南京中兴新软件有限责任公司 Write lock method of distributed file system and a system thereof
CN102355473A (en) * 2011-06-28 2012-02-15 用友软件股份有限公司 Locking control system in distributed computing environment and method
CN102834822A (en) * 2010-04-12 2012-12-19 微软公司 Express-full backup of a cluster shared virtual machine

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7552122B1 (en) * 2004-06-01 2009-06-23 Sanbolic, Inc. Methods and apparatus facilitating access to storage among multiple computers
CN1786918A (en) * 2004-12-10 2006-06-14 惠普开发有限公司 Distributed lock
CN101090401A (en) * 2007-05-25 2007-12-19 金蝶软件(中国)有限公司 Data buffer store method and system at duster environment
CN101149755A (en) * 2007-10-25 2008-03-26 中国科学院计算技术研究所 Distributed file system file writing system and method
US20100011178A1 (en) * 2008-07-14 2010-01-14 Vizioncore, Inc. Systems and methods for performing backup operations of virtual machine files
CN102834822A (en) * 2010-04-12 2012-12-19 微软公司 Express-full backup of a cluster shared virtual machine
CN102088484A (en) * 2010-12-20 2011-06-08 南京中兴新软件有限责任公司 Write lock method of distributed file system and a system thereof
CN102355473A (en) * 2011-06-28 2012-02-15 用友软件股份有限公司 Locking control system in distributed computing environment and method

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112491986A (en) * 2016-02-29 2021-03-12 华为技术有限公司 Method, device and system for distributing commands in distributed system
CN112491986B (en) * 2016-02-29 2022-07-29 华为技术有限公司 Method, device and system for distributing commands in distributed system
CN107066877A (en) * 2017-03-31 2017-08-18 武汉票据交易中心有限公司 A kind of permission modification method and system of transaction system
CN108153492A (en) * 2017-12-22 2018-06-12 联想(北京)有限公司 Data processing method, system and electronic equipment
CN109992566A (en) * 2019-04-12 2019-07-09 苏州浪潮智能科技有限公司 A kind of file access method, device, equipment and readable storage medium storing program for executing
CN110442372A (en) * 2019-08-12 2019-11-12 安徽赛福贝特信息技术有限公司 A kind of preservation management system for software development
CN112511359A (en) * 2021-02-04 2021-03-16 上海爱可生信息技术股份有限公司 Method, system and computer readable storage medium for configuration change in service system
CN112511359B (en) * 2021-02-04 2021-05-07 上海爱可生信息技术股份有限公司 Method, system and computer readable storage medium for configuration change in service system

Also Published As

Publication number Publication date
CN104573428B (en) 2018-02-13

Similar Documents

Publication Publication Date Title
CN102103518B (en) System for managing resources in virtual environment and implementation method thereof
US10795863B2 (en) Geographically-distributed file system using coordinated namespace replication over a wide area network
CN104573428A (en) Method and system for improving resource effectiveness of server cluster
CN105607954B (en) A kind of method and apparatus that stateful container migrates online
US9984140B1 (en) Lease based leader election system
CN102981931B (en) Backup method and device for virtual machine
CN110784350B (en) Design method of real-time high-availability cluster management system
CN109857445A (en) Storage system and control software layout method
US9495381B2 (en) Geographically-distributed file system using coordinated namespace replication over a wide area network
CN106446159B (en) A kind of method of storage file, the first virtual machine and name node
CN102882927A (en) Cloud storage data synchronizing framework and implementing method thereof
CN110427299A (en) Log processing method, relevant device and the system of micro services system application
US10747776B2 (en) Replication control using eventually consistent meta-data
CN103973791B (en) The quick unified storage system of Internet of Things
CN104268001B (en) A kind of method for creating virtual machine and the device for creating virtual machine
CN108491504A (en) Method and device for decentralized configuration management
CN103902405A (en) Quasi-continuity data replication method and device
CN109783468A (en) Database switching method and system, medium and computer system
KR20220052654A (en) High availability distribution intelligence system using message transmission bus and intelligence cluster system
CN111541599B (en) Cluster software system and method based on data bus
CN105760391A (en) Data dynamic redistribution method and system, data node and name node
CN109388668B (en) Method for exchanging data between engineering tools of engineering system and engineering system
CN110659303A (en) Read-write control method and device for database nodes
CN110309224A (en) A kind of data copy method and device
CN116723077A (en) Distributed IT automatic operation and maintenance system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 100088 Beijing City, Haidian District Institute of Road No. 15, North Building B block 5 layer

Patentee after: FOUNDER BROADBAND NETWORK SERVICE Co.,Ltd.

Address before: 100088 Beijing City, Haidian District Institute of Road No. 15, North Building B block 5 layer

Patentee before: FOUNDER BROADBAND NETWORK SERVICE Co.,Ltd.

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20180213

Termination date: 20211012