CN105939225B - A kind of method and device that business executes - Google Patents

A kind of method and device that business executes Download PDF

Info

Publication number
CN105939225B
CN105939225B CN201610466985.6A CN201610466985A CN105939225B CN 105939225 B CN105939225 B CN 105939225B CN 201610466985 A CN201610466985 A CN 201610466985A CN 105939225 B CN105939225 B CN 105939225B
Authority
CN
China
Prior art keywords
business
time
period
adjustment period
out time
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.)
Active
Application number
CN201610466985.6A
Other languages
Chinese (zh)
Other versions
CN105939225A (en
Inventor
郝忠秀
王崇
任文越
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Weimeng Chuangke Network Technology China Co Ltd
Original Assignee
Weimeng Chuangke Network Technology China Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Weimeng Chuangke Network Technology China Co Ltd filed Critical Weimeng Chuangke Network Technology China Co Ltd
Priority to CN201610466985.6A priority Critical patent/CN105939225B/en
Publication of CN105939225A publication Critical patent/CN105939225A/en
Application granted granted Critical
Publication of CN105939225B publication Critical patent/CN105939225B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/0816Configuration setting characterised by the conditions triggering a change of settings the condition being an adaptation, e.g. in response to network events
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/101Server selection for load balancing based on network conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1014Server selection for load balancing based on the content of a request
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1027Persistence of sessions during load balancing

Abstract

This application discloses the method and devices that a kind of business executes, server can be according to each adjustment period for the preset adjustment time-out time of business in this method, determine the business in each history adjustment period corresponding each history time-out time, server can be according to each history time-out time determined, determine that the business in currently adjustment period corresponding time-out time, then executes the business.Since server can be according to the history time-out time of the business, determine the business in the time-out time in currently adjustment period, therefore, when there is high load in server, server can be according to the corresponding history time-out time of the business when this period there is high load in the past, the business is automatically performed in the adjustment of present period, in terms of existing technologies, server modifies the time-out time of the business when degrading to business without service maintenance personnel means on line, the maintenance personnel for improving business on line is carrying out the convenience in demotion processes to business.

Description

A kind of method and device that business executes
Technical field
This application involves the method and devices that field of computer technology more particularly to a kind of business execute.
Background technique
In order to meet daily life demand, currently, many line upper mounting plates provide diversified for user Business model, the business model that user can be provided by these line upper mounting plates, to complete some previously to have needed to complete under line Business is brought conveniently to greatly improve the efficiency of user's processing business for the daily life of user.
In practical applications, all multi-services that line upper mounting plate provides can usually distinguish core business and non-core services, example Such as, for microblogging business, browsing this business of microblogging just belongs to core business, and advertisement pushing involved in microblogging business Business then belongs to non-core services, and in other words, core business should be one of most important business in entire business, and non-core Influence of the business for entire business is then little.When therefore, when server is in high load the case where, in order to guarantee core business Normal operation, it will usually non-core business is degraded, for example, the time-out time of non-core services is shortened, Or directly close the non-core services, so, since non-core services are degraded so that non-core services reduce or The resource of server is no longer occupied, therefore, server can be by most resource allocation to core business, to effectively guarantee Core business in server is in the normal operation under high load operating condition.
However, being usually all to be degraded by the way of artificial to non-core services in the prior art, that is, When server is in the case where high load is run, the maintenance personnel of business needs manually to go the super of non-core services on line When the time modify, or deactivate the non-core services, so, just to the maintenance personnel of business on line on maintenance line industry Inconvenience is brought in the normal operation work of business, moreover, if the maintenance personnel of business high load occurs in server on line When the case where operation, timely the non-core services are not modified or deactivated to the time-out time of non-core services, then will The operation of core business can be impacted, and then made troubles during using the core business to user.
Summary of the invention
The embodiment of the present application provides a kind of method that business executes, for solving the degradation of non-core services in the prior art The problem of making troubles in the process to the maintenance personnel of business on line.
The embodiment of the present application provides a kind of device that business executes, for solving the degradation of non-core services in the prior art The problem of making troubles in the process to the maintenance personnel of business on line.
The embodiment of the present application adopts the following technical solutions:
The embodiment of the present application provides a kind of method that business executes, comprising:
According to for the business preset each adjustment period for being used to adjust time-out time, arrive in the currently adjustment period When, determine the business in each history adjustment period corresponding each history time-out time;
According to each history time-out time, determine the business in currently adjustment period corresponding time-out time;
According to the business in currently adjustment period corresponding time-out time, the business is executed.
The embodiment of the present application provides a kind of device that business executes, comprising:
First determining module, for preset for adjusting each adjustment period of time-out time according to the business of being directed to, When the current adjustment period arrives, determine the business in each history adjustment period corresponding each history time-out time;
Second determining module, for determining the business in the currently adjustment period pair according to each history time-out time The time-out time answered;
Execution module, for, in currently adjustment period corresponding time-out time, executing the business according to the business.
The embodiment of the present application provides a kind of method and device that business executes, and server can be according to for industry in this method It is engaged in the preset each adjustment period for adjusting time-out time, when determining current period arrival, determines that the business is adjusted in each history Period corresponding each history time-out time, then, server can determine the business according to each history time-out time determined In currently adjustment period corresponding time-out time, then according to the corresponding time-out time of current adjustment period determined, to this Business is executed.In from the above as can be seen that since server can be determined according to the history time-out time of the business The business is in currently adjustment period corresponding time-out time, therefore, when there is high load operation in server, server The history time-out time according to corresponding to business when this period there is high load in the past determines the business current Time-out time corresponding to the high load period, and then complete the business in the adjust automatically of current high load period, relative to For the prior art, when degrading to business, without the maintenance personnel of business on line, means modify the industry to server in person The time-out time of business, so that the maintenance personnel for greatly improving business on line is carrying out the convenience in demotion processes to business Property.
Detailed description of the invention
The drawings described herein are used to provide a further understanding of the present application, constitutes part of this application, this Shen Illustrative embodiments and their description please are not constituted an undue limitation on the present application for explaining the application.In the accompanying drawings:
Fig. 1 is the process that business provided by the embodiments of the present application executes;
Fig. 2 is the system schematic that a kind of business provided by the embodiments of the present application executes;
Fig. 3 is the schematic device that business provided by the embodiments of the present application executes.
Specific embodiment
To keep the purposes, technical schemes and advantages of the application clearer, below in conjunction with the application specific embodiment and Technical scheme is clearly and completely described in corresponding attached drawing.Obviously, described embodiment is only the application one Section Example, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not doing Every other embodiment obtained under the premise of creative work out, shall fall in the protection scope of this application.
Below in conjunction with attached drawing, the technical scheme provided by various embodiments of the present application will be described in detail.
Fig. 1 is the process that business provided by the embodiments of the present application executes, specifically includes the following steps:
S101: according to for the business preset each adjustment period for being used to adjust time-out time, the period is adjusted currently When arrival, determine the business in each history adjustment period corresponding each history time-out time.
In practical applications, when server some specific periods or festivals or holidays will appear high load operation the case where, When the maintenance personnel of business is on line in order to guarantee that high load condition occurs, core business in server can trouble-free operation, lead to It is all that non-core services degrade in normal situation, so that the more resources of server can be assigned in core business, To guarantee the trouble-free operation of core business, wherein it is by non-core that non-core services, which are carried out means used by degrading usually, Time-out time of the heart business in the high load period shortens, and so, server is when there is the case where high load operation, user Non-core services are once had exceeded in the time-out of high load period for the response time for the service request that non-core services are sent Time, server, which will not be in, handles the service request, so, time-out time of the non-core services in the high load period Shortening will will lead to server refuse more users be directed to the non-core services send service request, allow in this way High load period, server can be by more resource allocations to core business, to guarantee core business in the smooth fortune of this period Row.
However, being usually all that the maintenance personnel of business on line manually degrades to non-core services in the prior art , which adds the workloads of service maintenance personnel on line, so that the maintenance personnel to business on line is non-core in progress Great inconvenience is brought when the degradation work of business.For this purpose, in the embodiment of the present application, server can be according to the history of business Time-out time determines the business in the time-out time of present period, to realize the business in the automatic tune of each period Whole, therefore, in the embodiment of the present application, server is determining that the business, can first basis before the time-out time of present period For each adjustment period of the pre-set adjustment time-out time of the business, determine currently to adjust period arrival when the business When, the business is in each history adjustment period corresponding each history time-out time, wherein the adjustment period mentioned herein can service For device for each period in the business preset one day, the division scale of the period can be with hour, minute, second, millisecond etc. Unit is divided.
Certainly, server can also execute the period according to the business to set to each adjustment period, wherein referred to herein as Execution period of business refer to that the business completes the time of an entire run i.e. according to the time-out time that server is determined For the execution period of the business, that is, the business is after receiving service request and starting to used in the processing for completing the service request Time.Server, can be by each adjustment period when for each adjustment period of the pre-set adjustment time-out time of the business It is set as the positive integer times that the business executes the period.
S102: according to each history time-out time, determine the business in currently adjustment period corresponding time-out time.
It determines after the business that monitors reaches the current adjustment period it needs to be determined that the business adjusts the period pair in each history When each history time-out time answered, server can determine each historical period according to the current adjustment period, then, go through for each The history period is determined according to each history adjustment period corresponding history time-out time of the business in the historical period Average time-out time then according to the average time-out time that can be determined according to each historical period is directed to, determine the business In currently adjustment period corresponding time-out time.
Specifically, in practical applications, server, which the case where high load operation occurs usually, to be occurred in the identical period , for example, some servers the case where high load may occur in 8 points to 9 points of night, some servers may be in There is the case where high load between 11 points to 12 points of noon, therefore, for same server, the server is daily in high load Obtained data information is usually all relevant after period operation, and in other words, server is when to every service configuration information The data information caused by the identical period of can be used over work refers to, and similarly, for same business, the business is every Its each time-out time corresponding to the identical period is often also relevant, for example, business institute is right for a certain business The server answered will substantially will appear the case where high load operation between the 9 of daily night points to 11 points, so, for this For business, not between 9 points to 11 points of same date night time-out time corresponding to the business be all often it is relevant, therefore, It is corresponding super that the business in order to determine server according to the history time-out time of the business currently adjusts the period When the time can more rationally (that is, for the core business in the high load period, server be determined for the business Time-out time can guarantee that the core business can be operated normally in this period as far as possible, and for non-core services come It says, the time-out time that server is determined for the business should be such that the more business of non-core services refusal ask as far as possible Ask, to guarantee that server can be by more resource allocations to core business in the high load period), server can determine the industry When the business current adjustment period reaches, according in daily in past setting time length of the current adjustment period, determination includes With this it is current adjustment the corresponding identical period in period time interval, as each historical period, wherein past setting time length Can be as unit of day, can also week, the moon, year be unit, and for comprising with the current corresponding identical period in adjustment period Time interval for, which can be only comprising between time of current adjustment corresponding identical period in period It is identical in time span every, that is, the time interval and current adjustment period, be also possible to include and the current adjustment period The interval of time of corresponding identical period.
For example, it is assumed that the server where business A usually will appear high load between the 20:00~22:00 in night Operating condition, and the adjustment period that business A is presently in is 20:15~20:20, server is in order to automatic, accurate Business A is completed in the corresponding adjustment of high load period, can be incited somebody to action according to current adjustment period 20:15~20:20 of business A This period (time interval) of 20:15~20:20 yesterday is determined as the historical period of business A, and moreover, server can also This period of daily 20:15~20:20 last week is identified as to each historical period of business A.In addition to this, server When can will include yesterday that 20:10~20:25 time interval of this period of 20:15~20:20 is determined as the history of business A Section, similarly, last week can also be included 20:10~20:25 time interval of this period of 20:15~20:20 by server daily It is identified as each historical period of business A.
In practical applications, business currently adjusts period corresponding time-out time in addition to the period identical as the past (passes by Period identical with the current adjustment period) corresponding time-out time has outside close relation, also and before the current adjustment period Several adjustment period corresponding time-out times have close relation, this is because, it is generally the case that the load of server is not It is that jumping characteristic increases or decreases, but has the process increased or decreased, therefore, for a business, if the industry When the business current adjustment period is in the period of server high load operation, the business relative to the current adjustment period upper one A adjustment period also should be the high load run the period in server, correspond in this way, which the business currently adjusts the period Both time-out time time-out times corresponding with an adjustment period in the business should also have close relation, in other words It says, the two time-out times are able to reflect out the tendency of the load of server to a certain extent, so, server is somebody's turn to do determining When time-out time corresponding to business current period, the preceding N in the current adjustment period can be determined according to the current adjustment period In a adjustment period, as the historical period of the business, wherein N is positive integer, that is, server can will be with the current adjustment period pair The a upper adjustment corresponding period in period answered is determined as the historical period of the business, can also will be relative to the current adjustment period The first two, a corresponding entire period in the adjustment periods such as three, the historical period as the business.
Continue to use the example above, business A adjusts the corresponding period in period currently as 20:15~20:20, and therefore, server can A business A upper adjustment period corresponding period 20:10~20:15 is determined as to the historical period of business A.Certainly, it services Device can also be according to relative to the first two adjustment period corresponding period 20:05~20:10, the 20:10 before the current adjustment period Period 20:05~20:15 is determined as the historical period of business A by~20:15.
It should be noted that being all and the current adjustment week since business currently adjusts period corresponding time-out time usually The corresponding time-out time of several adjustment periods that phase closes on has stronger tight type, therefore, in order to determine server The corresponding time-out time of the historical period of the business can currently be adjusted with the business period corresponding time-out time have it is close Connection, the value of N is not answered excessive, can be controlled in 1~4 or so.
For in past setting time length comprising currently adjust the corresponding identical period in period with the business time between For, due to this past setting time length in may include it is multiple with it is current adjust the corresponding identical period in period when Between be spaced, therefore, in the embodiment of the present application, for each historical period, server can be according to the business in the historical period In each history adjustment period corresponding history time-out time, determine average time-out time, and the time-out time that is averaged is true It is set to time-out time of the business in the historical period.
For example, it is assumed that business A surpasses corresponding to this adjustment period of 20:15~20:20 daily in past one week When the time it is as shown in table 1.
Table 1
Table 1 shows one week business A in this adjustment period of 20:15~20:20 corresponding each time-out time, server Determining that business A is directed to this period of history period on June 5,30 days~2016 May in 2016 corresponding time-out time according to table 1 When, this 7 time-out times in table 1 can be summed up, then adduction result is averaged again, when obtaining average time-out Between 23s, and then it is corresponding in adjustment period 20:15~20:20 that the time-out time 23s that is averaged is determined as upper one week of business A History time-out time.
Similarly, it is adjusted for historical period composed by the period relative to the top n that the business currently adjusts the period, service Each history can also be adjusted period corresponding history time-out time and summed up by device, and adduction result is averaged, and be obtained The time-out time of the corresponding historical time intervals.
For example, it is assumed that preceding 4 history adjustment period corresponding time-out of the business A in currently adjustment period 20:15~20:20 Time is as shown in table 2.
Table 2
The preceding 4 history adjustment period pair before currently adjusting period 20:10~20:15 positioned at business A is shown in table 2 The time-out time answered, server can be incited somebody to action when determining this period of history time interval (19:55~20:10) corresponding time-out time 4 time-out times shown in table 2 sum up, and adduction result is averaged, thus the average time-out time that will be obtained 20s is as business A in the corresponding history time-out time of historical time intervals (19:55~20:10).
In addition to this, server is determining that the business in the corresponding history time-out time of historical period, can also go through this The each history adjustment period corresponding each history time-out time for including in the history period is ranked up, and will be in ranking results The history time-out time of predeterminated position is as the business in the corresponding history time-out time of the historical time intervals.
For example, preceding 4 history for business A shown in table 2 in currently adjustment period 20:15~20:20 adjusts week For phase corresponding time-out time, this 4 time-out times can be ranked up by server, and the ranking results for obtaining time-out time are " 19s, 19s, 20s, 22s ", then, server can be using the 20s in the ranking results in the third place as business A in history Period (19:55~20:10) corresponding history time-out time.
It should be noted that server includes to set in the past for currently adjusting identical period in period with the business in determination For the historical period of time span, each history for including in the historical period can also be adjusted to period corresponding each time-out time It is ranked up, and the history time-out time that predeterminated position is in ranking results is corresponding in the historical period as the business History time-out time.Detailed process is identical as above explained method of determination, herein just without being described in detail.
Server meets this to enable the business determined currently to adjust period corresponding time-out time as far as possible Needs of the server locating for business in the currently corresponding period in adjustment period, server are super in each history for determining the business When the time after, can be obtained according to pre-set each corresponding weight of history time-out time and each history time-out time Weighted sum, and the weighted sum is determined as the business in currently adjustment period corresponding time-out time.
For example, it is assumed that server determine 3 history time-out times that the period is currently adjusted for business A be respectively 20s, 24s, 23s, wherein the time-out time of 20s is that preceding 4 history before business A currently adjusts the period adjusted corresponding to the period Average time-out time, the time-out time of 24s are business A in the yesterday same period (when i.e. yesterday is identical with the period is currently adjusted Section) corresponding history time-out time, the time-out time of 23s is that business A (pass by one week often in the past one week same period Its period identical with the current adjustment period) in corresponding averaged historical time-out time, then, server can be by each history time-out Each default weight corresponding with each history time-out time was multiplied and was added time, it may be assumed that
20 × 30%+24 × 40%+23 × 30%=22.5, and weighted sum 22.5 is currently adjusted into week as business A Phase corresponding time-out time.
It should be noted that the corresponding default weight of each history time-out time can be fixed, can also be it is unfixed, Wherein, for unfixed situation, corresponding each history time-out time can be respectively set in server for the different periods Default weight, for example, default weight a1 can be arranged for the history time-out time of yesterday in server for period T1, it can For the history time-out time of last week, default weight a2 is set, and for period T2, server can be directed to the history of yesterday Default weight b1 is arranged in time-out time, default weight b2 can be arranged for the history time-out time of last week.
S103: according to the business in currently adjustment period corresponding time-out time, the business is executed.
When server determines that the business after currently adjustment period corresponding time-out time, can be held according to the time-out time Row business, wherein since in practical applications, business usually can all be divided into core business and non-core services, for core For heart business, when the case where high load operation occurs in server, in order to guarantee that core business also can during high load It smoothly runs, core business time-out time corresponding during high load should be larger as far as possible, in this way, time-out time Longer, which handles time-consuming used in the service request that user sends also will be less than the core business in height as far as possible Corresponding time-out time during load, so as to enable the core business to send as far as possible to user during high load Service request handled, correspondingly, the overtime rate of the core business during this period of time also will be smaller.
However, it is generally the case that core business time-out time corresponding during high load unconfined cannot increase Greatly, because in practical applications, the time-out time of the core business has been able to guarantee as far as possible when reaching certain numerical value Normal operation of the core business during high load, if time-out time further increases, it will occupy the additional of server Resource, so that the wasting of resources of server is caused, moreover, after the time-out time of core business reaches certain numerical value, if The core business always is that then server is in addition to that can protect with the corresponding time-out time operation of this numerical value during high load The core business is demonstrate,proved outside the trouble-free operation during high load, can also by some idle resource allocations to non-core services, from And make non-core services under the premise of not influencing core business trouble-free operation, it can also be run during high load.Therefore, In the embodiment of the present application, server can be directed to each core business, and first timeout threshold in corresponding each adjustment period is respectively set, First timeout threshold can be executed the historical data saved after the core business by server and be obtained by statistics, analysis.And The core business that server is determined for core business is greater than in currently adjustment period corresponding time-out time for the core First timeout threshold can be then re-used as the core industry in currently adjustment period preset first timeout threshold by heart business Business executes the core business according to the time-out time redefined in currently adjustment period corresponding time-out time.Due to clothes The time-out time that business device can will be greater than the first timeout threshold replaces with first timeout threshold, and therefore, server ensure that core Under the premise of heart business trouble-free operation, the waste of server resource is also reduced.
And for non-core services, when server is in this period of high load operation, in order to guarantee core The trouble-free operation of business, it usually needs reduce the time-out time of non-core services during this period of time, so that non-core The time-out time of business is small as far as possible, in this way, time-out time is smaller, which handles the service request that user sends Time-consuming used will also be greater than non-core services time-out time corresponding during high load as far as possible, so that should Non-core services can give server resource as much as possible to core business during high load, and the non-core services exist Overtime rate in this period also will be bigger.
In practical applications, the time-out time for the non-core services that server is determined should be with the loading condition phase of server It is corresponding, that is, when the load of server is stepped up, the time-out time of non-core services should be gradually reduced, and when server When load gradually reduces, the time-out time of non-core services should be incrementally increased, however during server actual motion, really The time-out time for the non-core services made relative to may be a lesser time-out time under normal circumstances, but It is that when non-core services are executed according to this time-out time, the trouble-free operation of core business can may also be impacted, The resource etc. of server is such as fought for core business so that when server be in high load run during, core business without Method smoothly executes.
In order to avoid the generation of above situation, in the embodiment of the present application, server can be also provided with for non-core services One the second timeout threshold, second timeout threshold can also execute in the past the history saved after the non-core services by server Data and obtain, second timeout threshold can guarantee when server be in the high load period, non-core services based on this second The operation of timeout threshold does not interfere with core business in the normal operation of this period (high load period).And server is being arranged When second timeout threshold, it can be directed to the different adjustment periods, each second timeout threshold in corresponding each adjustment period is respectively set. So, when server determines that non-core services are greater than in currently adjustment period corresponding time-out time for the core business In currently adjustment period preset second timeout threshold, then second timeout threshold can be re-used as the non-core services and existed It is current to adjust period corresponding time-out time, and the non-core services are executed according to the time-out time redefined.Certainly, work as clothes Business device determines that non-core services are greater than in currently adjustment period corresponding time-out time and adjusts for the non-core services currently When period preset second timeout threshold, it can stop executing the non-core services, in this way, non-core services will not be during this period (during server is in high load) and core business fight for the resource of server, to realize the automatic of non-core services Degrade, ensure that the trouble-free operation during core business server is in high load.
It should be noted that above explained core business the first timeout threshold corresponding with non-core services and Two timeout thresholds should be different timeout threshold, wherein under normal conditions, the first timeout threshold of core business should be much larger than non- Second timeout threshold of core business, for example, the first timeout threshold can be 40s, and non-core for core business Corresponding second timeout threshold of business can be 3ms.
It should be noted that server for non-core services be arranged the second timeout threshold when, can also be according to core industry It is engaged in being configured in the timeout threshold in same adjustment period, for example, when core business corresponding the first surpasses in the t1 adjustment period When threshold value be 40s when, non-core services can be adjusted herein period corresponding second timeout threshold and be set as 1s by server, and be worked as When the t1 adjustment period, corresponding first timeout threshold was 30s, then server can adjust herein non-core services core business Period, corresponding second timeout threshold was set as 3s, that is, in order to avoid fighting for during high load with core business as far as possible Second timeout threshold of the resource of server, non-core services can be inversely proportional with the first timeout threshold of core business.
In addition, in the embodiment of the present application, server can be according to above-mentioned business preset each monitoring period be directed to, and monitoring should Overtime rate of the business within each monitoring period, the purpose of this measure are that in practical applications, the size of overtime rate is able to reflect The business loading condition of server during this period locating for the size of time-out time and the business whithin a period of time out, For example, can then show this to a certain extent when the overtime rate obtained after the business is run in one section of time-out time is larger It is a lesser time-out time that business runs the time-out time being based on during this period, can then show this to a certain extent Server loads larger during this period.
And server monitors overtime rate discovery of the business within each monitoring period in preset each monitoring period, even The overtime rate continued in several monitoring periods is not the overtime rate reached desired by service maintenance personnel on line, in other words, Operating condition of the business within these monitoring periods may be without reaching the desired operation shape of service maintenance personnel on line State, therefore, in order to enable the business to reach the desired operating status of service maintenance personnel on line, industry on line as soon as possible Business maintenance personnel can be directed to each adjustment period of the business by server, preset the overtime rate in corresponding each adjustment period respectively Threshold value, so, when server finds overtime rate of the business within the continuous N monitoring period without reaching preset surpass When rate threshold value when, server can will for the preset timeout threshold of the business be determined as the business next adjustment period correspondence Time-out time, wherein for type of service be core business type core business for, when server monitoring to the core When overtime rate of the business within the continuous N monitoring period is all larger than the preset first overtime rate threshold value, then the core can will be directed to Preset first timeout threshold of business is determined as the core business in corresponding time-out time of next adjustment period, and for non- For core business, preset when overtime rate of the server monitoring to the non-core services within the continuous N monitoring period is respectively less than The second overtime rate threshold value when, then can will be determined as the non-core services for preset second timeout threshold of the non-core services In corresponding time-out time of next adjustment period.
It should be noted that the above explained monitoring period can be identical as the adjustment period of business, this can also reside in Among the adjustment period of business, for example, it is assumed that an adjustment period of business A is 20:35~20:40, then server is being arranged When monitoring the period, adjustment period 20:35~20:40 of business A can be subjected to five equal parts as unit of one minute, then obtained 20:35~20:36,20:36~20:37,20:37~20:38,20:38~20:39, five monitoring periods of 20:39~20:40.
In from the above as can be seen that since server can determine the industry according to the history time-out time of the business Business is in currently adjustment period corresponding time-out time, and therefore, when high load operation occur in server, server can root Accordingly toward history time-out time corresponding to the business when this period there is high load, determine the business current high negative Time-out time corresponding to the period is carried, and then completes the business in the adjust automatically of current high load period, relative to existing For technology, when degrading to business, without the maintenance personnel of business on line, means modify the business to server in person Time-out time, so that the maintenance personnel for greatly improving business on line is carrying out the convenience in demotion processes to business.
The embodiment of the present application also provides the systems that a kind of business executes, as shown in Figure 2.
Fig. 2 is the system schematic that a kind of business provided by the embodiments of the present application executes.
In Fig. 2, the business execution module in the system can be notified when determining that above-mentioned business reaches the current adjustment period Business diary determining module determines log information corresponding to the history time-out time of the business, and business diary determining module is connecing After the instruction for receiving business execution module transmission, it can determine currently to adjust with the business from each log information pre-saved Period relevant history log information, and each history log information determined is sent in transmitting messages in real time queue, and Afterwards, history time-out time computing module can read these history log informations from transmitting messages in real time queue, and according to these History log information determines each history time-out time of the business, and each history time-out time determined is sent to In Zookeeper, wherein Zookeeper mentioned herein is distributed, open source code a distributed application program association It is taken after mixing with liquid business, which, which can be equivalent to, can be realized data storage, a server of data processing or system. Zookeeper, can be by each history time-out time synchronous transfer to Zookeeper agent after receiving each history time-out time In (being equivalent to the memory in Zookeeper), the current time-out time determining module of business in system can be from Zookeeper Each history time-out time in being read in agent, and it is (i.e. each according to the computation rule got from rule, parameter configuration module The default weight of history time-out time), determine that the business currently adjusts period corresponding time-out time, and by the time-out time Be sent to business degradation module, business degradation module after receiving the time-out time, can according to from rule, parameter configuration module The business got judges whether to replace with the time-out time into the time-out threshold in currently adjustment period corresponding timeout threshold Value, and after completing to differentiate, the time-out time that will eventually determine is sent to business execution module, makes business execution module according to this Time-out time executes.
The above are the methods that business provided by the embodiments of the present application executes, and are based on same thinking, the embodiment of the present application is also The device of business execution is provided, as shown in Figure 3.
Fig. 3 is the schematic device that a kind of business provided by the embodiments of the present application executes, and is specifically included:
First determining module 301, for preset for adjusting each adjustment period of time-out time according to the business of being directed to, When currently the adjustment period arrives, determine the business in each history adjustment period corresponding each history time-out time;
Second determining module 302, for determining the business in the currently adjustment period according to each history time-out time Corresponding time-out time;
Execution module 303, for, in currently adjustment period corresponding time-out time, executing the industry according to the business Business.
Second determining module 302 is specifically used for, and determines each historical period according to the current adjustment period;For every A historical period, according to each history adjustment period corresponding history time-out time of the business in the historical period, really Allocate equal time-out time;According to the average time-out time determined for each historical time intervals, determine the business current Adjust period corresponding time-out time.
Preset for business for adjusting each adjustment period of time-out time includes: for the business preset one Each period in it;
Second determining module 302 is specifically used for, every in past setting time length according to the current adjustment period In it, determine comprising with it is described it is current adjustment the corresponding identical period in period time interval, as each historical period;And/or
According to the current adjustment period, the top n adjustment period in the current adjustment period is determined, as historical period, Middle N is positive integer.
Second determining module 302 is specifically used for, and is distinguished according to each history time-out time and each history time-out time Corresponding weight, obtains weighted sum, and it is corresponding super in the currently adjustment period that the weighted sum is determined as the business When the time.
The execution module 303 is specifically used for, when the type of service of the business is core business type, however, it is determined that go out The business be greater than for the business in currently adjustment period corresponding time-out time in the currently adjustment period preset the First timeout threshold is then re-used as the business and is currently adjusting period corresponding time-out time by one timeout threshold, And the business is executed according to the time-out time redefined;When the type of service of the business is non-core services type, If it is determined that the business be greater than for the business in currently adjustment period corresponding time-out time in the currently adjustment period It is corresponding super in the currently adjustment period to be then re-used as the business by preset second timeout threshold for second timeout threshold When the time, and the business is executed according to the time-out time that redefines, or, stopping executing the business;Wherein, described first Timeout threshold is greater than second timeout threshold.
Described device further include:
Monitoring module 304, for monitoring the business in each prison according to the business preset each monitoring period is directed to Control the overtime rate in the period;When monitor the business type of service be core business type, and continuous N monitor the period in Overtime rate when being all larger than the default first overtime rate threshold value, then indicate that second determining module 302 will the first time-out threshold Value is determined as the business in corresponding time-out time of next adjustment period;When the type of service for monitoring the business is non- Core business type, and the overtime rate in the continuous N monitoring period is respectively less than when presetting the second overtime rate threshold value, then described in instruction Second timeout threshold is determined as the business in corresponding time-out of next adjustment period by the second determining module 302 Between;Wherein, M is positive integer.
The embodiment of the present application provides a kind of method and device that business executes, and server can be according to for industry in this method It is engaged in the preset each adjustment period for adjusting time-out time, when determining current period arrival, determines that the business is adjusted in each history Period corresponding each history time-out time, then, server can determine the business according to each history time-out time determined In currently adjustment period corresponding time-out time, then according to the corresponding time-out time of current adjustment period determined, to this Business is executed.In from the above as can be seen that since server can be determined according to the history time-out time of the business The business is in currently adjustment period corresponding time-out time, therefore, when there is high load operation in server, server The history time-out time according to corresponding to business when this period there is high load in the past determines the business current Time-out time corresponding to the high load period, and then complete the business in the adjust automatically of current high load period, relative to For the prior art, when degrading to business, without the maintenance personnel of business on line, means modify the industry to server in person The time-out time of business, so that the maintenance personnel for greatly improving business on line is carrying out the convenience in demotion processes to business Property.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the present invention, which can be used in one or more, The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces The form of product.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net Network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/or The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM), Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including described want There is also other identical elements in the process, method of element, commodity or equipment.
It will be understood by those skilled in the art that embodiments herein can provide as method, system or computer program product. Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the application Form.It is deposited moreover, the application can be used to can be used in the computer that one or more wherein includes computer usable program code The shape for the computer program product implemented on storage media (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) Formula.
The above description is only an example of the present application, is not intended to limit this application.For those skilled in the art For, various changes and changes are possible in this application.All any modifications made within the spirit and principles of the present application are equal Replacement, improvement etc., should be included within the scope of the claims of this application.

Claims (8)

1. a kind of method that business executes characterized by comprising
It is preset for adjusting each adjustment period of time-out time according to the business of being directed to, when currently the adjustment period arrives, really The fixed business is in each history adjustment period corresponding each history time-out time;
According to each history time-out time, determine the business in currently adjustment period corresponding time-out time;
According to the business in currently adjustment period corresponding time-out time, the business is executed;
It is described according to each history time-out time, determine the business in currently adjustment period corresponding time-out time, specifically Include:
Each historical period is determined according to the current adjustment period;
It is super according to each history adjustment period corresponding history of the business in the historical period for each historical period When the time, determine average time-out time;
According to the average time-out time determined for each historical period, determine that the business is corresponding super in the currently adjustment period When the time.
2. the method as described in claim 1, which is characterized in that preset for adjusting each tune of time-out time for business Complete cycle includes: for each period in the business preset one day;
Each historical period is determined according to the current adjustment period, is specifically included:
According to the current adjustment period, in daily in past setting time length, determine and include and the current adjustment period The time interval of corresponding identical period, as each historical period;And/or
According to the current adjustment period, the top n adjustment period in the current adjustment period is determined, as historical period, wherein N is Positive integer.
3. the method as described in claim 1~2 is any, which is characterized in that according to each history time-out time, determine described in Business is specifically included in currently adjustment period corresponding time-out time:
According to each history time-out time and the corresponding weight of each history time-out time, weighted sum is obtained, and will be described Weighted sum is determined as the business in currently adjustment period corresponding time-out time.
4. the method as described in claim 1, which is characterized in that according to the business in currently adjustment period corresponding time-out Between, the business is executed, is specifically included:
When the type of service of the business is core business type, however, it is determined that the business gone out is corresponding in the currently adjustment period Time-out time be greater than for the business currently adjustment period preset first timeout threshold, then will it is described first time-out threshold Value is re-used as the business and executes institute in currently adjustment period corresponding time-out time, and according to the time-out time redefined State business;
When the type of service of the business is non-core services type, however, it is determined that the business gone out is in the currently adjustment period pair The time-out time answered is greater than for the business in currently adjustment period preset second timeout threshold, then by second time-out Threshold value is re-used as the business and executes in currently adjustment period corresponding time-out time, and according to the time-out time redefined The business, or, stopping executing the business;
Wherein, first timeout threshold is greater than second timeout threshold.
5. method as claimed in claim 4, which is characterized in that the method also includes:
According to the business preset each monitoring period is directed to, overtime rate of the business within each monitoring period is monitored;
When the business type of service be core business type, and continuous N monitor the period in overtime rate be all larger than it is default When the first overtime rate threshold value, then first timeout threshold is determined as the business in corresponding time-out of next adjustment period Time;
When the business type of service be non-core services type, and continuous N monitor the period in overtime rate it is respectively less than pre- If when the second overtime rate threshold value, then it is corresponding super in next adjustment period second timeout threshold to be determined as the business When the time;
Wherein, M is positive integer.
6. the device that a kind of business executes characterized by comprising
First determining module, for preset for adjusting each adjustment period of time-out time according to the business of being directed to, current When adjusting period arrival, determine the business in each history adjustment period corresponding each history time-out time;
Second determining module, for determining that the business is corresponding in the currently adjustment period according to each history time-out time Time-out time;
Execution module, for, in currently adjustment period corresponding time-out time, executing the business according to the business;
Second determining module is specifically used for, and determines each historical period according to the current adjustment period;For each history Period determines average according to each history adjustment period corresponding history time-out time of the business in the historical period Time-out time;According to the average time-out time determined for each historical period, determine the business in the currently adjustment period pair The time-out time answered.
7. device as claimed in claim 6, which is characterized in that the execution module is specifically used for, when the business of the business When type is core business type, however, it is determined that the business gone out is greater than in currently adjustment period corresponding time-out time is directed to institute Business is stated in currently adjustment period preset first timeout threshold, then first timeout threshold is re-used as the business and existed It is current to adjust period corresponding time-out time, and the business is executed according to the time-out time redefined;When the business When type of service is non-core services type, however, it is determined that the business gone out is greater than in currently adjustment period corresponding time-out time For the business in currently adjustment period preset second timeout threshold, then second timeout threshold is re-used as described Business executes the business in currently adjustment period corresponding time-out time, and according to the time-out time redefined, or, stopping Execute the business;Wherein, first timeout threshold is greater than second timeout threshold.
8. device as claimed in claim 7, which is characterized in that described device further include:
Monitoring module, for monitoring the business in each monitoring period according to the business preset each monitoring period is directed to Interior overtime rate;When monitor the business type of service be core business type, and continuous N monitor the period in time-out When rate is all larger than the default first overtime rate threshold value, then indicate that first timeout threshold is determined as institute by second determining module Business is stated in corresponding time-out time of next adjustment period;When the type of service for monitoring the business is non-core services class Type, and the overtime rate in the continuous N monitoring period is respectively less than when presetting the second overtime rate threshold value, then indicates that described second determines mould Second timeout threshold is determined as the business in corresponding time-out time of next adjustment period by block;Wherein, M is positive whole Number.
CN201610466985.6A 2016-06-23 2016-06-23 A kind of method and device that business executes Active CN105939225B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610466985.6A CN105939225B (en) 2016-06-23 2016-06-23 A kind of method and device that business executes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610466985.6A CN105939225B (en) 2016-06-23 2016-06-23 A kind of method and device that business executes

