CN109450988A - A method of data consistency is ensured under framework living more than strange land - Google Patents
A method of data consistency is ensured under framework living more than strange land Download PDFInfo
- Publication number
- CN109450988A CN109450988A CN201811220219.7A CN201811220219A CN109450988A CN 109450988 A CN109450988 A CN 109450988A CN 201811220219 A CN201811220219 A CN 201811220219A CN 109450988 A CN109450988 A CN 109450988A
- Authority
- CN
- China
- Prior art keywords
- data
- computer room
- business
- request
- data consistency
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/60—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
- H04L67/63—Routing a service request depending on the request content or context
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1029—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers using data related to the state of servers by a load balancer
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1034—Reaction to server failures by a load balancer
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1095—Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a kind of methods that data consistency is ensured under framework living more than strange land, which is characterized in that including step 1, establishes special line real time monitoring, communication quality analysis mechanisms;Step 2 establishes the data consistency security mechanism in web layer face, for guaranteeing data consistency by request forwarding;Step 3 establishes the data consistency security mechanism of micro services level, for guaranteeing data consistency by request forwarding;Step 4 establishes the data consistency security mechanism in data storage layer face;The present invention, which reaches, avoids data collision from data storage layer face;While ensureing data consistency, also ensure that user accesses the availability of experience and system;Real-time data monitoring is accomplished in data storage layer face, has had the effect of data collision identification, automatically processes and alarm.
Description
Technical field
The present invention relates to computer body system structure fields, ensure data one under framework living more than strange land more particularly to one kind
The method of cause property.
Background technique
In current electric business platform, distributed structure/architecture has become the standard configuration of electric business platform architecture, in order to give user most
Good usage experience, the resource of electric business platform can all be deployed in multiple computer rooms, so that user is when accessing the resource of electric business platform,
The resource nearest from oneself can be accessed, this framework is referred to as strange land framework mostly living, and the strategy of this user access resources is referred to as
For nearest access strategy.
In framework living more than strange land, how to guarantee that the consistency of data becomes an extremely important problem.Current
In some internet systems, in order to solve the problems, such as that this is important, these apply data consistency, the availability of system and
It is accepted or rejected in these three important indicators of user experience.Some systems sacrifice use to guarantee the consistency of system data
Family experience sense, allows the request of all users all to access the resource in some computer room, and this mode can be to the access of certain customers
Experience brings certain negative effect.Some systems are in order to ensure data consistency, and in some scenarios, sacrifice system can
With property, under distributed structure/architecture, only one computer room of certain functions provides service to user, when the appearance of this room system can not
When with situation, the partial function of system can not provide service to user.Some systems are in order to ensure the experience sense and system of user
Availability, sacrifice the consistency of data, multiple computer rooms provide service to user simultaneously, it is most likely that cause rushing for data
It is prominent, to cause the inconsistent of data.
There are also the internet systems of some large sizes, although taking a series of means ensure that data consistency, user
The availability of experience sense and system, but these means are relatively simple.For example, routing policy is established on the server, by adopting
It purchases preferable hardware facility and builds communication line between different computer rooms, on the server by the request of user according to actual scene
It is forwarded to some specific computer room.Some systems use MQ messaging bus mechanism, utilize MQ messaging bus asking certain customers
It asks and is transmitted to other computer rooms.But on the one hand this mode increases the complexity of system, need to introduce third-party component, needs
Guarantee the High Availabitity of MQ messaging bus, on the other hand, needs to consider the message delay problem of MQ messaging bus, once there is MQ
The data transfer delay of messaging bus will also result in certain influence to user.
Summary of the invention
It is a kind of under framework living more than strange land the technical problem to be solved by the present invention is to overcome the deficiencies of the prior art and provide
The method for ensureing data consistency.
In order to solve the above technical problems, the present invention provides a kind of side for ensureing data consistency under framework living more than strange land
Method, which comprises the steps of:
Step 1 establishes special line real time monitoring, communication quality analysis mechanisms;
Step 2 establishes the data consistency security mechanism in web layer face, for guaranteeing that data are consistent by request forwarding
Property;
Step 3 establishes the data consistency security mechanism of micro services level, for guaranteeing data one by request forwarding
Cause property;
Step 4 establishes the data consistency security mechanism in data storage layer face;
In the step 1, establish special line real time monitoring, communication quality analysis mechanisms refer to using special line communication line into
Data communication between row computer room, and the address information of pre-configured all special lines, periodically to the destination address of all special lines
Data packet is sent, to obtain response data, the analysis result of data is ranked up the communication quality of special line according to response, rejects
The special line route not being available.
In the step 2, the data consistency security mechanism for establishing Web level refers to web server in each computer room
On according to practical business scene configuration forward rule, the http request of certain domain name is forwarded to by forward rule pre-configured
Computer room, so that the computer room of its fixation can be all accessed in the access request for guaranteeing under the domain name;
In the step 3, the data consistency security mechanism for establishing micro services level refers to through blocking in application system
Device is cut, the micro services call request of each computer room is intercepted, according to business scenario, determines whether this micro services call request needs
It carries out routing forwarding and the call request of micro services is forwarded to purpose computer room by special line if meeting forwarding condition, thus
Guarantee that the computer room of its fixation can be all accessed in the micro services request of the specific transactions;
In the step 4, the data consistency security mechanism for establishing data storage layer face includes that data collision identifies, certainly
Dynamic processing and alarm mechanism, the data collision identification in data storage layer face refer to that capture is every in real time by data monitoring component
The data situation of the data storage medium of a computer room compares the data situation of each computer room, to find
Data collision, described automatically process refers to if system can be automatically repaired data collision, the data of conflict is repaired, if not
It can be automatically repaired, then pass through alarm mechanism alert, notice manpower intervention processing.
In the step 1, specific step is as follows for special line monitoring mechanism:
Step 101, the address information of pre-configured all special lines, including target ip, port etc. are obtained;
Step 102, data detection packet periodically is sent to the destination address of all special lines;
Step 103, obtain detection packet response data, analyze response data as a result, the result information packet of response data
It includes and whether is properly received response data packet, the propagation delay time of probe data packet, packet loss etc.;Every special line performance figure α is calculated,
If certain special line can not receive response data packet, α=0, otherwise α=t+m, t indicate propagation delay time, and m indicates packet loss;
Step 104, the Bit-reversed for carrying out communication quality index α to special line based on the analysis results is rejected and is not available
Special line route.
In the step 2, establishing the data consistency security mechanism in web layer face, specific step is as follows:
Step 201, all pre-configured domain names for needing to be forwarded judgement are obtained, the access of each domain name is counted
The target computer room of domain name is arranged provincial characteristics according to the area sequence of user's request amount from big to small;
Step 202, whether place is this to current computer room is judged according to the domain name that this is requested for each http request
The host node of domain name, if needs make requests forwarding;
Step 203, if you do not need to being forwarded, then making requests processing in current computer room;
Step 204, be forwarded if necessary, then by the communication quality index α of the special line in analytical procedure 104,
The flow and route priority of the weight of route, every route calculate communication line selection index α `, α `=w/ (α+s),
Middle w is the weight of every route, and value range 0-5, s are that route flow normalizes index, and value range 0-5 will own
Communication line in route with maximum α ` value is as data transmission link;
Step 205, current http request is forwarded to target computer room, which is handled by target computer room;
The web server is Nginx web server.
In the step 3, establishing the data consistency security mechanism of micro services level, specific step is as follows:
Step 301, it distinguishes on the ground of the pre-configured business for needing to carry out routing forwarding request, statistical service amount of access
Cloth sets the place computer room of business host node, and the host node of business is arranged in the more frequent computer room of business access;
Step 302, registration center is sent by the computer room information of the host node of each business, by registration center by business master
The information of node is broadcast to each application system;
Step 303, in the application system of each computer room be added micro services call blocker, blocker according to currently
Micro services service request and the corresponding host node information of the business decide whether to carry out the routing forwarding of micro services request;
Step 304, it if current micro services request the host node of corresponding business in current computer room, is handled by current computer room
The request, otherwise goes to step 305;
Step 305, if current micro services request the host node of corresponding business not in current computer room, in step 204
Identical mode selects data transmission link, and micro services request is forwarded to target computer room, handles the request by target computer room.
In the step 4, establishes the data collision identification of data storage medium level, automatically processes and alarm mechanism
Specific step is as follows:
Step 401, each computer room enables the data monitoring component in data storage layer face, captures every of database table in real time
The change conditions of record;
Step 402, the capture record of the data monitoring component of each computer room of real-time collecting, and persistence is done to these records
Processing;
Step 403, the change conditions of the same data record of each computer room of real time contrast, if it find that different computer rooms is same
The change sequence of one data record is inconsistent, then goes to step 404;
Step 404, if the inconsistent scene of current data meets data and is automatically repaired rule, data is carried out and are repaired automatically
It is multiple, each computer room is sent by the data after amendment, if the inconsistent situation of current data is unsatisfactory for being automatically repaired rule,
Warning information is then issued, by manually being handled.
In the step 4, the concrete mode for being automatically repaired data collision is: enabling a record R in a tables of data
One normal data change procedure P is made of sequence S={ a1, a2, a3 ... ai }, two sequences S1, S2 is enabled, if the generation of S2
Sequence then meets S1 < S2 after S1;Enable element a1, a2 the ∈ S in two sequences, if the order of occurrence of a2 after a1,
Then meet a1 < a2;Analyze the sequence for each data variation process that the data monitoring component of each computer room captures.
In the step 4, the rule for being automatically repaired data is: enabling the change sequence of the record R in computer room A in tables of data
For Sa, the change sequence of identical recordings R is Sb in tables of data in computer room B;
IfAnd Sa < Sb, then the final entry of the data R of each computer room is updated to sequence Sb most
The latter element;
IfAndBj ∈ Sb, meets ai <bj, simultaneouslyBn ∈ Sb meets
Am>bn, then adjust Sa, the order of elements of Sb, so that Sa<Sb, by the data R of each computer room, according to new sequence Sc=Sa ∪ Sb
It is updated.
Further include step 5, establish business host node real time monitoring, fail-over scheme, the specific steps are as follows:
Step 501, data detection packet periodically is sent to each computer room, computer room availability is detected, if it find that some computer room
The response of data detection packet occur abnormal, then need to carry out the switching of business host node, go to step 502;
Step 502, host node of the spare computer room as business is selected, sends the information of the computer room in registration
The heart;
Step 503, registration center receives the modification information of service node, each application broadcasting service host node into computer room
Transition information.
Advantageous effects of the invention:
(1) present invention establishes the data consistency security mechanism of three levels, to thoroughly solve safeguard mean list
One defect.Ensure that the read-write of part core business data can from Website page access level and service communication level first
It is routed to a computer room, avoids data collision from communication for service level.
(2) present invention has also ensured that user accesses the availability of experience and system while ensureing data consistency.With
The request data routing forwarding at family is carried out data transmission by the special line of high quality, has ensured the quality of data transmission, together
When enable special line communication quality testing component, the availability of special line is also ensured.
(3) present invention in data storage layer face has carried out the monitoring of data variation, since computer room is there are the possibility of delay machine, one
There is some computer room delay machine in denier, it is more likely that the data for the computer room occur not yet are synchronized to the situation of other computer rooms, data storage
The data of level are inconsistent to be inevitable, so the present invention has done real-time data monitoring in data storage layer face, and
It can accomplish to can be realized being automatically repaired for data under the scene of part, if cannot accomplish to be automatically repaired, alarm can be sent
Information, notice manpower intervention processing.
Detailed description of the invention
Fig. 1 is the special line overhaul flow chart in exemplary embodiment of the present invention;
Fig. 2 is that the data consistency in the web layer face in exemplary embodiment of the present invention ensures flow chart;
Fig. 3 is to ensure flow chart in the data consistency of micro services level in exemplary embodiment of the present invention;
Fig. 4 is that the data consistency in exemplary embodiment of the present invention in data storage layer face ensures flow chart;
Fig. 5 is business host node switching flow figure in exemplary embodiment of the present invention;
Fig. 6 is that data consistency guarantees the overall procedure of scheme under the scene mostly living of strange land in exemplary embodiment of the present invention
Figure.
Specific embodiment
The present invention is further illustrated with exemplary embodiment with reference to the accompanying drawing:
A kind of method ensureing data consistency under framework living more than strange land as shown in FIG. 6, detailed process include:
Step 1 establishes special line real time monitoring, communication quality analysis mechanisms;Special line monitoring mechanism is established to refer to using special line
Communication line carries out the data communication between computer room, and the address information of pre-configured all special lines, periodically to all special lines
Destination address send data packet, to obtain response data, according to response the analysis result of data to the communication quality of special line into
Row sequence, rejects the special line route not being available.
It has used special line to carry out the data communication between computer room between each computer room, and communication line has been carried out strictly
Screening, used operator provide a plurality of special line communication route, the optimization net which has used operator self-built
Network structure can be avoided the Communication Jamming on common public network communication line.
As shown in Figure 1, establishing special line monitoring mechanism, specific step is as follows:
Step 101, the address information of pre-configured all special lines, including target ip, port etc. are obtained;
Step 102, data detection packet periodically is sent to the destination address of all special lines;
Step 103, obtain detection packet response data, analyze response data as a result, the result information packet of response data
It including and whether is properly received response data packet, the propagation delay time of probe data packet, packet loss etc. calculates every special line performance figure α,
If certain special line can not receive response data packet, α=0, otherwise α=t+m, t indicate propagation delay time, and m indicates packet loss.
Step 104, the Bit-reversed for carrying out communication quality index α to special line based on the analysis results is rejected and is not available
Special line route.
Step 2, the data consistency security mechanism for establishing Web level refer to the basis in the web server of each computer room
The http request of certain domain name is forwarded to pre-configured machine by forward rule by practical business scene configuration forward rule
Room, to guarantee that the computer room of its fixation can be all accessed in the access request under the domain name;As shown in Figure 2, the specific steps are as follows:
Step 201, all pre-configured domain names for needing to be forwarded judgement are obtained, the access of each domain name is counted
The target computer room of domain name is arranged provincial characteristics according to the area sequence of user's request amount from big to small;
Step 202, whether place is this to current computer room is judged according to the domain name that this is requested for each http request
The host node of domain name, if needs make requests forwarding;
Step 203, if you do not need to being forwarded, then making requests processing in current computer room;
Step 204, be forwarded if necessary, then by the communication quality index α of the special line in analytical procedure 104,
The flow and route priority of the weight of route, every route select communication quality best, and the line of communication bandwidth abundance
Road calculates communication line selection index α `, α `=w/ (α+s), and wherein w is the weight of every route, and value range 0-5, s are
Route flow normalizes index, and value range 0-5 is passed the communication line in all routes with maximum α ` value as data
Defeated route, such as have three communication lines, the weight of every route is respectively 4,2,1, and the flow of every route normalizes index
It is 5,1,2, the real-time communication quality index of every route is 3,1,1, then we can select the second route to transmit as data
Route;
Step 205, current http request is forwarded to target computer room, which is handled by target computer room;
The web server is Nginx web server.
Step 3, the data consistency security mechanism for establishing micro services level refer to through the blocker in application system,
The micro services call request for intercepting each computer room determines whether this micro services call request needs to carry out according to business scenario
The call request of micro services is forwarded to purpose computer room by special line, to guarantee if meeting forwarding condition by routing forwarding
The computer room of its fixation can be all accessed in the micro services request of the specific transactions;At present in system there are a large amount of micro services calling,
Calling and the web request calling of micro services make a big difference, and micro services calling is the calling occurred between application server,
And the request call in web layer face generally refers to the request call between user terminal and server.As shown in figure 3, specific step
It is rapid as follows:
Step 301, it distinguishes on the ground of the pre-configured business for needing to carry out routing forwarding request, statistical service amount of access
Cloth sets the place computer room of business host node, and the host node of business is arranged in the more frequent computer room of business access;
Step 302, registration center is sent by the computer room information of the host node of each business, by registration center by business master
The information of node is broadcast to each application system;
Step 303, in the application system of each computer room be added micro services call blocker, blocker according to currently
Micro services service request and the corresponding host node information of the business decide whether to carry out the routing forwarding of micro services request;
Step 304, it if current micro services request the host node of corresponding business in current computer room, is handled by current computer room
The request, otherwise goes to step 305;
Step 305, if current micro services request the host node of corresponding business not in current computer room, in step 204
Identical mode selects data transmission link, passes through the communication quality of the special line in analytical procedure 104, the weight of route, every
The flow and route priority of route select communication quality best, and the route of communication bandwidth abundance, and micro services request is turned
It is dealt into target computer room, which is handled by target computer room.
Step 4, the data consistency security mechanism for establishing data storage layer face include data collision identification, automatically process
And alarm mechanism, when there is the not available situation of some computer room, need to the host nodes of certain domain names and certain business into
Very likely there is data collision in this case in row switching, and the data collision identification in data storage layer face, which refers to, passes through data
Monitor component captures the data situation of the data storage medium of each computer room in real time, by the data variation feelings of each computer room
Condition compares, to find data collision, described automatically process refers to if system can be automatically repaired data collision, repairs
The data to conflict again, if cannot be automatically repaired, by alarm mechanism alert, notice manpower intervention is handled, such as
Shown in Fig. 4, specific implementation step is as follows:
Step 401, each computer room enables the data monitoring component in data storage layer face, captures every of database table in real time
The change conditions of record;
Step 402, the capture record of the data monitoring component of each computer room of real-time collecting, and persistence is done to these records
Processing;
Step 403, the change conditions of the same data record of each computer room of real time contrast, if it find that different computer rooms is same
The change sequence of one data record is inconsistent, then goes to step 404;
Step 404, if the inconsistent scene of current data meets data and is automatically repaired rule, data is carried out and are repaired automatically
It is multiple, each computer room is sent by the data after amendment, if the inconsistent situation of current data is unsatisfactory for being automatically repaired rule,
Warning information is then issued, by manually being handled.
The rule for being automatically repaired data is: the change sequence for enabling the record R in computer room A in tables of data is Sa, number in computer room B
Change sequence according to identical recordings R in table is Sb;
IfAnd Sa < Sb, then the final entry of the data R of each computer room is updated to sequence Sb most
The latter element.
IfAndBj ∈ Sb, meets ai <bj, simultaneouslyBn ∈ Sb meets
Am>bn, then adjust Sa, the order of elements of Sb, so that Sa<Sb, by the data R of each computer room, according to new sequence Sc=Sa ∪ Sb
It is updated.
Specific implementation step described in the step 4 mainly applies the scene to switch in business host node
In, in the case where computer room where business host node changes, in very short time interval, it may occur that two computer rooms
There is the case where data write-in simultaneously, the consistent of data cannot be still completely secured with the specific implementation measure of step 3 in step 2
Property, so the present invention enables the data monitoring in data storage layer face, once finding the data collision of different computer rooms, and meet
The rule being automatically repaired reduces manually-operated cost then system will be automatically repaired.
Computer room where all mentioning the host node of business in step 201 and step 301 is the region according to business access amount
What feature determined, but all there is the possibility of delay machine in any one computer room, therefore in order to guarantee system availability, the present invention also step
Five, business host node real time monitoring, fail-over scheme are established, as shown in Figure 5, the specific steps are as follows:
Step 501, data detection packet periodically is sent to each computer room, computer room availability is detected, if it find that some computer room
The response of data detection packet occur abnormal, then need to carry out the switching of business host node, go to step 502;
Step 502, host node of the spare computer room as business is selected, sends the information of the computer room in registration
The heart;
Step 503, registration center receives the modification information of service node, each application broadcasting service host node into computer room
Transition information.
Present invention is mainly used for provide a kind of method that data consistency is ensured under framework living more than strange land.The present invention is reached
It is arriving the utility model has the advantages that
(1) present invention establishes the data consistency security mechanism of three levels, to thoroughly solve safeguard mean list
One defect.Ensure that the read-write of part core business data can from Website page access level and service communication level first
It is routed to a computer room, avoids data collision from communication for service level.
(2) present invention has also ensured that user accesses the availability of experience and system while ensureing data consistency.With
The request data routing forwarding at family is carried out data transmission by the special line of high quality, has ensured the quality of data transmission, together
When enable special line communication quality testing component, the availability of special line is also ensured.
(3) present invention in data storage layer face has carried out the monitoring of data variation, since computer room is there are the possibility of delay machine, one
There is some computer room delay machine in denier, it is more likely that the data for the computer room occur not yet are synchronized to the situation of other computer rooms, data storage
The data of level are inconsistent to be inevitable, so the present invention has accomplished real-time data monitoring in data storage layer face, and
And can accomplish to can be realized being automatically repaired for data under the scene of part, if cannot accomplish to be automatically repaired, report can be sent
Alert information, notice manpower intervention processing.
Above embodiments do not limit the present invention in any way, all to be made in a manner of equivalent transformation to above embodiments
Other improvement and application, belong to protection scope of the present invention.
Claims (8)
1. a kind of method for ensureing data consistency under framework living more than strange land, which comprises the steps of:
Step 1 establishes special line real time monitoring, communication quality analysis mechanisms;
Step 2 establishes the data consistency security mechanism in web layer face, for guaranteeing data consistency by request forwarding;
Step 3 establishes the data consistency security mechanism of micro services level, for guaranteeing data consistency by request forwarding;
Step 4 establishes the data consistency security mechanism in data storage layer face;
In the step 1, special line real time monitoring is established, communication quality analysis mechanisms refer to using special line communication line progress machine
Data communication between room, and the address information of pre-configured all special lines are periodically sent to the destination address of all special lines
Data packet, to obtain response data, the analysis result of data is ranked up the communication quality of special line according to response, and rejecting can not
The special line route used.
In the step 2, the data consistency security mechanism for establishing Web level refers to the root in the web server of each computer room
Factually border business scenario configures forward rule, and the http request of certain domain name is forwarded to pre-configured machine by forward rule
Room, to guarantee that the computer room of its fixation can be all accessed in the access request under the domain name;
In the step 3, the data consistency security mechanism for establishing micro services level refers to through the interception in application system
Device intercepts the micro services call request of each computer room, according to business scenario, determine this micro services call request whether need into
The call request of micro services is forwarded to purpose computer room by special line, to protect if meeting forwarding condition by row routing forwarding
The computer room of its fixation can be all accessed in the micro services request for demonstrate,proving the specific transactions;
In the step 4, the data consistency security mechanism for establishing data storage layer face includes data collision identification, automatic place
The data collision identification of reason and alarm mechanism, data storage layer face refers to through data monitoring component, captures each machine in real time
The data situation of the data storage medium in room compares the data situation of each computer room, to find data
Conflict, described automatically process refers to if system can be automatically repaired data collision, repairs the data of conflict, if cannot be certainly
It is dynamic to repair, then pass through alarm mechanism alert, notice manpower intervention processing.
2. a kind of method for ensureing data consistency under framework living more than strange land as described in claim 1, it is characterised in that: institute
It states in step 1, specific step is as follows for special line monitoring mechanism:
Step 101, the address information of pre-configured all special lines, including target ip, port etc. are obtained;
Step 102, data detection packet periodically is sent to the destination address of all special lines;
Step 103, the response data of detection packet is obtained, analyze response data as a result, the result information of response data includes being
It is no to be properly received response data packet, the propagation delay time of probe data packet, packet loss etc.;Every special line performance figure α is calculated, if
Certain special line can not receive response data packet, then α=0, otherwise α=t+m, and t indicates propagation delay time, and m indicates packet loss;
Step 104, the Bit-reversed for carrying out communication quality index α to special line based on the analysis results, rejects the special line not being available
Route.
3. a kind of method for ensureing data consistency under framework living more than strange land as claimed in claim 2, it is characterised in that: institute
It states in step 2, establishing the data consistency security mechanism in web layer face, specific step is as follows:
Step 201, all pre-configured domain names for needing to be forwarded judgement are obtained, the access region of each domain name is counted
The target computer room of domain name is arranged feature according to the area sequence of user's request amount from big to small;
Step 202, whether place is the domain name to current computer room is judged according to the domain name that this is requested for each http request
Host node, if needs make requests forwarding;
Step 203, if you do not need to being forwarded, then making requests processing in current computer room;
Step 204, it is forwarded if necessary, then passing through communication quality index α, the route of the special line in analytical procedure 104
Weight, every route flow and route priority, calculate communication line selection index α `, α `=w/ (α+s), wherein w
For the weight of every route, value range 0-5, s are that route flow normalizes index, value range 0-5, by all routes
In with maximum α ` value communication line as data transmission link;
Step 205, current http request is forwarded to target computer room, which is handled by target computer room;
The web server is Nginx web server.
4. a kind of method for ensureing data consistency under framework living more than strange land as claimed in claim 3, it is characterised in that: institute
It states in step 3, establishing the data consistency security mechanism of micro services level, specific step is as follows:
Step 301, the pre-configured business for needing to carry out routing forwarding request, the Area distribution of statistical service amount of access, if
The host node of business is arranged in business access more frequent computer room the place computer room for having set business host node;
Step 302, registration center is sent by the computer room information of the host node of each business, by registration center by business host node
Information be broadcast to each application system;
Step 303, in the application system of each computer room be added micro services call blocker, blocker according to currently in incognito
Business service request and the corresponding host node information of the business decide whether to carry out the routing forwarding of micro services request;
Step 304, if current micro services request the host node of corresponding business in current computer room, this is handled by current computer room and is asked
It asks, otherwise goes to step 305;
Step 305, if current micro services request the host node of corresponding business not in current computer room, with identical in step 204
Mode select data transmission link, by micro services request be forwarded to target computer room, which is handled by target computer room.
5. a kind of method for ensureing data consistency under framework living more than strange land as claimed in claim 4, it is characterised in that: institute
State in step 4, establish data storage layer face data collision identification, automatically process and alarm mechanism specific step is as follows:
Step 401, each computer room enables the data monitoring component in data storage layer face, captures every record of database table in real time
Change conditions;
Step 402, the capture record of the data monitoring component of each computer room of real-time collecting, and these records are done at persistence
Reason;
Step 403, the change conditions of the same data record of each computer room of real time contrast, if it find that the same number of different computer rooms
It is inconsistent according to the change sequence of record, then go to step 404;
Step 404, if the inconsistent scene of current data meets data and is automatically repaired rule, data is carried out and are automatically repaired,
Each computer room is sent by the data after amendment, if the inconsistent situation of current data is unsatisfactory for being automatically repaired rule,
Warning information is issued, by manually being handled.
6. a kind of method for ensureing data consistency under framework living more than strange land as claimed in claim 5, which is characterized in that institute
It states in step 4, the concrete mode for being automatically repaired data collision is: enabling one in a tables of data normal number for recording R
According to change procedure P by sequence S={ a1, a2, a3 ... ai } form, enable two sequences S1, S2, if the order of occurrence of S2 S1 it
Afterwards, then meet S1 < S2;Enable element a1, a2 the ∈ S in two sequences, if the order of occurrence of a2 after a1, meet a1 <
a2;Analyze the sequence for each data variation process that the data monitoring component of each computer room captures.
7. a kind of method for ensureing data consistency under framework living more than strange land as claimed in claim 6, which is characterized in that institute
State in step 4, the rule for being automatically repaired data is: the change sequence for enabling the record R in computer room A in tables of data is Sa, computer room B
The change sequence of identical recordings R is Sb in middle tables of data;
IfAnd Sa < Sb, then by the final entry of the data R of each computer room be updated to sequence Sb last
A element;
IfAndBj ∈ Sb, meets ai <bj, simultaneouslyBn ∈ Sb, meet am >
Bn then adjusts Sa, the order of elements of Sb, so that Sa < Sb carries out the data R of each computer room according to new sequence Sc=Sa ∪ Sb
It updates.
8. a kind of method for ensureing data consistency under framework living more than strange land as claimed in claim 7, is characterized in that, also wraps
Step 5 is included, business host node real time monitoring, fail-over scheme are established, the specific steps are as follows:
Step 501, data detection packet periodically is sent to each computer room, computer room availability is detected, if it find that the number of some computer room
There is exception in response according to detection packet, then needs to carry out the switching of business host node, go to step 502;
Step 502, host node of the spare computer room as business is selected, sends registration center for the information of the computer room;
Step 503, registration center receives the modification information of service node, and into computer room, each application broadcasting service host node changes
Information.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811220219.7A CN109450988B (en) | 2018-10-19 | 2018-10-19 | Method for guaranteeing data consistency under remote multi-active architecture |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811220219.7A CN109450988B (en) | 2018-10-19 | 2018-10-19 | Method for guaranteeing data consistency under remote multi-active architecture |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109450988A true CN109450988A (en) | 2019-03-08 |
CN109450988B CN109450988B (en) | 2020-07-31 |
Family
ID=65546752
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811220219.7A Active CN109450988B (en) | 2018-10-19 | 2018-10-19 | Method for guaranteeing data consistency under remote multi-active architecture |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109450988B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110691124A (en) * | 2019-09-24 | 2020-01-14 | 华润网络(深圳)有限公司 | Data processing method and system under remote multi-active architecture |
CN114785465A (en) * | 2022-04-26 | 2022-07-22 | 上海识装信息科技有限公司 | Method, server and storage medium for realizing remote multi-activity |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103944784A (en) * | 2014-04-23 | 2014-07-23 | 南京邮电大学 | Large-scale-cloud-data-center-oriented server cooperative monitoring method |
CN105306585A (en) * | 2015-11-12 | 2016-02-03 | 焦点科技股份有限公司 | Data synchronization method for plurality of data centers |
WO2017123674A1 (en) * | 2016-01-11 | 2017-07-20 | Equinix, Inc. | Architecture for data center infrastructure monitoring |
CN107832383A (en) * | 2017-10-30 | 2018-03-23 | 焦点科技股份有限公司 | A kind of data consistency verification method across computer room database |
-
2018
- 2018-10-19 CN CN201811220219.7A patent/CN109450988B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103944784A (en) * | 2014-04-23 | 2014-07-23 | 南京邮电大学 | Large-scale-cloud-data-center-oriented server cooperative monitoring method |
CN105306585A (en) * | 2015-11-12 | 2016-02-03 | 焦点科技股份有限公司 | Data synchronization method for plurality of data centers |
WO2017123674A1 (en) * | 2016-01-11 | 2017-07-20 | Equinix, Inc. | Architecture for data center infrastructure monitoring |
CN107832383A (en) * | 2017-10-30 | 2018-03-23 | 焦点科技股份有限公司 | A kind of data consistency verification method across computer room database |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110691124A (en) * | 2019-09-24 | 2020-01-14 | 华润网络(深圳)有限公司 | Data processing method and system under remote multi-active architecture |
CN110691124B (en) * | 2019-09-24 | 2020-11-24 | 华润网络(深圳)有限公司 | Data processing method and system under remote multi-active architecture |
CN114785465A (en) * | 2022-04-26 | 2022-07-22 | 上海识装信息科技有限公司 | Method, server and storage medium for realizing remote multi-activity |
CN114785465B (en) * | 2022-04-26 | 2024-04-12 | 上海识装信息科技有限公司 | Implementation method, server and storage medium for multiple activities in different places |
Also Published As
Publication number | Publication date |
---|---|
CN109450988B (en) | 2020-07-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020147331A1 (en) | Micro-service monitoring method and system | |
JP3510658B2 (en) | Network analysis method | |
CN102820984B (en) | Automatic network topology detection and modeling | |
EP2563062B1 (en) | Long connection management apparatus and link resource management method for long connection communication | |
CN108737473B (en) | Data processing method, device and system | |
CN109167674B (en) | Service node scoring method, Domain Name System (DNS) scheduling method and server | |
CN106407011B (en) | A kind of method and system of the search system cluster service management based on routing table | |
CN109787827B (en) | CDN network monitoring method and device | |
US5864608A (en) | System and method for formatting performance data in a telecommunications system | |
DE202016107454U1 (en) | System for maintaining service levels of networks | |
US20230239231A1 (en) | Next generation network monitoring architecture | |
US8976681B2 (en) | Network system, network management server, and OAM test method | |
US20050071457A1 (en) | System and method of network fault monitoring | |
WO2021056314A1 (en) | System for providing exact communication delay protection of request response for distributed service | |
CN114205226B (en) | Method and system for guaranteeing business application experience | |
CN109450988A (en) | A method of data consistency is ensured under framework living more than strange land | |
CN112491719A (en) | Network node selection method, equipment and storage medium | |
CN107147662B (en) | Domain name hijacking discovery method | |
CN113301079A (en) | Data acquisition method, system, computing device and storage medium | |
CN111245888A (en) | Video image service management method | |
CN115086140A (en) | Quality evaluation method and device of broadband service, electronic equipment and storage medium | |
CN110380981B (en) | Flow distribution method and equipment | |
CN208656807U (en) | A kind of system for branch access general headquarters | |
CN111935769B (en) | Poor cell identification method, device and equipment | |
CN110266741A (en) | Client traffic automatic scheduling method and device in a kind of content distributing network |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |