CN107196987A - The switching method and server of a kind of pair of centring system - Google Patents
The switching method and server of a kind of pair of centring system Download PDFInfo
- Publication number
- CN107196987A CN107196987A CN201610157457.2A CN201610157457A CN107196987A CN 107196987 A CN107196987 A CN 107196987A CN 201610157457 A CN201610157457 A CN 201610157457A CN 107196987 A CN107196987 A CN 107196987A
- Authority
- CN
- China
- Prior art keywords
- application
- state
- switching
- server
- flag bit
- 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
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/14—Session management
- H04L67/148—Migration or transfer of sessions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/06—Management of faults, events, alarms or notifications
- H04L41/0654—Management of faults, events, alarms or notifications using network fault recovery
- H04L41/0663—Performing the actions predefined by failover planning, e.g. switching to standby network elements
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The present invention relates to communication technical field, the switching method and server of a kind of pair of centring system are disclosed, including:The state flag bit respectively applied in double centring systems is set to switching state by double center switching servers after handover request instruction is received from normal condition, so that each application stops processing data according to state flag bit;Described pair of center switching server determines the second to be switched application, and will be connected with the described second application first switches to the connection between first application and the described 3rd application using the connection between the described second application, the 3rd application is the standby application of the described second application;Described pair of center switching server from switching state it is determined that after the completion of switching, normal condition is set to by the state flag bit of each application.The present invention is time-consuming longer to solve net system switching process in the prior art, the problem of database connection pressure is larger.
Description
Technical field
The present invention relates to communication technical field, more particularly to a kind of pair of centring system switching method and service
Device.
Background technology
In order to prevent Internet service from interrupting, improve and be deployed with simultaneously on the stability of network service, line
Double centring systems, including main application cluster and standby application cluster.Number is generally handled by main application cluster
According to request, when main application is broken down, such as database is delayed machine, APP (application program, Application)
It situations such as application and trouble, can be switched between double centring systems, i.e., service request is switched to standby application
On cluster, while main application cluster no longer processing data is asked, so as to realize that standby application cluster provides network clothes
Business.
Switching between traditional double centring systems is, it is necessary to stop each application in double centring systems, and carry out phase
Configuration modification is answered, then is restarted.When specifically, such as switch data storehouse, in order to prevent foreground from having new operation,
To forbid front-end access during switching, close WEB (internet) applications;In order to ensure master/slave data storehouse
Data are static, need to close all background applications such as APP;In order to ensure that the data of storage are consistent, need to close
Database synchronization application;In addition, after standby databases comparison is primary database, after also needing modification APP i.e.
The database configuration of platform application, issue application again, system just can be used normally.
, for the real-time system of high concurrent, there are some problems in above-mentioned switching mode.Due to current communication system
System scale is than larger, comprising multiple larger application systems, so whole system stops and start-up loading process
The time that need to be expended is longer, and the modification of application configuration data also needs to consume a longer time.In addition, system starts
During need initialization data storehouse connect, application it is more in the case of, larger company can be caused to database
Connect pressure.
The content of the invention
The embodiment of the present invention provides the switching method and server of a kind of pair of centring system, to solve existing skill
Net system switching process is time-consuming longer in art, the problem of database connection pressure is larger.
The switching method of provided in an embodiment of the present invention pair of centring system includes:
Double center switching servers are after handover request instruction is received, the shape that will respectively be applied in double centring systems
State flag bit is set to switching state from normal condition, so that each application stops processing number according to state flag bit
According to;
Described pair of center switching server determines the second to be switched application, and will be connected with the described second application
First application described second application between connection switch to it is described first application and the 3rd application
Between connection, it is described 3rd application for described second application standby application;
Described pair of center switching server is it is determined that after the completion of switching, by the state flag bit of each application from switching
State is set to normal condition.
Optionally, described pair of centring system includes Internet WEB server, the application program being sequentially connected
APP servers and database server;
Described pair of center switching server is by the state flag bit respectively applied in double centring systems from normal condition
Switching state is set to, including:
Described pair of center switching server is by the Status Flag of the corresponding WEB application of the WEB server
Position is set to switching state from normal condition;
After first scheduled time, described pair of center switching server is by the corresponding APP of the APP servers
The state flag bit of application is set to switching state from normal condition;
After second scheduled time, described pair of center switching server is by the corresponding data of the database server
The state flag bit of storehouse synchronous applications is set to switching state from normal condition;
The state flag bit by each application is set to normal condition from switching state, including:
The state flag bit that described pair of center switching server applies the database synchronization is from switching state
It is set to normal condition;
After 3rd scheduled time, the state flag bit that described pair of center switching server applies the APP
Normal condition is set to from switching state;
After 4th scheduled time, described pair of center switching server is by the state flag bit of the WEB application
Normal condition is set to from switching state.
Optionally, first application is APP applications, and second application is same for the database
Step application, first application passes through Light Directory Access Protocol LDAP connections second application;
It is described to switch the first application being connected with the described second application and the connection between the described second application
For described first using the connection between the described 3rd application, including:
Described second application is switched to standby application state by described pair of center switching server by main application state,
And apply described first the described 3rd application after standby application state switching is main application state
LDAP connections are pointed to, and the 3rd application is switched to by the described second application.
Optionally, first application is the WEB application, and second application is APP applications,
First application connects second application by load-balanced server;
It is described to switch the first application being connected with the described second application and the connection between the described second application
For described first using the connection between the described 3rd application, including:
Described second application is switched to standby application state by described pair of center switching server by main application state,
And by the described 3rd application after standby application state switching is main application state, by the load-balanced server
Connection point to, by described second application switch to the 3rd application.
A kind of switching method of pair of centring system, including:
First applies it is determined that first state flag bit applied is set to by double center switching servers
After switching state, stop processing data;
If to be switched application is the second application of the described first application connection, first application and the 3rd
Using connection is set up, the 3rd application is the described second standby application applied;
Described first applies it is determined that described pair of center switching server is by first Status Flag applied
Position is set to after normal condition, start to process data, and the state flag bit of first application is in described pair
Heart switching server determines to be arranged to normal condition after the completion of switching.
Optionally, first apply it is determined that double center switching servers are by first state flag bit applied
It is set to after switching state, stops processing data, including:
First application periodically obtains the state flag bit from described pair of center switching server;
First application is received after data, it is determined that whether the state flag bit obtained is switching shape
State;
After it is determined that the state flag bit obtained is switching state, stop the processing data.
Optionally, if the to be switched application is the second application of the described first application connection, described the
One application is connected with the 3rd using foundation, including:
Standby application state is switched to by main application state in the described second application, and the 3rd application is answered by standby
After being main application state with state switching, the connection that described first is applied is pointed to, and is cut by the described second application
It is changed to the 3rd application.
Optionally, double centring systems include WEB server, APP servers and the database being sequentially connected
Server;
First application is in the WEB application or the APP servers in the WEB server
APP is applied;
Second application is on the APP applications on the APP servers or the database server
Database synchronization application;
And, when the described first application is the WEB application, second application is APP applications;
When the described first application is applied for the APP, second application is the database synchronization application.
A kind of switching server of pair of centring system, including:
Setup module, for receive handover request instruction after, the state that will respectively be applied in double centring systems
Flag bit is set to switching state from normal condition, so that each application stops processing number according to state flag bit
According to;It is determined that after the completion of switching, the state flag bit of each application is set into normal condition from switching state;
Link block, for determining the second to be switched application, and first will be connected with the described second application
Connection between being applied using described second is switched between first application and the described 3rd application
Connection, the 3rd application is the described second standby application applied.
Optionally, the setup module specifically for:
The state flag bit of the corresponding WEB application of the WEB server is set to cut from normal condition
Change state;
After first scheduled time, by the state flag bit of the corresponding APP applications of the APP servers from just
Normal state is set to switching state;
After second scheduled time, by the Status Flag of the corresponding database synchronization application of the database server
Position is set to switching state from normal condition;
The state flag bit that the database synchronization is applied is set to normal condition from switching state;
After 3rd scheduled time, the APP state flag bits applied are set to normally from switching state
State;
After 4th scheduled time, the state flag bit of the WEB application is set to normally from switching state
State.
Optionally, first application is APP applications, and second application is same for the database
Step application, first application connects second application by LDAP;
The link block, specifically for:
Described second application is switched into standby application state by main application state, and by the described 3rd application by standby
After application state switching is main application state, the LDAP connections sensing that described first is applied, by described the
Two applications switch to the 3rd application.
Optionally, first application is the WEB application, and second application is APP applications,
First application connects second application by load-balanced server;
The link block, specifically for:
Described second application is switched into standby application state by main application state, and by the described 3rd application by standby
After application state switching is main application state, the connection of the load-balanced server is pointed to, by described the
Two applications switch to the 3rd application.
A kind of application server of pair of centring system, including:
Judge module, for it is determined that double center switching servers set first state flag bit applied
It is set to after switching state, stops processing data;It is determined that described pair of center switching server should by described first
State flag bit is set to after normal condition, start to process data, the Status Flag of first application
Position determines to be arranged to normal condition after the completion of switching in described pair of center switching server;
Module is set up, if for the second application that to be switched application is the described first application connection, with the
Connection is set up in three applications, and the 3rd application is the standby application of the described second application.
Optionally, the judge module, specifically for:
Periodically the state flag bit is obtained from described pair of center switching server;
Receive after data, it is determined that whether the state flag bit obtained is switching state;
After it is determined that the state flag bit obtained is switching state, stop the processing data.
Optionally, it is described to set up module, specifically for:
Standby application state is switched to by main application state in the described second application, and the 3rd application is answered by standby
After being main application state with state switching, the connection that described first is applied is pointed to, and is cut by the described second application
It is changed to the 3rd application.
Optionally, double centring systems include WEB server, APP servers and the database being sequentially connected
Server;
First application is in the WEB application or the APP servers in the WEB server
APP is applied;
Second application is on the APP applications on the APP servers or the database server
Database synchronization application;
And, when the described first application is the WEB application, second application is APP applications;
When the described first application is applied for the APP, second application is the database synchronization application.
In the embodiment of the present invention, by double center switching servers, introduce state flag bit, be it is double in feel concerned about
Each application in system distributes corresponding state flag bit, so that each application can be according to corresponding state flag bit
State carrys out processing data.Double center switching servers receive handover request instruction, it is determined that double centring systems are needed
Switch over, be to be set to switching state from normal condition by the Status Flag of each application.Each application is known
State flag bit is arranged to switching state, then starts to stop processing data.In double centring systems, first should
Applied with connection second, the second application needs to switch to the 3rd application, wherein, the 3rd application is the second application
Standby application.What double center switching servers determined to need to switch is the second application, then by the first application and the
The connection of two applications switches to the connection of the first application and the 3rd application.Treat that the second application switches to the 3rd application
After the completion of, the state flag bit of each application is re-set as normally by double center switching servers from switching state
State, then each application in system can be according to the state flag bit of normal condition, and start to process data are extensive
Multiple normal work.In the embodiment of the present invention, by the change of reading state flag bit state, each application is determined
Whether normal work, when switching between double centring systems, each related application can not be closed, respectively should only be made
With stopping processing data, it is to be switched after the completion of continue normal work, it is to avoid close each application, save
First close the time restarted loading and wasted, restart simultaneously because avoiding, then without initialization connection,
Alleviate the connection pressure of database.
Brief description of the drawings
Technical scheme in order to illustrate the embodiments of the present invention more clearly, institute in being described below to embodiment
The accompanying drawing needed to use is briefly introduced, it should be apparent that, drawings in the following description are only the present invention's
Some embodiments, for one of ordinary skill in the art, are not paying the premise of creative labor
Under, other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 is the flow chart of the switching method of a kind of pair of centring system in the embodiment of the present invention;
Fig. 2 is the structural representation of double centring systems in the embodiment of the present invention;
Fig. 3 is the schematic diagram of the switching server of a kind of pair of centring system in the embodiment of the present invention;
Fig. 4 is the schematic diagram of the application server of a kind of pair of centring system in the embodiment of the present invention.
Embodiment
In order that the object, technical solutions and advantages of the present invention are clearer, below in conjunction with accompanying drawing to this hair
It is bright to be described in further detail, it is clear that described embodiment is only a part of embodiment of the invention,
Rather than whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art are not doing
Go out all other embodiment obtained under the premise of creative work, belong to the scope of protection of the invention.
In order to increase the stability of communication system, fault-tolerant ability of the communication system for Catastrophic condition, one are improved
As can set up a set of standby application, including front-end WEB application, the background application such as APP, database
Synchronous applications etc.., can be by service switching to standby database when a certain link such as database breaks down
On, it is ensured that the stability of network service.Before handover, because uncontrollable application system is operated, it is necessary to
All applications in system are all stopped, it is to avoid failed transactions occur, while preventing abnormal transaction data from losing
Lose.After the completion of database switching, all related applications are restarted, using needing the new data of connected reference
Storehouse, and application need to be enabled to read new database access configuration, so as to normally access new data
Storehouse.In the case of more, stop and the time of restarting consuming is longer, and application restarting is needed
Configuration file is reloaded to connect new database, can similarly be consumed a longer time.
, should the embodiments of the invention provide the switching method of a kind of pair of centring system in order to solve the above problems
The flow of method is as shown in figure 1, method may include steps of:
S101, double center switching servers will respectively should after handover request instruction is received in double centring systems
State flag bit is set to switching state from normal condition, so that each application stops according to state flag bit
Processing data.
S102, described pair of center switching server determine the second to be switched application, and will be answered with described second
First application and described the are switched to the connection between connected first application and the described second application
Connection between three applications, the 3rd application is the described second standby application applied;
S103, described pair of center switching server are after the completion of it is determined that switch, by the state flag bit of each application
Normal condition is set to from switching state.
The embodiment of the present invention adds double centers switching server between double center switching systems, to monitor
Whole handoff procedure.Double center switching servers can be realized by client and interacted with staff, be connect
The instruction of staff's input is received, are carried out by self-inspection, and is entered on server foreground for switching direction, handoff environment
The synchronous display in real time of row, situation about respectively being applied when alloing the staff accurately hold switching and after switching and
State, and each switch step implementation status, be easy to staff to various situations carry out in time it is appropriate
Processing.
Double centring systems include WEB server, APP servers and the database server being sequentially connected,
As shown in Figure 2.Be provided with WEB server on WEB application, APP servers be provided with APP should
With being provided with database synchronization application on database server.
In the prior art, set an application to be main application on a server, when standby apply is set, need another
One server of outer setting, such as WEB application, there is two WEB servers, a WEB service
Main WEB application is provided with device, standby WEB application is provided with another WEB server.Switching
When APP applications or database, two WEB servers need to be shut down, switching is restarted again after finishing.Together
Reason, for APP applications or database synchronization application, also needs to set two servers respectively.
In the embodiment of the present invention, applied for WEB application and APP, active and standby application is all disposed within one
On server, i.e., a main WEB application, a standby WEB application are provided with one WEB server;
A main APP application is provided with one APP server, a standby APP is applied.During switching, only need
Make using processing data is stopped, after the completion of switching, using starting to continue with data, it is to avoid close and restart
Server, saves the time.
First application is in the WEB application or the APP servers in the WEB server
APP is applied;Second application is the APP applications or the database service on the APP servers
Database synchronization application on device.
For application side, first applies it is determined that double center switching servers are by first state applied
Flag bit is set to after switching state, stops processing data;
If to be switched application is the second application of the described first application connection, first application and the 3rd
Using connection is set up, the 3rd application is the described second standby application applied;
Described first applies it is determined that described pair of center switching server is by first Status Flag applied
Position is set to after normal condition, start to process data.The state flag bit of first application is set to normally
State is that described pair of center switching server determines to set after the completion of switching.
In the embodiment of the present invention, by double center switching servers, introduce state flag bit, be it is double in feel concerned about
Each application in system distributes corresponding state flag bit, so that each application can be according to corresponding state flag bit
State carrys out processing data.Double center switching servers receive handover request instruction, it is determined that double centring systems are needed
Switch over, be to be set to switching state from normal condition by the Status Flag of each application.Each application is known
State flag bit is arranged to switching state, then starts to stop processing data.In double centring systems, first should
Applied with connection second, the second application needs to switch to the 3rd application, wherein, the 3rd application is the second application
Standby application.What double center switching servers determined to need to switch is the second application, then by the first application and the
The connection of two applications switches to the connection of the first application and the 3rd application.Treat that the second application switches to the 3rd application
After the completion of, the state flag bit of each application is re-set as normally by double center switching servers from switching state
State, then each application in system can be according to the state flag bit of normal condition, and start to process data are extensive
Multiple normal work.In the embodiment of the present invention, by the change of reading state flag bit state, each application is determined
Whether normal work, when switching between double centring systems, each related application can not be closed, respectively should only be made
With stopping processing data, it is to be switched after the completion of continue normal work, it is to avoid close each application, save
First close the time restarted loading and wasted, restart simultaneously because avoiding, then without initialization connection,
Alleviate the connection pressure of database.
Double center switching systems are to control each application by state flag bit, provide correspond to WEB respectively
Caching in the state flag bit of layer, APP layer and database layer, the internal memory of Ge Cengshuan centers switching server
State flag bit.Double center switching servers provide single process Flushing status flag bit, so that WEB should
With, APP application and database synchronous applications real time access.The shape cached in internal memory is read in each application in system
State flag bit, and respectively being applied according to the condition adjudgement of state flag bit is in normal operating conditions
Switching state, judges whether each application normally accepts business with this.So, double center switching services can be mitigated
The workload of device, it is to avoid double center switching servers cause whole system abnormal when unavailable.
Apply for every layer and corresponding state flag bit is also cached with respective server memory, respectively using the cycle
Property read state flag bit in double centers switching servers, and with the Status Flag of local server memory storage
The state of position compares, if both states are identical, does not process;If both states are different, by itself
The state of state flag bit in server memory does corresponding change, by the shape of itself corresponding state flag bit
State is set to the state consistency with the state flag bit in the switching server of double centers.
In this way, the state flag bit that each application can be stored directly according to itself judges whether normal work.Tool
For body, first applies it is determined that the state flag bit that double center switching servers are applied described first is set
After switching state, stop processing data, including:
First application periodically obtains the state flag bit from described pair of center switching server, and deposits
Store up in the internal memory of the described first application;
First application after receiving the data, the state mark is read from the internal memory of the described first application
Will position is switching state, stops processing data.
Wherein, corresponding state flag bit in the switching server of double centers is periodically read in the first application, by shape
State flag bit is stored in internal memory.First application is received after business datum, the reading state from the internal memory of itself
The state of flag bit, if state flag bit is switching state, shows that double centers switching system needs to be cut
Change, the first application stops processing data.After the completion of switching, double center switching servers can be by state flag bit
State switch back into normal condition.Corresponding state in the switching server of double centers is periodically read in first application
Flag bit, determines the state of state flag bit that is stored in self EMS memory and the shape in the switching server of double centers
The state of state flag bit is inconsistent, then also switches back into the state of the state flag bit stored in self EMS memory just
Normal state.First application is received after business datum, is read the state flag bit in the first application memory, is obtained
Know to be normal condition, then first apply start to process business datum.
In order to ensure that the business normal process handled is completed, the embodiment of the present invention is by state flag bit from just
Normal state is set to switching state, is to switch since the state flag bit of WEB application, then switches APP
The state flag bit of application, the state flag bit of last switch data storehouse synchronous applications.Specifically, step
S101 includes:
Described pair of center switching server is by the Status Flag of the corresponding WEB application of the WEB server
Position is set to switching state from normal condition;
After first scheduled time, described pair of center switching server is by the corresponding APP of the APP servers
The state flag bit of application is set to switching state from normal condition;
After second scheduled time, described pair of center switching server is by the corresponding data of the database server
The state flag bit of storehouse synchronous applications is set to switching state from normal condition.
It should be noted that it is above-mentioned the fact that switch to standby database mainly for by main database server
Server, when database server is switched over, the upper layer application such as WEB application and APP applications needs to stop
Only processing data.
First, the state flag bit of WEB application is set to switching state, WEB by double center switching servers
After reading, the data that stopping processing being received.Due to WEB application can with front end user direct interaction,
When then WEB application determines that state flag bit is in switching state, can user's displaying for accessing of forward end it is friendly
Interface is reminded, the reason for current system can not be accessed is explained.
It is pre- that the state flag bit of WEB application is set to after switching state first by double center switching servers
After fixing time, the state flag bit that APP is applied is set to switching state.APP applications determine corresponding
State flag bit is switching state, then does not visit again back-end data base, and forward end application feedback current system
Switch over.
After second scheduled time, the state flag bit that double center switching servers apply database synchronization is set
For switching state.Database synchronization software reading state flag bit is switching state, it is determined that in a period of time
What is do not newly increased needs after archive log file, then proceeds by switching.
If it is preferred that the to be switched application is the second application of the described first application connection, described the
One application is connected with the 3rd using foundation, including:
Standby application state is switched to by main application state in the described second application, and the 3rd application is answered by standby
After being main application state with state switching, the connection of first application is pointed to is cut by pointing to second application
It is changed to sensing the 3rd application and is connected so as to realize that first application applies to set up with the 3rd.
For database server switching, specifically, the database synchronization on main database server should
With stopping, and the database synchronization on main database server is applied slave mode is switched to by major state.
Then the database synchronization application on standby database server is stopped, and by for the number on database server
It is main state according to storehouse synchronous applications by slave mode switching.
After database server switching, the sensing that need to apply APP is accordingly changed.Before switching, APP
Using main database server is pointed to, after switching, APP applications need to point to standby database server.The present invention
In embodiment, APP by LDAP using the database synchronization application is connected, then step S102 includes:
Described second application is switched to standby application state, and institute by described pair of center switching server by main application state
The 3rd application is stated after standby application state switching is main application state, first LDAP applied is (light
Measure directory access protocol, Lightweight Directory Access Protocol) connect and point to described in pointing to
Second application switches to sensing the 3rd application;Wherein, first application is APP applications,
Second application is database synchronization application.
After the completion of switching, the state flag bit of each application is set to by double center switching servers from switching state
Normal condition, and then the order set sets APP since the state flag bit that database synchronization is applied
The state flag bit of application, finally sets the state flag bit of WEB application.That is, step S103 includes:
The state flag bit that described pair of center switching server applies the database synchronization is set from switching state
For normal condition;
After 3rd scheduled time, the state flag bit that described pair of center switching server applies the APP
Normal condition is set to from switching state;
After 4th scheduled time, described pair of center switching server is by the state flag bit of the WEB application
Normal condition is set to from switching state.
In the embodiment of the present invention, first application is the WEB application in the WEB server or institute
State the APP applications on APP servers;Second application should for the APP on the APP servers
With or the database server on database synchronization application.
The above-mentioned switching for essentially describing database server, wherein the first application is on APP server
APP is applied, and the second application is the database synchronization application on database server.For double centring systems
Speech, APP applications can also be switched over.Now, the first application is WEB application, and the second application is APP
Using specific switching mode is similar to the switching of database server, and double center switching servers are by WEB
Set gradually using with the state flag bit that APP is applied as switching state, treat that APP application switchings are completed,
The state flag bit that APP is applied is set to normal condition again, then by the state flag bit of WEB application
It is set to normal condition.Unlike, during APP application switchings, database synchronization application is handled without stopping
Data, therefore, the state flag bit of database synchronization application can be always maintained at normal condition.
During APP application switchings, the sensing of WEB application also needs to be changed.WEB application is equal by load
The server that weighs connects the APP applications.Now, step S102 includes:Described pair of center switching server
Described second application is switched into standby application state by main application state, and the 3rd application applies shape by standby
State switching is after main application state, the connection of the load-balanced server is pointed to should by pointing to described second
The 3rd application is pointed to switching to.Before switching, WEB connects main APP by load-balanced server
Using after switching, WEB connects standby APP by load-balanced server and applied.
In order to be more clearly understood that the present invention, above-mentioned flow is retouched in detail with specific embodiment below
State.
In a kind of embodiment of the present invention, work is carried out by the main database server in double centring systems originally
Make, now need to switch to standby database server to be operated.Embodiment specific steps include:
The first step, double center switching servers receive the handover request instruction that staff sends.
The state flag bit of WEB application is set to by second step, double center switching servers from normal condition
Switching state.
The state of 3rd step, WEB application the periodicity reading state flag bit from double center switching servers
Information, and be stored in the internal memory of WEB server.
4th step, WEB application are received after business datum, read the state of the state flag bit in internal memory
Information, is defined as switching state, the business datum that stopping processing being received, and inform that custom system is temporarily stopped
The reason for only handling.
5th step, second step complete 3 seconds after, the shape that double center switching servers apply APP
State flag bit is set to switching state from normal condition.
6th step, APP believe using the state of the periodicity reading state flag bit from double center switching servers
Breath, and be stored in the internal memory of APP servers.
7th step, APP applications are received after business datum, read the state letter of the state flag bit in internal memory
Breath, is defined as switching state, the business datum that stopping processing being received.
8th step, after 3 seconds that the 5th step is completed, double center switching servers are by database server
State flag bit is set to switching state from normal condition.
9th step, database synchronization apply the periodicity reading state flag bit from double center switching servers
Status information, and be stored in the internal memory of database synchronization application.
Tenth step, main database server switch to standby database server, and standby database server is switched to
Main database server.
11st step, double center switching servers point to database connection in LDAP by sensing primary database
It is changed to point to standby database.
The state flag bit that 12nd step, double center switching servers apply APP is set from switching state
For normal condition.
13rd step, APP applications read state flag bit after normal condition, normally to provide phase to outside
Answer function.
14th step, double center switching servers set the state flag bit of WEB application from switching state
For normal condition.
15th step, WEB application read state flag bit after normal condition, normally to provide to outside
Corresponding function.
Based on identical technical concept, the embodiment of the present invention also provides the switching server of double centring systems, such as
Shown in Fig. 3, including:
Setup module 1, for receive handover request instruction after, the shape that will respectively be applied in double centring systems
State flag bit is set to switching state from normal condition, so that each application stops processing number according to state flag bit
According to;It is determined that after the completion of switching, the state flag bit of each application is set into normal condition from switching state;
Link block 2, is applied for determining the second to be switched application, and by the first application and described second
Connection switch to it is described first application and the described 3rd application connection, it is described 3rd application be described second
The standby application of application.
Optionally, setup module 1 specifically for:
The state flag bit of the corresponding WEB application of the WEB server is set to cut from normal condition
Change state;
After first scheduled time, by the state flag bit of the corresponding APP applications of the APP servers from just
Normal state is set to switching state;
After second scheduled time, by the Status Flag of the corresponding database synchronization application of the database server
Position is set to switching state from normal condition;
The state flag bit that the database synchronization is applied is set to normal condition from switching state;
After 3rd scheduled time, the APP state flag bits applied are set to normally from switching state
State;
After 4th scheduled time, the state flag bit of the WEB application is set to normally from switching state
State.
Optionally, first application is the APP applications in APP servers, and second application is number
According to storehouse synchronous applications, first application connects second application by LDAP;
Link block 2, specifically for:
Described second application is switched into standby application state by main application state, and the 3rd application is answered by standby
After being main application state with state switching, the LDAP connections sensing that described first is applied, by described second
Using switching to the 3rd application.
Optionally, first application is the WEB application in the WEB server, and described second should
Applied with for the APP in the APP servers, the WEB application is connected by load-balanced server
Connect second application;
Link block 2, specifically for:
Described second application is switched into standby application state by main application state, and the 3rd application is answered by standby
After being main application state with state switching, the connection of the load-balanced server is pointed to, by described second
Using switching to the 3rd application.
A kind of application server of pair of centring system, as shown in figure 4, including:
Judge module 3, for it is determined that double center switching servers are by first state flag bit applied
It is set to after switching state, stops processing data;It is determined that described pair of center switching server is by described first
The state flag bit of application is set to after normal condition, start to process data, the state mark of first application
Will position determines to be arranged to normal condition after the completion of switching in described pair of center switching server;
Module 4 is set up, if being the second application that the described first application is connected for be switched application, with
Connection is set up in 3rd application, and the 3rd application is the standby application of the described second application.
Optionally, judge module 3, specifically for:
Periodically the state flag bit is obtained from described pair of center switching server;
Receive after data, it is determined that whether the state flag bit obtained is switching state;
After it is determined that the state flag bit obtained is switching state, stop the processing data.
Optionally, module 4 is set up, specifically for:
Standby application state is switched to by main application state in the described second application, and the 3rd application is answered by standby
After being main application state with state switching, the connection that described first is applied is pointed to, and is cut by the described second application
The 3rd application is changed to, so as to realize that first application is connected with the 3rd using foundation.
Double centring systems include WEB server, APP servers and the database server being sequentially connected;
First application is the WEB application in the WEB server or the APP on the APP servers
Using;Second application is on the APP applications on the APP servers or the database server
Database synchronization application;And it is described first application be the WEB application when, it is described second application be institute
State APP applications;When first application is applied for the APP, second application is the database
Synchronous applications.
The present invention is with reference to the production of method according to embodiments of the present invention, equipment (system) and computer program
The flow chart and/or block diagram of product is described.It should be understood that can by computer program instructions implementation process figure and
/ or each flow and/or square frame in block diagram and the flow in flow chart and/or block diagram and/
Or the combination of square frame.These computer program instructions can be provided to all-purpose computer, special-purpose computer, insertion
Formula processor or the processor of other programmable data processing devices are to produce a machine so that pass through and calculate
The instruction of the computing device of machine or other programmable data processing devices is produced for realizing in flow chart one
The device for the function of being specified in individual flow or multiple flows and/or one square frame of block diagram or multiple square frames.
These computer program instructions, which may be alternatively stored in, can guide computer or the processing of other programmable datas to set
In the standby computer-readable memory worked in a specific way so that be stored in the computer-readable memory
Instruction produce include the manufacture of command device, the command device realization in one flow or multiple of flow chart
The function of being specified in one square frame of flow and/or block diagram or multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices, made
Obtain and perform series of operation steps on computer or other programmable devices to produce computer implemented place
Reason, so that the instruction performed on computer or other programmable devices is provided for realizing in flow chart one
The step of function of being specified in flow or multiple flows and/or one square frame of block diagram or multiple square frames.
, but those skilled in the art once know base although preferred embodiments of the present invention have been described
This creative concept, then can make other change and modification to these embodiments.So, appended right will
Ask and be intended to be construed to include preferred embodiment and fall into having altered and changing for the scope of the invention.
Obviously, those skilled in the art can carry out various changes and modification without departing from this hair to the present invention
Bright spirit and scope.So, if the present invention these modifications and variations belong to the claims in the present invention and
Within the scope of its equivalent technologies, then the present invention is also intended to comprising including these changes and modification.
Claims (16)
1. the switching method of a kind of pair of centring system, it is characterised in that including:
Double center switching servers are after handover request instruction is received, the shape that will respectively be applied in double centring systems
State flag bit is set to switching state from normal condition, so that each application stops processing number according to state flag bit
According to;
Described pair of center switching server determines the second to be switched application, and will be connected with the described second application
First application described second application between connection switch to it is described first application and the 3rd application
Between connection, it is described 3rd application for described second application standby application;
Described pair of center switching server is it is determined that after the completion of switching, by the state flag bit of each application from switching
State is set to normal condition.
2. the method as described in claim 1, it is characterised in that described pair of centring system includes phase successively
Internet WEB server, application APP server and database server even;
Described pair of center switching server is by the state flag bit respectively applied in double centring systems from normal condition
Switching state is set to, including:
Described pair of center switching server is by the Status Flag of the corresponding WEB application of the WEB server
Position is set to switching state from normal condition;
After first scheduled time, described pair of center switching server is by the corresponding APP of the APP servers
The state flag bit of application is set to switching state from normal condition;
After second scheduled time, described pair of center switching server is by the corresponding data of the database server
The state flag bit of storehouse synchronous applications is set to switching state from normal condition;
The state flag bit by each application is set to normal condition from switching state, including:
The state flag bit that described pair of center switching server applies the database synchronization is from switching state
It is set to normal condition;
After 3rd scheduled time, the state flag bit that described pair of center switching server applies the APP
Normal condition is set to from switching state;
After 4th scheduled time, described pair of center switching server is by the state flag bit of the WEB application
Normal condition is set to from switching state.
3. method as claimed in claim 2, it is characterised in that first application should for the APP
With second application is the database synchronization application, and first application is accessed by light weight catalog assists
Discuss LDAP connections second application;
It is described to switch the first application being connected with the described second application and the connection between the described second application
For described first using the connection between the described 3rd application, including:
Described second application is switched to standby application state by described pair of center switching server by main application state,
And apply described first the described 3rd application after standby application state switching is main application state
LDAP connections are pointed to, and the 3rd application is switched to by the described second application.
4. method as claimed in claim 2, it is characterised in that first application should for the WEB
With second application is APP applications, and first application is connected by load-balanced server
Second application;
It is described to switch the first application being connected with the described second application and the connection between the described second application
For described first using the connection between the described 3rd application, including:
Described second application is switched to standby application state by described pair of center switching server by main application state,
And by the described 3rd application after standby application state switching is main application state, by the load-balanced server
Connection point to, by described second application switch to the 3rd application.
5. the switching method of a kind of pair of centring system, it is characterised in that including:
First applies it is determined that first state flag bit applied is set to by double center switching servers
After switching state, stop processing data;
If to be switched application is the second application of the described first application connection, first application and the 3rd
Using connection is set up, the 3rd application is the described second standby application applied;
Described first applies it is determined that described pair of center switching server is by first Status Flag applied
Position is set to after normal condition, start to process data, and the state flag bit of first application is in described pair
Heart switching server determines to be arranged to normal condition after the completion of switching.
6. method as claimed in claim 5, it is characterised in that first applies it is determined that double centers switch
First state flag bit applied is set to after switching state by server, stops processing data, including:
First application periodically obtains the state flag bit from described pair of center switching server;
First application is received after data, it is determined that whether the state flag bit obtained is switching shape
State;
After it is determined that the state flag bit obtained is switching state, stop the processing data.
7. method as claimed in claim 5, it is characterised in that if the to be switched application is described
Second application of the first application connection, then first application applies to set up with the 3rd is connected, including:
Standby application state is switched to by main application state in the described second application, and the 3rd application is answered by standby
After being main application state with state switching, the connection that described first is applied is pointed to, and is cut by the described second application
It is changed to the 3rd application.
8. the method as described in any one of claim 5 to 7, it is characterised in that double centring systems include
WEB server, APP servers and the database server being sequentially connected;
First application is in the WEB application or the APP servers in the WEB server
APP is applied;
Second application is on the APP applications on the APP servers or the database server
Database synchronization application;
And, when the described first application is the WEB application, second application is APP applications;
When the described first application is applied for the APP, second application is the database synchronization application.
9. the switching server of a kind of pair of centring system, it is characterised in that including:
Setup module, for receive handover request instruction after, the state that will respectively be applied in double centring systems
Flag bit is set to switching state from normal condition, so that each application stops processing number according to state flag bit
According to;It is determined that after the completion of switching, the state flag bit of each application is set into normal condition from switching state;
Link block, for determining the second to be switched application, and first will be connected with the described second application
Connection between being applied using described second is switched between first application and the described 3rd application
Connection, the 3rd application is the described second standby application applied.
10. server as claimed in claim 9, it is characterised in that the setup module specifically for:
The state flag bit of the corresponding WEB application of the WEB server is set to cut from normal condition
Change state;
After first scheduled time, by the state flag bit of the corresponding APP applications of the APP servers from just
Normal state is set to switching state;
After second scheduled time, by the Status Flag of the corresponding database synchronization application of the database server
Position is set to switching state from normal condition;
The state flag bit that the database synchronization is applied is set to normal condition from switching state;
After 3rd scheduled time, the APP state flag bits applied are set to normally from switching state
State;
After 4th scheduled time, the state flag bit of the WEB application is set to normally from switching state
State.
11. server as claimed in claim 10, it is characterised in that first application is the APP
Using second application is the database synchronization application, and first application connects institute by LDAP
State the second application;
The link block, specifically for:
Described second application is switched into standby application state by main application state, and by the described 3rd application by standby
After application state switching is main application state, the LDAP connections sensing that described first is applied, by described the
Two applications switch to the 3rd application.
12. server as claimed in claim 10, it is characterised in that first application is the WEB
Using second application is APP applications, and first application is connected by load-balanced server
Connect second application;
The link block, specifically for:
Described second application is switched into standby application state by main application state, and by the described 3rd application by standby
After application state switching is main application state, the connection of the load-balanced server is pointed to, by described the
Two applications switch to the 3rd application.
13. the application server of a kind of pair of centring system, it is characterised in that including:
Judge module, for it is determined that double center switching servers set first state flag bit applied
It is set to after switching state, stops processing data;It is determined that described pair of center switching server should by described first
State flag bit is set to after normal condition, start to process data, the Status Flag of first application
Position determines to be arranged to normal condition after the completion of switching in described pair of center switching server;
Module is set up, if for the second application that to be switched application is the described first application connection, with the
Connection is set up in three applications, and the 3rd application is the standby application of the described second application.
14. server as claimed in claim 13, it is characterised in that the judge module, specific to use
In:
Periodically the state flag bit is obtained from described pair of center switching server;
Receive after data, it is determined that whether the state flag bit obtained is switching state;
After it is determined that the state flag bit obtained is switching state, stop the processing data.
15. server as claimed in claim 13, it is characterised in that described to set up module, specific to use
In:
Standby application state is switched to by main application state in the described second application, and the 3rd application is answered by standby
After being main application state with state switching, the connection that described first is applied is pointed to, and is cut by the described second application
It is changed to the 3rd application.
16. the server as described in any one of claim 13 to 15, it is characterised in that double centring systems
Including the WEB server being sequentially connected, APP servers and database server;
First application is in the WEB application or the APP servers in the WEB server
APP is applied;
Second application is on the APP applications on the APP servers or the database server
Database synchronization application;
And, when the described first application is the WEB application, second application is APP applications;
When the described first application is applied for the APP, second application is the database synchronization application.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610157457.2A CN107196987A (en) | 2016-03-15 | 2016-03-15 | The switching method and server of a kind of pair of centring system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610157457.2A CN107196987A (en) | 2016-03-15 | 2016-03-15 | The switching method and server of a kind of pair of centring system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107196987A true CN107196987A (en) | 2017-09-22 |
Family
ID=59871144
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610157457.2A Pending CN107196987A (en) | 2016-03-15 | 2016-03-15 | The switching method and server of a kind of pair of centring system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107196987A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108647113A (en) * | 2018-03-30 | 2018-10-12 | 阿里巴巴集团控股有限公司 | A kind of Disaster Recovery Method and server |
CN109885344A (en) * | 2019-02-27 | 2019-06-14 | 四川航空股份有限公司 | Operating system switching method and device |
CN110166524A (en) * | 2019-04-12 | 2019-08-23 | 陆金所(上海)科技服务有限公司 | Switching method, device, equipment and the storage medium of data center |
CN111723066A (en) * | 2020-05-08 | 2020-09-29 | 武汉达梦数据库有限公司 | Database switching method and database switching system based on log analysis synchronization |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101094310A (en) * | 2006-06-23 | 2007-12-26 | 华为技术有限公司 | Method, application, and device for changing application states in multiple current services |
CN101136900A (en) * | 2006-10-16 | 2008-03-05 | 中兴通讯股份有限公司 | Fast transparent fault shift device and implementing method facing to service |
US20100011126A1 (en) * | 2000-09-26 | 2010-01-14 | Foundry Networks, Inc. | Global server load balancing |
CN103647849A (en) * | 2013-12-24 | 2014-03-19 | 华为技术有限公司 | Method and device for migrating businesses and disaster recovery system |
CN204272157U (en) * | 2014-12-29 | 2015-04-15 | 同方威视技术股份有限公司 | Switched system |
-
2016
- 2016-03-15 CN CN201610157457.2A patent/CN107196987A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100011126A1 (en) * | 2000-09-26 | 2010-01-14 | Foundry Networks, Inc. | Global server load balancing |
CN101094310A (en) * | 2006-06-23 | 2007-12-26 | 华为技术有限公司 | Method, application, and device for changing application states in multiple current services |
CN101136900A (en) * | 2006-10-16 | 2008-03-05 | 中兴通讯股份有限公司 | Fast transparent fault shift device and implementing method facing to service |
CN103647849A (en) * | 2013-12-24 | 2014-03-19 | 华为技术有限公司 | Method and device for migrating businesses and disaster recovery system |
CN204272157U (en) * | 2014-12-29 | 2015-04-15 | 同方威视技术股份有限公司 | Switched system |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108647113A (en) * | 2018-03-30 | 2018-10-12 | 阿里巴巴集团控股有限公司 | A kind of Disaster Recovery Method and server |
CN109885344A (en) * | 2019-02-27 | 2019-06-14 | 四川航空股份有限公司 | Operating system switching method and device |
CN110166524A (en) * | 2019-04-12 | 2019-08-23 | 陆金所(上海)科技服务有限公司 | Switching method, device, equipment and the storage medium of data center |
CN111723066A (en) * | 2020-05-08 | 2020-09-29 | 武汉达梦数据库有限公司 | Database switching method and database switching system based on log analysis synchronization |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112181397B (en) | Flow visual monitoring method, device, computer equipment and storage medium | |
CN109831500B (en) | Synchronization method for configuration file and Pod in Kubernetes cluster | |
CN107196987A (en) | The switching method and server of a kind of pair of centring system | |
CN103154893B (en) | Multi-core processor system, supervision control method and supervisory control program | |
CN109729129A (en) | Configuration modification method, storage cluster and the computer system of storage cluster | |
CN102170365B (en) | Method and system for realizing hot deployment of software system | |
CN109194514B (en) | Dual-computer monitoring method and device, server and storage medium | |
CN106909411A (en) | A kind of file updating method and device | |
US11803538B2 (en) | Distributed transaction processing method and related apparatus | |
TWI624757B (en) | Data processing method, data processing system, and computer program product | |
US7475280B1 (en) | Active-active server for high availability of data replication management application | |
CN104750554B (en) | The method and apparatus of Data Migration between a kind of virtual machine | |
CN107919977A (en) | A kind of on-line rapid estimation of the distributed consensus system based on Paxos agreements, the method and apparatus of online capacity reducing | |
WO2017107788A1 (en) | Machine learning tool middleware and training method of machine learning | |
CN110874261A (en) | Usability system, usability method, and storage medium storing program | |
CN109976912A (en) | A kind of realization method and system of the distributed computing based on FPGA | |
CN108874549A (en) | resource multiplexing method, device, terminal and computer readable storage medium | |
CN112671613A (en) | Federal learning cluster monitoring method, device, equipment and medium | |
CN109828826B (en) | Task progress polling method, device and system | |
CN105471986B (en) | A kind of Constructing data center Scale Revenue Ratio method and device | |
CN106850354A (en) | A kind of processing method and processing device of Single Point of Faliure | |
US20210258266A1 (en) | Orchestrating apparatus, vnfm apparatus, managing method and program | |
CN103780433B (en) | Self-healing type virtual resource configuration management data architecture | |
JPH08185330A (en) | Method for switching redundant computer system | |
JP2008250427A (en) | Upgrading device for use in information processing system, information processing system therewith, and program for upgrading information processing system |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170922 |
|
RJ01 | Rejection of invention patent application after publication |