Publications (2)

Publication Number Publication Date
CN105939225A CN105939225A (en) 2016-09-14
CN105939225B true CN105939225B (en) 2019-04-02

Family

ID=56872045

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610466985.6A Active CN105939225B (en) 2016-06-23 2016-06-23 A kind of method and device that business executes

Country Status (1)

Country Link
CN (1) CN105939225B (en)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107040566B (en) * 2016-09-19 2020-01-31 阿里巴巴集团控股有限公司 Service processing method and device
CN106686627B (en) * 2016-12-07 2020-01-14 Oppo广东移动通信有限公司 WiFi/hotspot starting method and device
CN109388552B (en) * 2017-08-07 2024-03-26 中兴通讯股份有限公司 Method and device for determining duration of starting application program and storage medium
CN107426328B (en) * 2017-08-08 2022-07-15 百度在线网络技术(北京)有限公司 Information pushing method and device
CN109491769A (en) * 2017-09-11 2019-03-19 华为技术有限公司 A kind of business reorganization method, apparatus and chip
CN109088828B (en) * 2018-08-03 2022-07-26 网宿科技股份有限公司 Server overload control method and system
CN109543988A (en) * 2018-11-16 2019-03-29 中国银行股份有限公司 The method, apparatus and storage medium of optimization transaction overtime threshold
CN110012093B (en) * 2019-04-02 2021-12-24 北京奇艺世纪科技有限公司 Method and device for adjusting connection timeout
CN110166572A (en) * 2019-06-06 2019-08-23 北京达佳互联信息技术有限公司 Network processing method, device, electronic equipment and storage medium
CN113411829A (en) * 2020-03-17 2021-09-17 中国联合网络通信集团有限公司 Carrier configuration method, device, apparatus and storage medium
CN111598487B (en) * 2020-06-22 2024-03-15 拉扎斯网络科技(上海)有限公司 Data processing and model training method, device, electronic equipment and storage medium
CN112118329A (en) * 2020-08-31 2020-12-22 北京奇艺世纪科技有限公司 Network request processing method and device, electronic equipment and storage medium
CN112330151A (en) * 2020-11-05 2021-02-05 河北中废通网络技术有限公司 Service processing method, terminal device and storage medium
CN112637362B (en) * 2020-12-30 2022-10-25 北京奇艺世纪科技有限公司 Request result determining method, device and system, electronic equipment and storage medium
CN115225503B (en) * 2022-05-16 2023-07-04 北京邮电大学 OpenFlow flow table entry dynamic timeout allocation method and related equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102638457A (en) * 2012-03-23 2012-08-15 苏州阔地网络科技有限公司 Method and system for automatically allocating server resource
CN102741768A (en) * 2010-02-09 2012-10-17 罗伯特·博世有限公司 Method for predicting the duration of a future time interval
CN103646670A (en) * 2013-12-05 2014-03-19 华为技术有限公司 Method and device for evaluating performances of storage system
CN104217091A (en) * 2013-06-05 2014-12-17 北京齐尔布莱特科技有限公司 Website page view prediction method based on historical tendency weights

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070294124A1 (en) * 2006-06-14 2007-12-20 John Charles Crotts Hospitality performance index

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102741768A (en) * 2010-02-09 2012-10-17 罗伯特·博世有限公司 Method for predicting the duration of a future time interval
CN102638457A (en) * 2012-03-23 2012-08-15 苏州阔地网络科技有限公司 Method and system for automatically allocating server resource
CN104217091A (en) * 2013-06-05 2014-12-17 北京齐尔布莱特科技有限公司 Website page view prediction method based on historical tendency weights
CN103646670A (en) * 2013-12-05 2014-03-19 华为技术有限公司 Method and device for evaluating performances of storage system

