CN104980307A - Processing method of data access requests, processing device of data access requests and database server - Google Patents
Processing method of data access requests, processing device of data access requests and database server Download PDFInfo
- Publication number
- CN104980307A CN104980307A CN201510370222.7A CN201510370222A CN104980307A CN 104980307 A CN104980307 A CN 104980307A CN 201510370222 A CN201510370222 A CN 201510370222A CN 104980307 A CN104980307 A CN 104980307A
- Authority
- CN
- China
- Prior art keywords
- server
- module
- cluster
- log
- access request
- 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.)
- Pending
Links
Landscapes
- Debugging And Monitoring (AREA)
Abstract
The invention relates to a processing method of data access requests, a processing device of data access requests and a database server. The processing method and device are applied to a server node. The server node includes a cluster proxy module and a database module. The method includes the following steps that: an access request from a web server is received by the cluster proxy module; an operation command in the access request is written into a log server in a set format, so that the log server can synchronize the operation command to other server nodes in a server cluster where the server node is located; and the database module executes the operation command. With the processing method, processing device and the database server provided by the technical schemes of the invention adopted, the web server can still obtain service data required by the access request from the other server nodes in the server cluster under the situation that data loss exists on the database module in the server node, and therefore, availability of the server cluster can be improved.
Description
Technical field
The disclosure relates to Internet technical field, particularly relates to a kind of processing method of data access request, device and database server.
Background technology
Redis is one of at present the fastest NO-SQL database, the key core business of each enterprise all adopt redis as caching server.Redis has extremely strong performance, and provides abundant data structure, therefore can solve many key performance problems more compactly.But redis does the risk that caching server can exist loss of data.
Summary of the invention
For overcoming Problems existing in correlation technique, disclosure embodiment provides a kind of processing method of data access request, device and database server.
According to the first aspect of disclosure embodiment, provide a kind of processing method of data access request, be applied on server node, described server node comprises cluster proxy module and database module, comprising:
The access request from Website server is received by described cluster proxy module;
Operational order in described access request is written in log server to set form, for described log server described operational order is synchronized on other server node in the server cluster at described server node place;
Described operational order is performed by described database module.
In one embodiment, described method also can comprise:
Obtained the log information of other server node in the server cluster at the described server node place of recording in described log server by described cluster proxy module, the described log information on described log server is handed down to described database module;
The operational order in described log information is performed by described database module.
The log content stored in local system is synchronized to other server node in server cluster by log server, thus upper guarantee log information can not be lost by log server to greatest extent, makes the data of the Servers-all node in server cluster accomplish quasi real time synchronous.
In one embodiment, described method also can comprise:
Do not get the described log information on described log server at described cluster proxy module before, if described log server exists abnormal, described log information is stored in the local system of described log server.
When log server exists extremely and the log information on it is not yet synchronized to other server node in server cluster by log server, by being temporarily stored in local system by log information, can guarantee that log information is not lost by log server.
In one embodiment, described method also can comprise:
Receive the synch command from described log server by described cluster proxy module, described synch command is transmitted to described database module;
After described database module is finished described synch command, sends to described log server and confirm notification message.
The log information of other server node in the server cluster at the server node place of recording in log server is obtained by cluster proxy module, log information is handed down to database module, achieves the synchronous of the log information of the Servers-all node on server cluster.
In one embodiment, describedly receive access request from Website server by described cluster proxy module, can comprise:
Determine the number of the access request whether described cluster proxy module receives in setting-up time section;
If the number of the described access request that described cluster proxy module receives in described setting-up time section reaches setting number, by pipeline mechanism, the packing of the operational order of the setting number in the access request of described setting number is issued to described database module.
By pipeline mechanism, when cluster proxy module receives more operational order in setting-up time section, time saving degree of convergence can be larger, can reduce the network overhead between cluster proxy module and database module further.
In one embodiment, described method also can comprise:
Determine whether described cluster proxy module connects with described log server;
When described cluster proxy module can not connect with described log server, the operational order in described access request is written in the file system in described cluster proxy module with described setting form;
After determining to connect with described log server, the log information that described file system records is write described log server.
When cluster proxy module cannot be connected to log server, daily record is temporarily stored in file system by cluster proxy module, after detecting that log server recovers normally, can disposable daily record in file system be re-write in log server, thus above ensure that log information described on log server can record the historical operation record of server node exactly, guarantees that the business datum of server nodes all in server cluster quasi real time can be supplied to Website server to greatest extent.
In one embodiment, described method also can comprise:
Receive the request from the address information for obtaining the surviving node in the server cluster at described server node place of described Website server timed sending, described surviving node is for normally providing the server node of business datum in described server cluster;
If described server node is described surviving node, according to described request, the address information of described server node is returned to described Website server by described cluster proxy module.
When any station server node can not use in server cluster, Website server can be made to obtain business datum to the surviving node in server cluster, thus ensure that the high availability of server cluster.
According to the second aspect of disclosure embodiment, a kind of processing unit of data access request is provided, comprises:
First receiver module, is configured to by the access request of described cluster proxy module reception from Website server;
First writing module, the operational order be configured in the described access request received by described first receiver module is written in log server to set form, described operational order to be synchronized on other server node in the server cluster at described server node place for described log server;
Command execution module, is configured to the operational order in the described access request received by described first receiver module of described database module execution.
In one embodiment, described device also can comprise:
Acquisition module, be configured to the log information being obtained other server node in the server cluster at the described server node place of recording in described log server by described cluster proxy module, described log information is handed down to described database module;
Described command execution module is also configured the operational order performed by described database module in described log information.
In one embodiment, described device also can comprise:
First memory module, before being configured to not get the described log information on described log server at described cluster proxy module, if described log server exists abnormal, is stored in described log information in the local system of described log server.
In one embodiment, described first receiver module can comprise:
First determines submodule, is configured to determine whether described cluster proxy module receives the access request of setting number in setting-up time section;
Issue submodule, if be configured to described first to determine that submodule determines that the number of the described access request that described cluster proxy module receives in described setting-up time section reaches setting number, by pipeline mechanism, the packing of the operational order of the setting number in the access request of described setting number is issued to described database module.
In one embodiment, described device also can comprise:
First determination module, is configured to determine whether described cluster proxy module connects with described log server;
Second writing module, is configured to, when described cluster proxy module can not connect with described log server, be written in the file system in described cluster proxy module by the operational order in described access request with described setting form;
3rd writing module, is configured to, after determining to connect with described log server, the log information that described file system records be write described log server.
In one embodiment, described device also can comprise:
Second receiver module, be configured to receive the request from the address information for obtaining the surviving node in the server cluster at described server node place of described Website server timed sending, described surviving node is for normally providing the server node of business datum in described server cluster;
Return module, if being configured to described server node is described surviving node, the address information of described server node is returned to described Website server by the described request received according to described second receiver module by described cluster proxy module.
According to the third aspect of disclosure embodiment, a kind of database server is provided, comprises:
Processor;
For the memory of storage of processor executable instruction;
Wherein, described processor is configured to:
The access request from Website server is received by described cluster proxy module;
Operational order in described access request is written in log server to set form, for described log server described operational order is synchronized on other server node in the server cluster at described server node place;
Described operational order is performed by described database module.
The technical scheme that embodiment of the present disclosure provides can comprise following beneficial effect: by being written in log server by the operational order in access request to set form, log server can be made the log information of this server node to be synchronized to other server node in the server cluster at book server node place, even if it is abnormal to guarantee that server node occurs thus, Website server still gets business datum by other server node in server cluster, when there is loss of data in the database module in server node, Website server still can get the business datum required for access request by other server node in server cluster, improve the availability of server cluster.
Should be understood that, it is only exemplary and explanatory that above general description and details hereinafter describe, and can not limit the disclosure.
Accompanying drawing explanation
Accompanying drawing to be herein merged in specification and to form the part of this specification, shows embodiment according to the invention, and is used from specification one and explains principle of the present invention.
Fig. 1 is the Organization Chart of the server library cluster according to an exemplary embodiment.
Fig. 2 is the flow chart of the processing method of data access request according to an exemplary embodiment.
Fig. 3 is the flow chart of the processing method of data access request according to an exemplary embodiment one.
Fig. 4 is the flow chart of the processing method of data access request according to an exemplary embodiment two.
Fig. 5 is the flow chart of the processing method of data access request according to an exemplary embodiment three.
Fig. 6 is the flow chart of the processing method of data access request according to an exemplary embodiment four.
Fig. 7 is the scene graph of the processing method of data access request according to an exemplary embodiment six.
Fig. 8 is the block diagram of the processing unit of a kind of data access request according to an exemplary embodiment.
Fig. 9 is the block diagram of the processing unit of another kind of data access request according to an exemplary embodiment.
Figure 10 is a kind of block diagram being applicable to caching server according to an exemplary embodiment.
Embodiment
Here will be described exemplary embodiment in detail, its sample table shows in the accompanying drawings.When description below relates to accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawing represents same or analogous key element.Execution mode described in following exemplary embodiment does not represent all execution modes consistent with the present invention.On the contrary, they only with as in appended claims describe in detail, the example of apparatus and method that aspects more of the present invention are consistent.
Fig. 1 is the Organization Chart of the server cluster according to an exemplary embodiment; As shown in Figure 1, the client of data-base cluster is Website server 11, and the server end 10 of data-base cluster comprises server node 12, server node 13, server node 14 and log server 15.Wherein, server node comprises cluster proxy module 121 and database module 122, and the access of the database module in Website server 11 pairs of server nodes is acted on behalf of by cluster proxy module 121 and realized; Log server 13 can be independently database server, also can be file system, reads the state information of server node in the log recording of cluster proxy module and cluster for preserving Website server 11.It will be appreciated by persons skilled in the art that the server node of three shown in Fig. 1 only not illustrated property to illustrate and unrestricted, the number of the disclosure to the server node in server cluster does not limit.
Fig. 2 is the flow chart of the processing method of data access request according to an exemplary embodiment; The processing method of this data access request can be applied on server node, and server node comprises cluster proxy module as shown in Figure 1 and database module, and as shown in Figure 2, the processing method of this data access request comprises the following steps S201-S203:
In step s 201, the access request from Website server is received by cluster proxy module.
In one embodiment, access request from Website server can trigger generation by user by sending service request to Website server, such as, user needs the request to Website server panic buying admission ticket, and Website server sends access request according to the request of this panic buying admission ticket to cluster proxy module.In one embodiment, access request can carry corresponding operational order, is write or read business datum by operational order.
In step S202, the operational order in access request is written in log server to set form, for log server described operational order is synchronized on other server node in the server cluster at server node place.
In one embodiment, when operational order is write log server, timestamp can be comprised, by subsidiary for operational order after timestamp, such as: 2015-06-1720:01:41 in setting form, 287-__main__-INFO-new values of key<t_list_493991>is [6692184,6692186,6692188,6692190,6692192,6692195,6692198,6692201,6692204,6692208,6692212,6692216], wherein, " 2015-06-1720:01:41 " is timestamp.
In another embodiment, when operational order is write log server, the address information of Website server can be comprised in setting form, by subsidiary for operational order after address information, such as: 1434609148.955415 [0 10.201.30.147:45861] " LRANGE " " t_list_454348 " " 0 " " 19 "
1434609148.955421[0 10.201.30.147:45861]"LLEN""t_list_454348"
1434609148.955424[0 10.201.30.147:45861]"EXEC"
1434609148.957761[0 10.201.30.147:45861]"MULTI"
1434609148.957769[0 10.201.30.147:45861]"LRANGE""t_list_458194""0""19"。Wherein, " 1434609148.955415 " represent timestamp, and [0 10.201.30.147:45861] represents the address information of Website server.
In step S203, by database module operation command.
In one embodiment, if operational order is write order, database module can write business datum according to write order in database module; In another embodiment, if operational order is read command, database module can read business datum according to read command from database module.
In the present embodiment, by the operational order in access request is written in log server to set form, log server can be made the log information of this server node to be synchronized to other server node in the server cluster at book server node place, even if it is abnormal to guarantee that server node occurs thus, Website server still gets business datum by other server node in server cluster, when there is loss of data in the database module in server node, Website server still can get the business datum required for access request by other server node in server cluster, improve the availability of server cluster.
In one embodiment, method also can comprise:
Obtained the log information of other server node in the server cluster at the server node place of recording in log server by cluster proxy module, the log information on log server is handed down to database module;
By the operational order in database module execution journal information.
In one embodiment, method also can comprise:
Do not get the log information on log server at cluster proxy module before, if log server exists abnormal.
In one embodiment, method also can comprise:
Receive the synch command from log server by cluster proxy module, synch command is transmitted to database module;
After database module is finished synch command, sends to log server and confirm notification message.
In one embodiment, receive the access request from Website server by cluster proxy module, comprising:
Determine whether cluster proxy module receives the access request of setting number in setting-up time section;
If when cluster proxy module receives the access request of setting number in setting-up time section, by pipeline mechanism, the packing of the operational order of the setting number in the access request of setting number is issued to database module.
In one embodiment, method also can comprise:
Determine whether cluster proxy module connects with log server;
When cluster proxy module can not connect with log server, by the operational order in access request with in the file system setting form and be written in cluster proxy module;
After determining to connect with log server, the log information write log server that file system is recorded.
In one embodiment, method also can comprise:
Receive the request from the address information for obtaining the surviving node in the server cluster at server node place of Website server timed sending, wherein, surviving node is for normally providing the server node of business datum in server cluster;
If server node is surviving node, according to request, the address information of server node is returned to Website server by cluster proxy module.
Concrete how performing database operational order on server node, please refer to subsequent embodiment.
So far, the said method that disclosure embodiment provides, can the database module in server node when there is loss of data, Website server still can get the business datum required for access request by other server node in server cluster, improve the availability of server cluster.
With specific embodiment, the technical scheme that disclosure embodiment provides is described below.
Fig. 3 is the flow chart of the processing method of data access request according to an exemplary embodiment one; The said method that the present embodiment utilizes disclosure embodiment to provide, for the log information of other server node in server node how synchronization server cluster and composition graphs 1 carries out exemplary illustration, as shown in Figure 3, comprises the steps:
In step S301, do not get the log information on log server at cluster proxy module before, determine whether log server exists exception, if there is not exception in log server, perform step S302, if log server exists abnormal, perform step S304.
In one embodiment, the exception that log server 15 exists can comprise: log server 15 occur power-off, operator's misoperation log server 15, log server 15 place network link shake, log server 15 loses the situation that connection etc. can not normally be connected with server node.In one embodiment, according to whether connecting with log server, cluster proxy module can determine whether log server 14 exists exception, or the exception of existence is informed to cluster proxy module by log server 15.
In step s 302, obtained the log information of other server node in the server cluster at the server node place of recording in log server by cluster proxy module, log information is handed down to database module.
In step S303, by the operational order in database module execution journal information, flow process terminates.
In one embodiment, cluster proxy module can read the log information of other server node in log server by startup rear end thread, database module is by the operational order in the log information of another rear end other server node of thread execution.
In step s 304, the log information on log server is stored in the local system of log server.
In one embodiment, local system file can be the back-up storage module of log server 15, when there is exception in log server 15 and the log information on it is not yet synchronized to other server node in server cluster by log server, do not lost by log server in order to ensure log information, log information temporarily can be stored in local system, after waiting for that log server recovers, the log content stored in local system is synchronized to other server node in server cluster by log server.
In the present embodiment, the log information of other server node in the server cluster at the server node place of recording in log server is obtained by cluster proxy module, log information is handed down to database module, achieves the synchronous of the log information of the Servers-all node on server cluster; The log content stored in local system is synchronized to other server node in server cluster by log server, thus upper guarantee log information can not be lost by log server to greatest extent, makes the data of the Servers-all node in server cluster accomplish quasi real time synchronous.
Fig. 4 is the flow chart of the processing method of data access request according to an exemplary embodiment two; How the said method that the present embodiment utilizes disclosure embodiment to provide, be issued to database module by access request for cluster proxy module and composition graphs 1 carries out exemplary illustration, as shown in Figure 4, comprises the steps:
In step S401, determine the number of the access request that cluster proxy module receives in setting-up time section.
In one embodiment, when the access request of Website server is more, the number of the access request that cluster proxy module receives in setting-up time section may exceed setting number, if cluster proxy module receives the access request of setting number in setting-up time section, perform step S402, if the access request that cluster proxy module receives setting number in setting-up time section does not exceed setting number, the operational order in the access request received directly can be issued to database module.
In step S402, by pipeline mechanism, the packing of the operational order of the setting number in the access request of setting number is issued to database module.
In step S403, by database module operation command, flow process terminates.
The description of step S403 refers to the description of above-mentioned steps S203, is not described in detail in this.
In the present embodiment, such as, setting-up time section is 5 minutes, setting number is 10, cluster proxy module is when have received the access request of 10 in 5 minutes, 10 access request can be issued to database module by pipeline mechanism (pipeline) by cluster proxy module, thus the operational order in these 10 access request of the disposable execution of database module can be made, such as, article 10, the operational order of access request is redis.cmd1 (), redis.cmd2 (), redis.cmd3 (), redis.cmd10 (), redis.pipeline () .cmd1 () .cmd2 () .cmd3 () is packaged as ... ..cmd10 () .exec () by pipeline mechanism, wherein, pipeline () represents pipeline mechanism, exec () represents the end mark of pipeline.In one embodiment, pipeline mechanism is that a kind of batch issues the mechanism of operational order to primary redis server, if the present embodiment cluster proxy module does not use pipeline mechanism, cluster proxy module needs to send the operational order in access request to database module one by one, database module module can only suffer operation command one by one, if each operational order needs 1 millisecond, 10 access request then need 10 milliseconds.By the pipeline mechanism in the disclosure, database module can be sent to perform by after 10 access request packings, now only take 1.5 milliseconds, 8.5 milliseconds can be saved thus, when cluster proxy module receives more operational order in setting-up time section, time saving degree of convergence can be larger, can reduce the network overhead between cluster proxy module and database module further.
Fig. 5 is the flow chart of the processing method of data access request according to an exemplary embodiment three; How the said method that the present embodiment utilizes disclosure embodiment to provide, be sent to log server by its log information for cluster proxy module and carry out exemplary illustration, as shown in Figure 5, comprise the steps:
In step S501, determine whether cluster proxy module connects with log server, when cluster proxy module can not connect with log server, perform step S502, when cluster proxy module can connect with log server, perform step S504.
In one embodiment, normal operating conditions can be in by the network port of server node and determine cluster proxy server; In another embodiment, the abnormal notification message that can return by whether receiving log server determines whether cluster proxy module connects with log server, wherein, abnormal notification message can for log server determine himself to exist can not the situation of proper communication time the notification message that returns to server node, thus stop after making cluster proxy module receive this abnormal notification message sending daily record to log server.
In step S502, when cluster proxy module can not connect with log server, by the operational order in access request with in the file system setting form and be written in cluster proxy module.
In one embodiment, can there is exception for log server 15 in the situation that cluster proxy module can not connect with log server, and the exception that log server 15 exists see above-mentioned description embodiment illustrated in fig. 3, can be not described in detail in this.
In step S503, after determining to connect with log server, the log information write log server that file system is recorded.
In step S504, when cluster proxy module can connect with log server, the operational order in access request is written in log server to set form.
In the present embodiment, when cluster proxy module cannot be connected to log server, daily record is temporarily stored in file system by cluster proxy module, after detecting that log server recovers normally, can disposable daily record in file system be re-write in log server, thus above ensure that log information described on log server can record the historical operation record of server node exactly, guarantees that the business datum of server nodes all in server cluster quasi real time can be supplied to Website server to greatest extent.
Fig. 6 is the flow chart of the processing method of data access request according to an exemplary embodiment four; The said method that the present embodiment utilizes disclosure embodiment to provide, how to make the surviving node in Website server determination server cluster carry out exemplary illustration, as shown in Figure 6, comprises the steps:
In step s 601, the request of the address information for obtaining the surviving node in the server cluster at server node place from Website server timed sending is received.
In an embodiment example, the surviving node in server cluster can for can normally provide the server node of business datum for Website server.In one embodiment, the address information of surviving node can comprise IP address and the port information of server node.
In step S602, if server node is surviving node, according to request, the address information of server node is returned to Website server by cluster proxy module.
In the present embodiment, when Website server connects any server node in upper service in cluster, if server node is in existing state, then represent that server node is surviving node, to Website server return service device address of node information, when any station server node can not use in server cluster, Website server can be made to obtain business datum to the surviving node in server cluster, thus ensure that the high availability of server cluster.
Fig. 7 is the scene graph of the processing method of data access request according to an exemplary embodiment six; Need to carry out exemplary illustration to Website server panic buying concert admission ticket with user.When user sends panic buying request by terminal equipment (smart mobile phone, panel computer, desktop computer) application program or browser to Website server 71, Website server 71 sets each user can only rush to purchase one, and Website server 71 is provided with the poll of 10.Server cluster is redis cluster, server node is redis node, cluster proxy module is redis agency, database module be primary redis database is that example is illustrated.
As shown in Figure 7, after Website server 71 receives this panic buying request, need to search the poll of having rushed to purchase at present to redis cluster, Website server 71 sends following access request to redis agency 712, and the operational order of carrying in this access request is:
SMEMBERS " active_ticket "; Wherein, SMEMBERS is a read command, represents the result set needing to obtain " active_ticket " this sets.
Whether the result set that Website server 71 judgement obtains, meet two conditions: one simultaneously, and the id of user is not included in the result set that returns; Its two, the id number inside result set is less than 10.If meet above-mentioned two conditions, the id of user is inserted into inside " active_ticket " this sets by Website server 71, by sending as issued orders to redis cluster:
SADD " active_ticket " " 345636 ", wherein, SADD is a write order, " active_ticket " is a keyword (key), " 345636 " are for needing the value arranged, suppose that the id of user is 345636, the implication of this order is that " 345636 " are joined in result set corresponding to " active_ticket ".The operation layer of Website server 71, according to the concrete condition processed above, returns to rush to purchase to client and successfully, rushes to purchase, do not have the promptings such as unnecessary admission ticket.In one embodiment, Website server 71 is by after any D-redis node in D-redis cluster 70 on the client's side link of use D-redis, Website server needs timing to obtain the address information (ip and port) of cluster memory slip-knot point to D-redis cluster 70, and with redis node 72, redis node 73, redis node 74 connects, access request is used consistency HASH mechanism by Website server 71, be assigned to redis node 72 fifty-fifty, redis node 73, redis node 74, in cluster, any redis node is hung, Website server 71 still can re-start Hash (HASH) and calculate, and access request is pointed to surviving node, thus achieve high availability.In one embodiment, Website server 71 can use consistency Hash can go to unique redis node to the access of " active_ticket ", thus avoids the problem of inconsistency that the data delay of Website server 7 in read and write abruption scheme is brought.
Have received aforesaid operations order with redis node 72 and carry out exemplary illustration, the operation layer of Website server 71 and the concrete communication process of D-redis cluster 70:
After redis agency 721 receives aforesaid operations order, operational order is written in binlog server 75 to set form, for binlog server 75, this operational order is synchronized in redis node 74 and redis node 75, and performs aforesaid operations order by database module 722.Concrete mistake is called: the operational order in the access request that the operation layer from Website server 71 sends by redis agency 721 is transmitted to primary redis722, check the operational order in the access request received simultaneously, if had " write order " of similar SADD, this write order is sent to binlog server 75; Binlog server 75 records the write order from redis agency 722, and this write order is synchronized to other the redis node in cluster, and such as, the write order of redis node 72 is synchronized to redis node 73 and redis node 74 by binlog server 75.
Redis node 73 and redis node 74 receive the write order that binlog server 75 is sent, and this write order is issued corresponding primary redis; Issuing successfully, returning confirmation notification message to binlog server 75, terminating the synchronous of this write order.
By said process, can by the data syn-chronization of " active_ticket " this sets to other redis nodes.It will be appreciated by persons skilled in the art that the disclosure only schematically illustrates with the sets data structure of redis, similar data structure also comprises strings, the data structures such as lists, hashes; In addition, have a large amount of read write commands for often kind of data structure, such as, the write operation order of sets data structure comprises: sadd, spop, smove, srem etc., the write operation order of lists data structure comprises: lpush, lpop, rpush, rpop etc., the disclosure no longer itemizes at this.
Fig. 8 is the block diagram of the processing unit of a kind of data access request according to an exemplary embodiment, and as shown in Figure 8, the processing unit of data access request comprises:
First receiver module 81, is configured to by the access request of cluster proxy module reception from Website server;
First writing module 82, the operational order be configured in the access request received by the first receiver module 81 is written in log server to set form, operational order to be synchronized on other server node in the server cluster at server node place for log server;
Command execution module 83, is configured to the operational order performed by database module in the access request that the first receiver module 81 receives.
Fig. 9 is the block diagram of the processing unit of another kind of data access request according to an exemplary embodiment, and on above-mentioned basis embodiment illustrated in fig. 8, in one embodiment, device also can comprise:
Acquisition module 84, is configured to the log information being obtained other server node in the server cluster at the server node place of recording in log server by cluster proxy module, log information is handed down to database module;
Command execution module 83 is also configured by the operational order in database module execution journal information.
In one embodiment, device also can comprise:
First memory module 85, before being configured to not get the log information on log server at cluster proxy module, if log server exists abnormal, is stored in log information in the local system of log server.
In one embodiment, the first receiver module 81 can comprise:
Determine submodule 811, be configured to the number determining the access request that cluster proxy module receives in setting-up time section;
Issue submodule 812, if be configured to determine that submodule 811 determines that the number of the access request that cluster proxy module receives in setting-up time section reaches setting number, by pipeline mechanism, the packing of the operational order of the setting number in the access request of setting number is issued to database module.
In one embodiment, device also can comprise:
First determination module 86, is configured to determine whether cluster proxy module connects with log server;
Second writing module 87, is configured to when the first determination module 86 determines that cluster proxy module can not connect with log server, by the operational order in access request with in the file system setting form and be written in cluster proxy module;
3rd writing module 88, is configured to after the first determination module 86 determines that cluster proxy module and log server connect, log information write log server file system recorded.
In one embodiment, device also can comprise:
Second receiver module 89, be configured to receive the request from the address information for obtaining the surviving node in the server cluster at server node place of Website server timed sending, surviving node is for normally providing the server node of business datum in server cluster;
Return module 90, if being configured to server node is surviving node, the address information of server node is returned to Website server by the request received according to the second receiver module 89 by cluster proxy module.
About the device in above-described embodiment, wherein the concrete mode of modules executable operations has been described in detail in about the embodiment of the method, will not elaborate explanation herein.
Figure 10 is a kind of block diagram being applicable to the processing unit of data access request according to an exemplary embodiment.Such as, 1000 may be provided in a database server.With reference to Figure 10, device 1000 comprises processing components 1022, and it comprises one or more processor further, and the memory resource representated by memory 1032, can such as, by the instruction of the execution of processing unit 1022, application program for storing.The application program stored in memory 1032 can comprise each module corresponding to one group of instruction one or more.In addition, processing components 1022 is configured to perform instruction, to perform the processing method of above-mentioned data access request.
Device 1000 can also comprise the power management that a power supply module 1026 is configured to final controlling element 1000, and a wired or wireless network interface 1050 is configured to device 1000 to be connected to network, and input and output (I/O) interface 1058.Device 1000 can operate the operating system based on being stored in memory 1032, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or similar.
Those skilled in the art, at consideration specification and after putting into practice disclosed herein disclosing, will easily expect other embodiment of the present disclosure.The application is intended to contain any modification of the present disclosure, purposes or adaptations, and these modification, purposes or adaptations are followed general principle of the present disclosure and comprised the undocumented common practise in the art of the disclosure or conventional techniques means.Specification and embodiment are only regarded as exemplary, and true scope of the present disclosure and spirit are pointed out by claim below.
Should be understood that, the disclosure is not limited to precision architecture described above and illustrated in the accompanying drawings, and can carry out various amendment and change not departing from its scope.The scope of the present disclosure is only limited by appended claim.
Claims (13)
1. a processing method for data access request, is applied on server node, it is characterized in that, described server node comprises cluster proxy module and database module, and described method comprises:
The access request from Website server is received by described cluster proxy module;
Operational order in described access request is written in log server to set form, for described log server described operational order is synchronized on other server node in the server cluster at described server node place;
Described operational order is performed by described database module.
2. method according to claim 1, is characterized in that, described method also comprises:
Obtained the log information of other server node in the server cluster at the described server node place of recording in described log server by described cluster proxy module, described log information is handed down to described database module;
The operational order in described log information is performed by described database module.
3. method according to claim 2, is characterized in that, described method also comprises:
Do not get the described log information on described log server at described cluster proxy module before, if described log server exists abnormal, described log information is stored in the local system of described log server.
4. method according to claim 1, is characterized in that, describedly receives access request from Website server by described cluster proxy module, comprising:
Determine the number of the access request that described cluster proxy module receives in setting-up time section;
If the number of the described access request that described cluster proxy module receives in described setting-up time section reaches setting number, by pipeline mechanism, the packing of the operational order of the setting number in the access request of described setting number is issued to described database module.
5. method according to claim 1, is characterized in that, described method also comprises:
Determine whether described cluster proxy module connects with described log server;
When described cluster proxy module can not connect with described log server, the operational order in described access request is written in the file system in described cluster proxy module with described setting form;
After determining to connect with described log server, the log information that described file system records is write described log server.
6. method according to claim 1, is characterized in that, described method also comprises:
Receive the request from the address information for obtaining the surviving node in the server cluster at described server node place of described Website server timed sending, described surviving node is for normally providing the server node of business datum in described server cluster;
If described server node is described surviving node, according to described request, the address information of described server node is returned to described Website server by described cluster proxy module.
7. a processing unit for data access request, is applied on server node, it is characterized in that, described device comprises:
First receiver module, is configured to by the access request of described cluster proxy module reception from Website server;
First writing module, the operational order be configured in the described access request received by described first receiver module is written in log server to set form, described operational order to be synchronized on other server node in the server cluster at described server node place for described log server;
Command execution module, is configured to the operational order in the described access request received by described first receiver module of described database module execution.
8. device according to claim 7, is characterized in that, described device also comprises:
Acquisition module, be configured to the log information being obtained other server node in the server cluster at the described server node place of recording in described log server by described cluster proxy module, described log information is handed down to described database module;
Described command execution module is also configured the operational order performed by described database module in described log information.
9. device according to claim 8, is characterized in that, described device also comprises:
First memory module, before being configured to not get the described log information on described log server at described cluster proxy module, if described log server exists abnormal, is stored in described log information in the local system of described log server.
10. device according to claim 7, is characterized in that, described first receiver module comprises:
First determines submodule, is configured to the number determining the described access request that described cluster proxy module receives in setting-up time section;
Issue submodule, if be configured to described first to determine that submodule determines that the number that described cluster proxy module receives described access request in described setting-up time section reaches setting number, by pipeline mechanism, the packing of the operational order of the setting number in the access request of described setting number is issued to described database module.
11. devices according to claim 7, is characterized in that, described device also comprises:
First determination module, is configured to determine whether described cluster proxy module connects with described log server;
Second writing module, is configured to, when described cluster proxy module can not connect with described log server, be written in the file system in described cluster proxy module by the operational order in described access request with described setting form;
3rd writing module, is configured to, after determining to connect with described log server, the log information that described file system records be write described log server.
12. devices according to claim 7, is characterized in that, described device also comprises:
Second receiver module, be configured to receive the request from the address information for obtaining the surviving node in the server cluster at described server node place of described Website server timed sending, described surviving node is for normally providing the server node of business datum in described server cluster;
Return module, if being configured to described server node is described surviving node, the address information of described server node is returned to described Website server by the described request received according to described second receiver module by described cluster proxy module.
13. 1 kinds of database servers, is characterized in that, comprising:
Processor;
For the memory of storage of processor executable instruction;
Wherein, described processor is configured to:
The access request from Website server is received by described cluster proxy module;
Operational order in described access request is written in log server to set form, for described log server described operational order is synchronized on other server node in the server cluster at described server node place;
Described operational order is performed by described database module.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510370222.7A CN104980307A (en) | 2015-06-29 | 2015-06-29 | Processing method of data access requests, processing device of data access requests and database server |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510370222.7A CN104980307A (en) | 2015-06-29 | 2015-06-29 | Processing method of data access requests, processing device of data access requests and database server |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104980307A true CN104980307A (en) | 2015-10-14 |
Family
ID=54276439
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510370222.7A Pending CN104980307A (en) | 2015-06-29 | 2015-06-29 | Processing method of data access requests, processing device of data access requests and database server |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104980307A (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107395559A (en) * | 2017-05-27 | 2017-11-24 | 北京五八信息技术有限公司 | Data processing method and equipment based on redis |
CN107632919A (en) * | 2017-09-01 | 2018-01-26 | 北京小米移动软件有限公司 | Database monitoring method and device |
CN108777638A (en) * | 2018-08-27 | 2018-11-09 | 郑州云海信息技术有限公司 | A kind of server log information backup method and system |
CN110121694A (en) * | 2017-12-05 | 2019-08-13 | 华为技术有限公司 | A kind of blog management method, server and Database Systems |
CN110909076A (en) * | 2019-10-31 | 2020-03-24 | 北京浪潮数据技术有限公司 | Storage cluster data synchronization method, device, equipment and storage medium |
CN111324668A (en) * | 2020-02-18 | 2020-06-23 | 中国联合网络通信集团有限公司 | Database data synchronous processing method and device and storage medium |
CN111901389A (en) * | 2020-07-03 | 2020-11-06 | 北京达佳互联信息技术有限公司 | Data updating method, device, server and storage medium |
CN115033642A (en) * | 2022-05-26 | 2022-09-09 | 度小满科技(北京)有限公司 | Data synchronization method and device for Redis cluster |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1722664A (en) * | 2004-07-13 | 2006-01-18 | 联想网御科技(北京)有限公司 | Method for realizing high-usability of network security equipment under cluster mode |
CN101309167A (en) * | 2008-06-27 | 2008-11-19 | 华中科技大学 | Disaster allowable system and method based on cluster backup |
CN102119381A (en) * | 2008-07-11 | 2011-07-06 | 英特尔公司 | Method and apparatus for universal serial bus (USB) command queuing |
CN102693324A (en) * | 2012-01-09 | 2012-09-26 | 西安电子科技大学 | Distributed database synchronization system, synchronization method and node management method |
US20120323849A1 (en) * | 2011-06-15 | 2012-12-20 | Oracle International Corportion | Method For Maximizing Throughput And Minimizing Transaction Response Times On The Primary System In The Presence Of A Zero Data Loss Standby Replica |
-
2015
- 2015-06-29 CN CN201510370222.7A patent/CN104980307A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1722664A (en) * | 2004-07-13 | 2006-01-18 | 联想网御科技(北京)有限公司 | Method for realizing high-usability of network security equipment under cluster mode |
CN101309167A (en) * | 2008-06-27 | 2008-11-19 | 华中科技大学 | Disaster allowable system and method based on cluster backup |
CN102119381A (en) * | 2008-07-11 | 2011-07-06 | 英特尔公司 | Method and apparatus for universal serial bus (USB) command queuing |
US20120323849A1 (en) * | 2011-06-15 | 2012-12-20 | Oracle International Corportion | Method For Maximizing Throughput And Minimizing Transaction Response Times On The Primary System In The Presence Of A Zero Data Loss Standby Replica |
CN102693324A (en) * | 2012-01-09 | 2012-09-26 | 西安电子科技大学 | Distributed database synchronization system, synchronization method and node management method |
Non-Patent Citations (1)
Title |
---|
易柏胜: "基于ZooKeeper的虚拟动态变更机制的设计与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107395559A (en) * | 2017-05-27 | 2017-11-24 | 北京五八信息技术有限公司 | Data processing method and equipment based on redis |
CN107632919A (en) * | 2017-09-01 | 2018-01-26 | 北京小米移动软件有限公司 | Database monitoring method and device |
CN107632919B (en) * | 2017-09-01 | 2020-10-09 | 北京小米移动软件有限公司 | Database monitoring method and device |
CN110121694B (en) * | 2017-12-05 | 2020-08-07 | 华为技术有限公司 | Log management method, server and database system |
CN110121694A (en) * | 2017-12-05 | 2019-08-13 | 华为技术有限公司 | A kind of blog management method, server and Database Systems |
US11748215B2 (en) | 2017-12-05 | 2023-09-05 | Huawei Technologies Co., Ltd. | Log management method, server, and database system |
CN108777638A (en) * | 2018-08-27 | 2018-11-09 | 郑州云海信息技术有限公司 | A kind of server log information backup method and system |
CN110909076A (en) * | 2019-10-31 | 2020-03-24 | 北京浪潮数据技术有限公司 | Storage cluster data synchronization method, device, equipment and storage medium |
CN111324668A (en) * | 2020-02-18 | 2020-06-23 | 中国联合网络通信集团有限公司 | Database data synchronous processing method and device and storage medium |
CN111324668B (en) * | 2020-02-18 | 2023-11-21 | 中国联合网络通信集团有限公司 | Database data synchronous processing method, device and storage medium |
CN111901389A (en) * | 2020-07-03 | 2020-11-06 | 北京达佳互联信息技术有限公司 | Data updating method, device, server and storage medium |
CN111901389B (en) * | 2020-07-03 | 2023-07-04 | 北京达佳互联信息技术有限公司 | Data updating method, device, server and storage medium |
CN115033642A (en) * | 2022-05-26 | 2022-09-09 | 度小满科技(北京)有限公司 | Data synchronization method and device for Redis cluster |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104980307A (en) | Processing method of data access requests, processing device of data access requests and database server | |
US10983880B2 (en) | Role designation in a high availability node | |
US10831612B2 (en) | Primary node-standby node data transmission method, control node, and database system | |
WO2017124938A1 (en) | Method, device, and system for data synchronization | |
US10114848B2 (en) | Ensuring the same completion status for transactions after recovery in a synchronous replication environment | |
US9549025B2 (en) | Protocol optimization for client and server synchronization | |
CN110149382A (en) | Data synchronization method, system, main server, synchronization client and medium | |
CN110597910A (en) | Remote data synchronization method, device and system | |
US10430217B2 (en) | High availability using dynamic quorum-based arbitration | |
US10826812B2 (en) | Multiple quorum witness | |
KR20030003264A (en) | Server duplexing method and duplexed server system | |
US12050558B2 (en) | Facilitating immediate performance of volume resynchronization with the use of passive cache entries | |
US20120278429A1 (en) | Cluster system, synchronization controlling method, server, and synchronization controlling program | |
EP3786802A1 (en) | Method and device for failover in hbase system | |
CN113094430B (en) | Data processing method, device, equipment and storage medium | |
CN114422537B (en) | Multi-cloud storage system, multi-cloud data reading and writing method and electronic equipment | |
CN110633046A (en) | Storage method and device of distributed system, storage equipment and storage medium | |
US10545667B1 (en) | Dynamic data partitioning for stateless request routing | |
CN109445988B (en) | Heterogeneous disaster recovery method, device, system, server and disaster recovery platform | |
CN112052104A (en) | Message queue management method based on multi-computer-room realization and electronic equipment | |
US11921699B1 (en) | Lease-based consistency management for handling failover in a database | |
US20200387412A1 (en) | Method To Manage Database | |
KR100492167B1 (en) | Shared-nothing database cluster server system and On-line scaling method | |
CN115934417A (en) | Data backup method, system and equipment | |
US9529549B2 (en) | Data processing method for storing data and restoration information and data processing 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 | ||
C41 | Transfer of patent application or patent right or utility model | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20160701 Address after: 100085, Haidian District, Beijing Qinghe Street No. 68, Huarun colorful city shopping center two, 9 layers Applicant after: Millet Communication Technology Co Ltd Address before: 100085 Beijing city Haidian District Qinghe Street No. 68 Huarun colorful city shopping center two floor 13 Applicant before: Xiaomi Technology Co., Ltd. |
|
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20151014 |