The content of the invention
, can be right in order to solve the above technical problem, the present invention provides a kind of evaluating method and device of clustering system
The regulative strategy and performance of clustering system are evaluated and tested.
The present invention provides a kind of evaluating method of clustering system, including:
Step 1, the cluster caller information table of central server is obtained, is wrapped in the cluster caller information table
Contain:Invocation target address, Profile Path, disaster tolerance switching time limit;
Step 2, A reads configuration file according to the Profile Path, judges the calling according to configuration file content
Whether destination address configures rationally;When being determined as unreasonable, the first warning information is generated, generation is believed comprising the described first alarm
The report of accessment and test of breath;And/or B judges whether the clustering system is complete within the disaster tolerance switching time limit by simulation test
Switch into disaster tolerance;When the clustering system does not complete disaster tolerance switching within the disaster tolerance switching time limit, the alarm of generation second
Information, generation include the report of accessment and test of second warning information;
Step 3, report of accessment and test is exported.
Further, in such scheme, the method further includes:
According to the access log of the clustering system, judge whether the cluster caller table is complete;
When the cluster caller table is complete, the step 2 is performed;
When the cluster caller table is imperfect, the 3rd warning information is generated, generation is believed comprising the described 3rd alarm
The report of accessment and test of breath simultaneously performs the step 3.
Further, in such scheme, also included in the cluster caller information table:First calling source address,
First application service title;The access log according to the clustering system judges whether the cluster caller table is complete
It is whole including:
Extract the second calling source address in preset time in the access log of the clustering system and the second application
Service name;
Source address consistent and first application service with the described second calling source address is called when described first
When title is consistent with the second application service title, judge that the cluster caller table is complete;
Otherwise, judge that the cluster caller table is incomplete.
Further, it is described to judge whether the invocation target address configures according to configuration file content in such scheme
Rationally include:
According to the configuration file, called server address and default calling configuration strategy are obtained;
When the invocation target address and the called server address differ, the invocation target address is judged
It is unreasonable;And/or
When the invocation target mail returned on ground of incorrect address closes default calling configuration strategy, judge that the invocation target address does not conform to
Reason.
Further, it is described to judge the clustering system whether in the disaster tolerance by simulation test in such scheme
Disaster tolerance switching is completed in the switching time limit to be included:
Respectively specify that and call to come described in the server active shield pointed by any of invocation target address address
The request that source address is sent;
Whether observation clustering system switches to the request in the invocation target address takes pointed by other addresses
Business device;
When the request is switched to service pointed by other addresses in the invocation target address by the clustering system
During device, the switching time used in the handoff procedure is recorded;
When the server pointed by all addresses in the invocation target address was designated, ask all to be cut each time
Change and corresponding switching time be less than or equal to the disaster tolerance switching when prescribe a time limit, judge that the clustering system is cut in the disaster tolerance
Change in the time limit and complete disaster tolerance switching;
Otherwise, the clustering system does not complete disaster tolerance switching within the disaster tolerance switching time limit.
The present invention also provides a kind of evaluating apparatus of clustering system, described device includes:Information table acquisition module, configuration
Determination module and/or disaster tolerance test module and report output module;Wherein,
Information table acquisition module, for obtaining the cluster caller information table of central server, the cluster calls journey
Included in sequence information table:Invocation target address, Profile Path, disaster tolerance switching time limit;
Determination module is configured, for reading configuration file according to the Profile Path, is sentenced according to configuration file content
Whether the fixed invocation target address configures rationally;When being determined as unreasonable, the first warning information is generated;
Disaster tolerance test module, for by simulation test, judging the clustering system whether when the disaster tolerance switches
Disaster tolerance switching is completed in limit;When the clustering system does not complete disaster tolerance switching within the disaster tolerance switching time limit, generation the
Two warning information;
Report output module, for exporting report of accessment and test, the report of accessment and test includes first warning information and/or institute
State the second warning information.
Further, in such scheme, described device further includes information table look-up module, described information table look-up module bag
Include:
Judge full unit, for obtain central server cluster caller information table after, according to the cluster
The access log of change system, judges whether the cluster caller table is complete;
First jump-transfer unit, for when the cluster caller table is complete, jump to it is described configuration determination module and/
Or disaster tolerance test module;
Second jump-transfer unit, when the cluster caller table is imperfect, generates the 3rd warning information, generation includes institute
State the report of accessment and test of the 3rd warning information and jump to the report output module.
Further, in such scheme, also included in the cluster caller information table:First calling source address,
First application service title;The judgement full unit includes:
Subelement is extracted, for extracting the second calling source in preset time in the access log of the clustering system
Address and the second application service title;
Judgment sub-unit, for calling source address source address being consistent and institute with the described second calling when described first
State the first application service title it is consistent with the second application service title when, judge that the cluster caller table is complete
's;Otherwise, judge that the cluster caller table is incomplete.
Further, in such scheme, the configuration determination module includes:
Acquiring unit, for according to the configuration file, obtaining called server address and default call configuring plan
Slightly;
Server judging unit, for when the invocation target address and the called server address differ,
Judge that the invocation target address is unreasonable;And/or
Tactful judging unit, for when the invocation target mail returned on ground of incorrect address closes default calling configuration strategy, judging institute
It is unreasonable to state invocation target address.
Further, in such scheme, the disaster tolerance test module includes:
Screen unit, for respectively specifying that the server pointed by any of invocation target address address actively shields
State the request for calling source address to send in covert;
Observation unit, for observe clustering system whether by it is described request switch to it is other in the invocation target address
Server pointed by address;
Recording unit, for when the clustering system request switched to it is other in the invocation target address
Pointed by location during server, the switching time used in the handoff procedure is recorded;
Disaster tolerance judging unit, for being designated when the server pointed by all addresses in the invocation target address
Cross, ask all to be switched each time and corresponding switching time be less than or equal to the disaster tolerance switching when prescribe a time limit, judge the collection
Groupization system completes disaster tolerance switching within the disaster tolerance switching time limit;Otherwise, the clustering system does not switch in the disaster tolerance
Disaster tolerance switching is completed in time limit.
Embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, the technical solution in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is
Part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art
All other embodiments obtained without making creative work, belong to the scope of protection of the invention.Need
Illustrate, in the case where there is no conflict, the feature in embodiment and embodiment in the application can be mutually combined.
The present invention provides a kind of evaluating apparatus, for implementing the evaluating method of clustering system provided by the invention.
Fig. 1 realizes flow diagram for the evaluating method of clustering system provided in an embodiment of the present invention, such as Fig. 1 institutes
Show, this method includes:
Step 1, the cluster caller information table of central server is obtained, is wrapped in the cluster caller information table
Contain:Invocation target address, Profile Path, disaster tolerance switching time limit;
Specifically, evaluating apparatus obtains the cluster caller information table of central server, in general, the cluster caller
Included in information table:First calls source address, the first application service title, clustering systematic name, first access resource, adjust
With information such as destination address, Profile Path, disaster tolerance switching time limits;
Here, cluster caller refers to the system, module, the general designation of interface of cluster service.
Table 1 is cluster caller information table example in one embodiment.
Table 1
Evaluating apparatus gets cluster caller information table, it becomes possible to obtains being used to evaluate and test whether clustering system has
Many key messages of high reliability, including:First calling source address, the first application service title, invocation target address, match somebody with somebody
Put file path, disaster tolerance switching time limit etc..
Therefore, whether the content of cluster caller information table is complete correct, will directly affect evaluating apparatus to clustering
The reliability of the evaluation result of system.So in certain embodiments, above-mentioned evaluating method further includes:
After the cluster caller information table of central server is obtained, according to the access log of the clustering system,
Judge whether the cluster caller table is complete;
When the cluster caller table is complete, following step 2 is performed;
When the cluster caller table is imperfect, generates the 3rd warning information and perform following step 3, generation includes
The report of accessment and test of 3rd warning information.
Specifically, the above-mentioned access log according to the clustering system judges whether the cluster caller table is complete
Including:
Extract the second calling source address in preset time in the access log of the clustering system and the second application
Service name;
Source address consistent and first application service with the described second calling source address is called when described first
When title is consistent with the second application service title, judge that the cluster caller table is complete;
Otherwise, judge that the cluster caller table is incomplete.
, can be by server ip address (the i.e. first calling source place when accessing clustering system due to, cluster caller
Location) and the first application service title be put into solicited message, clustering system is subject to call request, record by allocating time, visit
Ask resource, call source IP addresses, call the information such as source application service into access log, so that, the visit of clustering system
Ask in daily record and generally comprise:Allocating time, second access the letters such as resource, the second calling source address, second application service title
Breath.
For example, the cluster caller information table for the central server that evaluating apparatus is got is as shown in table 1, it accesses collection
During group 1, by 1.1.1.1, cluster 1 is carried to using 1 and 2.2.2.1, using 2;Cluster 1 prints access log, forgives
1.1.1.1, using 1 and 2.2.2.1, using 2 this two;This information is two second and calls source address and the second application clothes
Business name information;By they respectively with from cluster caller information table (table 1) obtain first call source address and first
Application service title is contrasted, and is contrasted uniformity, is then judged that the cluster caller information table is complete;Assuming that exist in daily record
3.3.3.3, using 3 access, or only 1.1.1.1, using 1 or only 2.2.2.1 apply 2, then judge cluster call journey
Sequence information table is imperfect.
Further, in certain embodiments, when evaluating apparatus finds that cluster caller information table is imperfect, not only
The 3rd warning information is generated, the report of accessment and test comprising the 3rd warning information is will additionally generate and jumps to following step 3, exits this
The secondary evaluation and test process to clustering system.
Step 2, A reads configuration file according to the Profile Path, judges the calling according to configuration file content
Whether destination address configures rationally;When being determined as unreasonable, the first warning information is generated, generation is believed comprising the described first alarm
The report of accessment and test of breath;
Specifically, evaluating apparatus reads configuration file according to the Profile Path, judged according to configuration file content
Whether the invocation target address configures rationally;When being determined as unreasonable, the first warning information is generated, generation includes described the
The report of accessment and test of one warning information;
It is described rationally to include according to whether the configuration file content judgement invocation target address configures in such scheme:
According to the configuration file, called server address and default calling configuration strategy are obtained;
When the invocation target address and the called server address differ, the invocation target address is judged
It is unreasonable;And/or
When the invocation target mail returned on ground of incorrect address closes default calling configuration strategy, judge that the invocation target address does not conform to
Reason.
Here, the default calling configuration strategy include but not limited to " configuration clustering server ip minimum number ",
" different server in machine room ", " heterogeneous networks region server ", " different isp servers " etc..In general, default call configuration plan
Slightly necessarily it is included in configuration file, configuration strategy has unique identification to be key, if illustrating that calling is matched somebody with somebody in configuration file
Put strategy, then it is default to think that " configuration clustering server ip minimum number " is 0.Such as:“server_ip:1.1.1.1
2.2.2.2 ", wherein server_ip is the default unique mark for calling configuration strategy in configuration file.
Such as:The cluster caller information table for the central server that evaluating apparatus is got is as shown in table 1, now for table
First in 1 judges whether its invocation target address configures rationally.Evaluating apparatus reads cluster server IP numbers in Config1
According to " whether 4.4.4.1,4.4.4.2 " are consistent, and it is reasonable unanimously then to judge, inconsistent, judges not with invocation target address for judgement
Rationally;Assert that invocation target address configuration is 4.4.4.1,4.4.4.2 if consistent;
At this time, pre-set assessment strategy is that minimum IP is N number of, and relation is different computer rooms.And actual invocation target
There are 2 IP in location, therefore, if N is more than 2, actual invocation target address number does not meet default assessment strategy requirement, then
Judge unreasonable;If N is less than or equal to 2, actual invocation target address number meets default assessment strategy requirement, then sentences
It is fixed reasonable.Then, evaluating apparatus judges IP address 4.4.4.1,4.4.4.2 whether in identical computer room, if in identical machine
Fang Zhong, then be determined as it is unreasonable, otherwise, it is determined that being reasonable.
Thus, evaluating apparatus can complete clustering system and configure rational inspection to cluster caller.
Further, in order to which the reliability of more perfect evaluation and test clustering system, above-mentioned evaluating method can also include:
Step 2, B judges whether the clustering system is completed to hold within the disaster tolerance switching time limit by simulation test
Calamity switches;When the clustering system does not complete disaster tolerance switching within the disaster tolerance switching time limit, the second warning information is generated,
Generation includes the report of accessment and test of second warning information;
Specifically, whether evaluating apparatus can judge the clustering system in the disaster tolerance by actual test process
Switch and disaster tolerance switching is completed in the time limit;When the clustering system does not complete disaster tolerance switching within the disaster tolerance switching time limit,
The second warning information is generated, generation includes the report of accessment and test of second warning information;
Wherein, it is described to judge whether the clustering system switches completion in the time limit in the disaster tolerance and hold by simulation test
Calamity switching includes:
Respectively specify that and call to come described in the server active shield pointed by any of invocation target address address
The request that source address is sent;
Whether observation clustering system switches to the request in the invocation target address takes pointed by other addresses
Business device;
When the request is switched to service pointed by other addresses in the invocation target address by the clustering system
During device, the switching time used in the handoff procedure is recorded;
When the server pointed by all addresses in the invocation target address was designated, ask all to be cut each time
Change and corresponding switching time be less than or equal to the disaster tolerance switching when prescribe a time limit, judge that the clustering system is cut in the disaster tolerance
Change in the time limit and complete disaster tolerance switching;
Otherwise, the clustering system does not complete disaster tolerance switching within the disaster tolerance switching time limit.
For example, the cluster caller information table for the central server that evaluating apparatus is got is as shown in table 1, now for table
First in 1 carries out test judgement.Evaluating apparatus is shielded from IP address on the server that IP address is 4.4.4.1
1.1.1.1, the call request of the entitled application 1 of application service accesses, and records the time;Monitor the clothes that IP address is 4.4.4.2
The access log being engaged on device, confirms that above-mentioned access request reaches the time at backup server 4.4.4.2;When calculating this switching
Between, the disaster tolerance switching time limit in cluster caller information table is contrasted, switches the time limit if less than or equal to the disaster tolerance, then assert
This disaster tolerance is switched in the setting time limit and completed, if it exceeds the disaster tolerance switching time limit does not switch, is then judged handoff failure, is recognized
The switching of constant volume calamity is abnormal;Then, evaluating apparatus is shielded from IP address on the server that IP address is 4.4.4.2 is
1.1.1.1, the call request of the entitled application 1 of application service accesses, and records the time;Monitor the clothes that IP address is 4.4.4.1
The access log being engaged on device, confirms that above-mentioned access request reaches the time at backup server 4.4.4.1;When calculating this switching
Between, the disaster tolerance switching time limit in cluster caller information table is contrasted, switches the time limit if less than or equal to the disaster tolerance, then assert
This disaster tolerance is switched in the setting time limit and completed, if it exceeds the disaster tolerance switching time limit does not switch, is then judged handoff failure, is recognized
The switching of constant volume calamity is abnormal;Completed if switched twice within the setting time limit, judge that clustering system disaster tolerance ability is normal.
Particularly, this step 2B can complete the test and appraisal to clustering system disaster tolerance ability, be not rely on step 2A, therefore
In certain embodiments, evaluating apparatus can skip step 2A, directly perform step 2B;Certainly, in certain embodiments, evaluation and test dress
Step 2A can only be performed by putting, and skip step 2B.
Step 3, report of accessment and test is exported.
Specifically, situation of the evaluating apparatus according to evaluation and test, exports the report of accessment and test generated.
For example, evaluating apparatus according to such scheme detect it is abnormal obtain warning information, then outputting alarm information, and working as
When it is not detected by abnormal, report of accessment and test can be the data of the normal evaluation result of each link and test process.
The evaluating method of the clustering system provided using above-described embodiment, can find clustering system for collection in time
Group caller exist which configuration mistakes and omissions, meanwhile, can actually detected clustering system redundancy ability, in time discovery disaster tolerance energy
The deficiency of power;When not occurring so as to failure, prevent in advance, reduce the risk that failure occurs, improve the reliability of clustering system.
Fig. 2 is the composition structure diagram of the evaluating apparatus of clustering system provided in an embodiment of the present invention, such as Fig. 2 institutes
Show, which includes:Information table acquisition module 201, configuration determination module 202 and/or disaster tolerance test module 203 and
Report output module 204;Wherein,
Information table acquisition module 201, for obtaining the cluster caller information table of central server, the cluster calls
Included in program information table:First call source address, the first application service title, invocation target address, Profile Path,
Disaster tolerance switches the time limit;
Determination module 202 is configured, for reading configuration file according to the Profile Path, according to configuration file content
Judge whether the invocation target address configures rationally;When being determined as unreasonable, the first warning information is generated, generation includes institute
State the report of accessment and test of the first warning information;
Disaster tolerance test module 203, for by simulation test, judging whether the clustering system switches in the disaster tolerance
Disaster tolerance switching is completed in time limit;When the clustering system does not complete disaster tolerance switching within the disaster tolerance switching time limit, generation
Second warning information, generation include the report of accessment and test of second warning information;
Report output module 204, for exporting report of accessment and test, the report of accessment and test include first warning information and/
Or second warning information.
Further, above-mentioned evaluating apparatus further includes information table look-up module, and described information table look-up module includes:
Judge full unit, for obtain central server cluster caller information table after, according to the cluster
The access log of change system, judges whether the cluster caller table is complete;
First jump-transfer unit, for when the cluster caller table is complete, jumping to the configuration determination module 202
And/or disaster tolerance test module 203;
Second jump-transfer unit, when the cluster caller table is imperfect, generates the 3rd warning information, generation includes institute
State the report of accessment and test of the 3rd warning information and jump to the report output module 204..
Further, in such scheme, the judgement full unit includes:
Subelement is extracted, for extracting the second calling source in preset time in the access log of the clustering system
Address and the second application service title;
Judgment sub-unit, for calling source address source address being consistent and institute with the described second calling when described first
State the first application service title it is consistent with the second application service title when, judge that the cluster caller table is complete
's;Otherwise, judge that the cluster caller table is incomplete.
In such scheme, above-mentioned configuration determination module 202 includes:
Acquiring unit, for according to the configuration file, obtaining called server address and default call configuring plan
Slightly;
Server judging unit, for when the invocation target address and the called server address differ,
Judge that the invocation target address is unreasonable;And/or
Tactful judging unit, for when the invocation target mail returned on ground of incorrect address closes default calling configuration strategy, judging institute
It is unreasonable to state invocation target address.
In such scheme, above-mentioned disaster tolerance test module 203 includes:
Screen unit, for respectively specifying that the server pointed by any of invocation target address address actively shields
State the request for calling source address to send in covert;
Observation unit, for observe clustering system whether by it is described request switch to it is other in the invocation target address
Server pointed by address;
Recording unit, for when the clustering system request switched to it is other in the invocation target address
Pointed by location during server, the switching time used in the handoff procedure is recorded;
Disaster tolerance judging unit, for being designated when the server pointed by all addresses in the invocation target address
Cross, ask all to be switched each time and corresponding switching time be less than or equal to the disaster tolerance switching when prescribe a time limit, judge the collection
Groupization system completes disaster tolerance switching within the disaster tolerance switching time limit;Otherwise, the clustering system does not switch in the disaster tolerance
Disaster tolerance switching is completed in time limit.
Above-mentioned modules and unit in practical applications, can be by the central processing units in evaluating apparatus
(CPU), microprocessor (MPU), digital signal processor (DSP) or field programmable gate array (FPGA) are realized.
Descriptions above can combine implementation individually or in a variety of ways, and these variants all exist
Within protection scope of the present invention.
One of ordinary skill in the art will appreciate that all or part of step in the above method can be instructed by program
Related hardware is completed, and described program can be stored in computer-readable recording medium, such as read-only storage, disk or CD
Deng.Alternatively, all or part of step of above-described embodiment can also be realized using one or more integrated circuits, accordingly
Ground, each module/unit in above-described embodiment can be realized in the form of hardware, can also use the shape of software function module
Formula is realized.The present invention is not restricted to the combination of the hardware and software of any particular form.
It should be noted that herein, term " comprising ", "comprising" or its any other variant are intended to non-row
His property includes, so that article or equipment including a series of elements not only include those key elements, but also including not
There is the other element being expressly recited, or further include as this article or the intrinsic key element of equipment.Do not limiting more
In the case of system, the key element that is limited by sentence " including ... ", it is not excluded that in the article including the key element or equipment
Also there are other identical element.
The above embodiments are merely illustrative of the technical solutions of the present invention and it is unrestricted, reference only to preferred embodiment to this hair
It is bright to be described in detail.It will be understood by those of ordinary skill in the art that it can modify to technical scheme
Or equivalent substitution, without departing from the spirit and scope of technical solution of the present invention, the claim model in the present invention should all be covered
Among enclosing.