Also Published As

Publication number Publication date
CN105939225A (en) 2016-09-14

Similar Documents

Publication Publication Date Title
CN105939225B (en) A kind of method and device that business executes
US8225119B2 (en) Energy-aware server management
US9571347B2 (en) Reactive auto-scaling of capacity
CA2900948C (en) Cost-minimizing task scheduler
US9504061B2 (en) Networked resource provisioning system
US20150286507A1 (en) Method, node and computer program for enabling automatic adaptation of resource units
JP2009176304A (en) Power control system
CN105468458B (en) The resource regulating method and system of computer cluster
CN106817499A (en) A kind of resources for traffic dispatching method and forecast dispatching device
CN103502944A (en) Method and device for adjusting memories of virtual machines
WO2019173203A1 (en) Dynamic tiering of datacenter power for workloads
CN109739627B (en) Task scheduling method, electronic device and medium
CN101595680B (en) Arrangement and method relating to performance management by distributed processing
CN110099083A (en) A kind of load equilibration scheduling method and device for server cluster
CN114064229A (en) Cluster node processing method, system, device and medium
CN112272201B (en) Equipment management method, system and management cluster
CN112580841A (en) Production scheduling method and device, electronic equipment and storage medium
JP5670290B2 (en) Method, system and computer program for managing resources for execution of processes for communication services
CN115658319A (en) Resource scheduling method, system, device and storage medium
Tsenos et al. Amesos: A scalable and elastic framework for latency sensitive streaming pipelines
Baghermousavi et al. An approach to reduce QoS monitoring overhead in ESB
Wanis et al. Modeling and pricing cloud service elasticity for geographically distributed applications
Wu et al. A robust approach for hotspots prevention and resolution in cloud services
CN110533281B (en) Order scheduling flow control method and device
Giagkos et al. Darly: Deep Reinforcement Learning for QoS-aware scheduling under resource heterogeneity Optimizing serverless video analytics

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant