CN106713028B - Service degradation method and device and distributed task scheduling system - Google Patents
Service degradation method and device and distributed task scheduling system Download PDFInfo
- Publication number
- CN106713028B CN106713028B CN201611187847.0A CN201611187847A CN106713028B CN 106713028 B CN106713028 B CN 106713028B CN 201611187847 A CN201611187847 A CN 201611187847A CN 106713028 B CN106713028 B CN 106713028B
- Authority
- CN
- China
- Prior art keywords
- service
- task scheduling
- scheduling system
- distributed task
- service function
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/50—Network service management, e.g. ensuring proper service fulfilment according to agreements
- H04L41/5003—Managing SLA; Interaction between SLA and QoS
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/50—Network service management, e.g. ensuring proper service fulfilment according to agreements
- H04L41/5003—Managing SLA; Interaction between SLA and QoS
- H04L41/5019—Ensuring fulfilment of SLA
- H04L41/5025—Ensuring fulfilment of SLA by proactively reacting to service quality change, e.g. by reconfiguration after service quality degradation or upgrade
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Quality & Reliability (AREA)
- Computer And Data Communications (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The disclosure relates to a service degradation method, a service degradation device and a distributed task scheduling system. The method comprises the following steps: when determining that a distributed task scheduling system needs to execute service degradation operation, determining that the access amount of a service function is located in a first threshold range according to the access amount of a user to the service function registered on the distributed task scheduling system and a preset threshold range set; determining a first service degradation operation to be executed currently by the distributed task scheduling system according to the first threshold range and a first mapping relation corresponding to the service function; wherein the first mapping relation comprises a corresponding relation between different threshold value ranges under the service function and service degradation operation. The distributed task scheduling system in the embodiment can obtain different adaptive degradation schemes for different access volumes so as to cope with emergency situations, and improve the flexibility of service degradation in the distributed system.
Description
Technical Field
The present disclosure relates to communications technologies, and in particular, to a method and an apparatus for service degradation and a distributed task scheduling system.
Background
Traffic degradation refers to sacrificing some non-core functions at some point in time in order to ensure the stability of the core functions of the distributed environment system. To achieve service degradation well, each function of the functional service needs to be split, and the dependency between each function is reduced. The services referred to herein may include a variety of application services such as querying databases, payment goods services, etc.
When service degradation is performed in a distributed environment, degradation timeliness of each service node needs to be guaranteed, but a service degradation scheme in the distributed environment is single at present, and a situation that a user service requirement cannot be met often occurs.
Disclosure of Invention
In order to overcome the problems in the related art, the present disclosure provides a service degradation method, device and distributed task scheduling system.
According to a first aspect of the embodiments of the present disclosure, a method for service degradation is provided, including:
when determining that a distributed task scheduling system needs to execute service degradation operation, determining that the access amount of a service function is located in a first threshold range according to the access amount of a user to the service function registered on the distributed task scheduling system and a preset threshold range set; wherein the set of threshold ranges comprises at least one threshold range;
determining a first service degradation operation to be executed currently by the distributed task scheduling system according to the first threshold range and a first mapping relation corresponding to the service function; wherein the first mapping relation comprises a corresponding relation between different threshold value ranges under the service function and service degradation operation.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: in this embodiment, when the distributed task scheduling system determines that a service degradation operation needs to be performed, the distributed task scheduling system determines that the access amount of the service function is within a first threshold range according to the access amount of a user to the service function registered on the distributed task scheduling system and a preset threshold range set, and determines a first service degradation operation to be performed by the distributed task scheduling system according to the first threshold range and a first mapping relationship corresponding to the service function, so that the distributed task scheduling system can obtain different adaptive degradation schemes for the access amounts at different levels to cope with an emergency situation.
Optionally, the method further includes:
monitoring the access amount of a user to service functions registered on a distributed task scheduling system;
and when the access quantity of the service function is within the minimum threshold range in the threshold range set, determining that the distributed task scheduling system needs to execute service degradation operation.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: the embodiment can realize the real-time monitoring of the load pressure of the service node, further adjust the service degradation scheme in time, and greatly meet the service degradation requirement of the user.
Optionally, the method further includes:
when the system time of the distributed task scheduling system is monitored to reach the preset service degradation time, it is determined that the distributed task scheduling system needs to execute service degradation operation.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: the embodiment can support the function of timing service degradation, enriches the service degradation modes of the distributed task scheduling system, and further meets the service degradation requirements of users.
Further, before the monitoring the access amount of the user to the service function which is registered on the distributed task scheduling system, the method further comprises:
receiving a registration request sent by a service node, wherein the registration request carries the service priority of a service function on the service node.
Further, the determining, according to the first threshold range and the first mapping relationship corresponding to the service function, a first service degradation operation to be currently executed by the distributed task scheduling system specifically includes:
determining that a first service function needs to be degraded currently according to the service priority of the service function, wherein the service priority of the first service function is lower than that of the service function;
determining a first mapping relation corresponding to the service function according to the service function and a preset mapping relation set; the mapping relation set comprises first mapping relations corresponding to different service functions;
and determining to execute the first service degradation operation on the first service function according to the first mapping relation and the first threshold range.
Still further, the first traffic downgrading operation includes:
and updating a part of service nodes deploying the first service function to be offline service nodes so as to allocate part of processing resources on the part of service nodes to the service function.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: according to the method, the first service function which needs to be degraded currently is determined according to the service priority of the service function accessed by the current user, the first mapping relation corresponding to the service function is determined according to the service function and the preset mapping relation set, and therefore the first service degradation operation is determined to be executed on the first service function according to the first mapping relation and the first threshold range corresponding to the access amount of the service function, so that the distributed task scheduling system can obtain different degradation schemes according to the access amounts of different levels, the flexibility of service degradation in the distributed system is greatly improved, and the use requirements of the user can be met timely. Meanwhile, in the embodiment, the first service downgrading operation can be used to dynamically adjust available nodes, so as to relieve the load pressure of each service node and prevent overload of one service node.
According to a second aspect of the embodiments of the present disclosure, there is provided a traffic degradation apparatus, including:
the distributed task scheduling system comprises a first determining module, a second determining module and a third determining module, wherein the first determining module is configured to determine that the access quantity of the service function is within a first threshold range according to the access quantity of a user to the service function registered on the distributed task scheduling system and a preset threshold range set when determining that the distributed task scheduling system needs to execute service degradation operation; wherein the set of threshold ranges comprises at least one threshold range;
the second determining module is configured to determine a first service degradation operation to be currently executed by the distributed task scheduling system according to the first threshold range and a first mapping relation corresponding to the service function; wherein the first mapping relation comprises a corresponding relation between different threshold value ranges under the service function and service degradation operation.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: in this embodiment, when the distributed task scheduling system determines that a service degradation operation needs to be performed, the first determining module determines that the access amount of the service function is within a first threshold range according to the current access amount of a user to the service function registered on the distributed task scheduling system and a preset threshold range set, and then the second determining module determines a first service degradation operation to be performed by the distributed task scheduling system according to the first threshold range and a first mapping relationship corresponding to the service function, so that the distributed task scheduling system can obtain different adaptive degradation schemes for access amounts at different levels to cope with an emergency situation.
Further, the apparatus further comprises:
the monitoring module is configured to monitor the access amount of a user to the service function registered on the distributed task scheduling system;
a third determination module configured to determine that the distributed task scheduling system needs to perform a traffic degradation operation when the access amount of the service function is within a minimum threshold range of the set of threshold ranges.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: in this embodiment, the monitoring module may monitor the load pressure of the service node in real time, and when the access amount of the service function is within the minimum threshold range in the threshold range set, the third determining module determines that the distributed task scheduling system needs to perform the service degradation operation.
Optionally, the apparatus further comprises:
and the fourth determining module is configured to determine that the distributed task scheduling system needs to execute service degradation operation when the system time of the distributed task scheduling system is monitored to reach a preset service degradation time.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: in this embodiment, when it is monitored that the system time of the distributed task scheduling system reaches the preset service degradation time, the fourth determining module determines that the distributed task scheduling system needs to perform a service degradation operation, that is, this embodiment may also support a function of timing service degradation, enrich the service degradation manner of the distributed task scheduling system, and further meet the service degradation requirement of the user.
Still further, the apparatus further comprises:
the receiving module is configured to receive a registration request sent by a service node before the monitoring module monitors the access amount of a user to a service function registered on the distributed task scheduling system, wherein the registration request carries the service priority of the service function on the service node.
Further, the second determining module includes:
a first determining unit, configured to determine that a first service function needs to be downgraded currently according to a service priority of the service function, where the service priority of the first service function is lower than the service priority of the service function;
the second determining unit is configured to determine a first mapping relation corresponding to the service function according to the service function and a preset mapping relation set; the mapping relation set comprises first mapping relations corresponding to different service functions;
a third determining unit configured to determine to perform the first traffic degradation operation on the first service function according to the first mapping relationship and the first threshold range.
Still further, the first traffic downgrading operation includes:
and updating a part of service nodes deploying the first service function to be offline service nodes so as to allocate part of processing resources on the part of service nodes to the service function.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: in this embodiment, the first determining unit determines that the first service function needs to be degraded currently, and then the second determining unit determines the first mapping relationship corresponding to the service function according to the service function and the preset mapping relationship set, so that the third determining unit can determine to execute the first service degradation operation on the first service function according to the first mapping relationship and the first threshold range corresponding to the access amount of the service function, and thus the distributed task scheduling system can obtain different degradation schemes for the access amounts at different levels, thereby greatly improving the flexibility of service degradation in the distributed system, and timely satisfying the use requirements of users. Meanwhile, the embodiment can also realize dynamic adjustment of available nodes through the first service degradation operation, so as to relieve the load pressure of each service node and prevent one service node from being overloaded; in addition, in the first service downgrading operation, part of the service nodes with the first service function deployed are dynamically replaced by non-online nodes capable of returning fixed content, so that although the part of the service nodes are downgraded, the first service function still has corresponding returned content, and the availability of the first service function is ensured.
According to a third aspect of the embodiments of the present disclosure, there is provided a distributed task scheduling system, including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
when determining that a distributed task scheduling system needs to execute service degradation operation, determining that the access amount of a service function is located in a first threshold range according to the access amount of a user to the service function registered on the distributed task scheduling system and a preset threshold range set; wherein the set of threshold ranges comprises at least one threshold range;
determining a first service degradation operation to be executed currently by the distributed task scheduling system according to the first threshold range and a first mapping relation corresponding to the service function; wherein the first mapping relation comprises a corresponding relation between different threshold value ranges under the service function and service degradation operation.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: in this embodiment, when the distributed task scheduling system determines that a service degradation operation needs to be executed, the processor determines, according to the current access amount of the user to the service function registered on the distributed task scheduling system and a preset threshold range set, that the access amount of the service function is within a first threshold range, and determines, according to the first threshold range and a first mapping relationship corresponding to the service function, a first service degradation operation to be executed by the distributed task scheduling system, so that the distributed task scheduling system can obtain different adaptive degradation schemes for different levels of access amounts to cope with an emergency situation, and thus, the flexibility of service degradation in the distributed system is greatly improved, and the use requirement of the user can be met in time.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a flow diagram illustrating a method of traffic degradation in accordance with an exemplary embodiment;
FIG. 2 is a block diagram illustrating the architecture of a distributed system in accordance with an exemplary embodiment;
FIG. 3 is a flow diagram illustrating a method of traffic degradation in accordance with another exemplary embodiment;
FIG. 4 is a flow diagram illustrating a method of traffic degradation in accordance with yet another illustrative embodiment;
FIG. 5 is a block diagram illustrating a traffic downgrading apparatus, according to an example embodiment;
FIG. 6 is a block diagram illustrating a traffic downgrading apparatus, according to another example embodiment;
FIG. 7 is a block diagram illustrating a traffic downgrading apparatus, according to yet another example embodiment;
FIG. 8 is a block diagram illustrating entities of a distributed task scheduling system in accordance with an exemplary embodiment.
With the foregoing drawings in mind, certain embodiments of the disclosure have been shown and described in more detail below. These drawings and written description are not intended to limit the scope of the disclosed concepts in any way, but rather to illustrate the concepts of the disclosure to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
FIG. 1 is a flow diagram illustrating a method of traffic degradation in accordance with an exemplary embodiment. The embodiment relates to a specific process that when a distributed task scheduling system determines that service degradation is required to be performed currently, a first service degradation operation required to be performed currently by the distributed task scheduling system is determined according to the access amount of a user for a certain service function. As shown in fig. 1, the method comprises the steps of:
in step S101, when it is determined that the distributed task scheduling system needs to perform a service degradation operation, determining that an access amount of a service function registered on the distributed task scheduling system is within a first threshold range according to an access amount of a user to the service function and a preset threshold range set; wherein the set of threshold ranges includes at least one threshold range.
Before the steps in the present embodiment are introduced, a scene architecture applicable to the embodiment of the present disclosure is introduced:
referring to the block diagram of the distributed system shown in fig. 2, the distributed system may include a plurality of service nodes and a distributed task scheduling system, and each service node may be deployed with one or more service functions for responding to various service demands of users. Optionally, the service function may include application service functions such as commodity query, order query, payment service, chargeback service, and the like, and the type of the service function is not limited in this embodiment. It should be noted that each service function corresponds to a service priority, and the service priority may be configured by an administrator to the service node, or may be configured by other devices to the service node, which is not limited in this embodiment.
After the service functions on each service node are configured with the service priorities, the service nodes can register with the distributed task scheduling system, that is, the service nodes can send registration requests carrying the service priorities of the service functions to the distributed task scheduling system, so that the distributed task scheduling system writes the service priority information of the service functions into registration information for use in subsequent service degradation.
In step S101, when the distributed task scheduling system determines that the service degradation operation needs to be performed currently, for example, when the distributed task scheduling system determines that the load on a certain service node is too large currently or the response to the access request is slow, the distributed task scheduling system determines that the service degradation operation needs to be performed currently. Therefore, the distributed task scheduling system obtains the current access amount of the user for the service function registered on the distributed task scheduling system, and then determines which threshold range the access amount is in by combining the access amount and a preset threshold range set, so as to determine the threshold range as the first threshold range. For example, assuming that the threshold range set includes [100, 200], [201, 500], [501, 1000], when the access amount of the user for the payment service function is 190, it is determined that the access amount is within the threshold range of [100, 200], and [100, 200] is the first threshold range.
Optionally, the distributed task scheduling system may obtain the access amount of the user for the multiple service functions at the same time, and then determine the first threshold range in which the access amount of each service function is located, respectively, by combining with the preset threshold range set, or only obtain the access amount of the core service function, where the core service function is the service function with the highest service priority registered in the distributed task scheduling system. For convenience of description, in this embodiment, an access amount of one service function is taken as an example, and the service function is assumed to be a.
In step S102, determining a first service degradation operation to be currently executed by the distributed task scheduling system according to the first threshold range and a first mapping relationship corresponding to the service function; wherein the first mapping relation comprises a corresponding relation between different threshold value ranges under the service function and service degradation operation.
Wherein the first mapping relation comprises a corresponding relation between different threshold value ranges under the service function and service degradation operation.
In this step, since different service functions have different service priorities, the service degradation operations corresponding to the different service functions may also be different. For example, if the current distributed task scheduling system obtains the access amount of the payment service function, the distributed task scheduling system needs to downgrade the service function with the service priority lower than the payment service function, and if the current distributed task scheduling system obtains the access amount of the commodity inquiring function with the service priority lower than the payment service function, the distributed task scheduling system needs to downgrade the service function with the service priority lower than the commodity inquiring function, but cannot downgrade the service of the payment service function with the service priority higher than the commodity inquiring function.
Based on this, in the distributed task scheduling system, different service functions correspond to different first mapping relationships, after the distributed task scheduling system determines that the access amount of the service function a is within the first threshold range, the first service degradation operation to be executed by the distributed task scheduling system at present can be determined according to the first mapping relationship corresponding to the service function a, and the service degradation operations included in the first mapping relationship corresponding to the service function a are all degradation operations on other service functions having a lower service priority than the service function a, so that the accuracy and the effectiveness of degradation in the distributed task scheduling system are ensured.
In addition, in this embodiment, when the access volumes of the user for the service function a are different values, the threshold ranges to which the user belongs may be different, and thus the corresponding service degradation operations may also be different, that is, in this embodiment, the distributed task scheduling system may obtain different adaptive degradation schemes for the access volumes of different levels to cope with an emergency, so that this embodiment greatly improves flexibility of service degradation in the distributed system.
According to the service degradation method provided by the embodiment, when the distributed task scheduling system determines that the service degradation operation needs to be executed, the distributed task scheduling system determines that the access amount of the service function is within a first threshold range according to the current access amount of the user to the service function registered on the distributed task scheduling system and a preset threshold range set, and determines the first service degradation operation to be executed by the distributed task scheduling system according to the first threshold range and a first mapping relation corresponding to the service function, so that the distributed task scheduling system can obtain different adaptive degradation schemes for the access amounts of different levels to cope with emergency situations.
FIG. 3 is a flow diagram illustrating a method of traffic degradation in accordance with another exemplary embodiment. The embodiment relates to a specific process of determining the first service degradation operation by the distributed task scheduling system. On the basis of the foregoing embodiment, further, the foregoing S102 may include the following steps:
in step S201, it is determined that the first service function needs to be downgraded currently according to the service priority of the service function, where the service priority of the first service function is lower than the service priority of the service function.
In this step, as described above, different service functions correspond to different service priorities, so when the distributed task scheduling system determines that a service degradation operation needs to be performed currently, the distributed task scheduling system first determines the service priority of the service function (i.e., the service function a) according to the registration information of the service function on the distributed task scheduling system, and then determines that the first service function needs to be degraded currently, that is, determines a first service function having a service priority lower than that of the service function (i.e., the service function a), where the first service function may be one or multiple. Optionally, the distributed task scheduling system may also select a service function with the lowest priority from all the service functions with the priorities of the plurality of service functions lower than that of the service function a as the first service function.
When performing service degradation later, the distributed task scheduling system can perform service degradation for the first service function to ensure the accuracy of the degradation. Optionally, the service function a may be a core service function determined by the distributed task scheduling system according to the service priority of each service function, that is, the distributed task scheduling system may monitor the access amount of the core service function.
In step S202, determining a first mapping relationship corresponding to the service function according to the service function and a preset mapping relationship set; the mapping relation set comprises first mapping relations corresponding to different service functions.
In this step, a mapping relationship set is preset on the distributed task scheduling system, where the mapping relationship set includes first mapping relationships corresponding to different service functions, for example, a payment service function corresponds to a first mapping relationship a, and a query commodity function corresponds to a first mapping relationship B, where the first mapping relationship a includes a corresponding relationship between different threshold ranges and service degradation operations under the payment service function, and the first mapping relationship B includes a corresponding relationship between different threshold ranges and service degradation operations under the query commodity function, and the threshold ranges divided under the two functions may be the same or different, and the corresponding service degradation operation portions may be the same. It should be noted that, in the first mapping relationship, one threshold range may correspond to one or more different service downgrading operations (each service downgrading operation is different for a service function that needs to be downgraded), and therefore, after the first service function is determined in S201, the last adopted first service downgrading operation may be determined. For example, the first mapping relationship a shown in table 1 and the first mapping relationship B shown in table 2 may be entered.
TABLE 1
TABLE 2
In the examples shown in table 1 and table 2, the service degradation operations are different and the service degradation degrees are different in the first mapping relationships corresponding to different service functions. When the distributed task scheduling system acquires the access amount of the payment service function, the service degradation operation in the first mapping relation A aims at a commodity query function or a comment loading function with service priority lower than that of the payment service function, and when the distributed task scheduling system acquires the access amount of the commodity query function, the service degradation operation in the first mapping relation B aims at a comment loading function or an advertisement push function with service priority lower than that of the commodity query function.
In step S203, it is determined to perform the first service downgrading operation on the first service function according to the first mapping relationship and the first threshold range.
In this step, after the distributed task scheduling system determines the first threshold range in which the access amount of the service function is located and the first mapping relationship corresponding to the service function, a first service degradation operation performed on the first service function may be determined according to the first mapping relationship, and then the first service degradation operation is performed on the first service function. Assuming that the access amount (the access amount is 150) of the payment service function (i.e., the service function a) is obtained by the distributed task scheduling system, and assuming that the determined first service function is a function of querying a commodity, the distributed task scheduling system may determine that the access amount is within [100, 200], and then determine, according to the service degradation operation corresponding to [100, 200] in the first mapping relationship a, that the current first service degradation operation is "control 1 service node, where the function of querying a commodity is deployed, to return a preset logical value without querying a database".
As can be seen from the above description, different service functions have different service priorities, and thus the different service functions correspond to different first mapping relationships. When the distributed task scheduling system determines that service degradation is required, if the threshold ranges of the obtained access volumes of the users for a certain service function are different, the corresponding first service degradation operations are also different, that is, the distributed task scheduling system of this embodiment can obtain different adaptive degradation schemes for the access volumes of different levels to cope with emergency situations, so that the flexibility of service degradation in the distributed system is greatly improved, and the use requirements of the users can be timely met.
Optionally, when the distributed task scheduling system performs the first service downgrading operation for the first service function, the distributed task scheduling system may update part of the service nodes where the first service function is deployed to the non-online service nodes, and the non-online service nodes may return some content preset by the distributed task scheduling system to the user without obtaining the content from the database, so that the distributed task scheduling system can allocate processing resources on the part of the service nodes where the first service function is deployed to the service function a for use. For example, assuming that the distributed task scheduling system obtains the access amount of the service function a (the access amount is within a first threshold range), the first service function is the service function B, assuming that the service function a and the service function B are both deployed on 6 service nodes, the distributed task scheduling system may determine that the first service function on 3 service nodes needs to be reserved currently according to the first threshold range, and the other 3 service nodes are dynamically replaced by non-online nodes capable of returning fixed content, so as to relieve the pressure of the service function a on the other 3 service nodes, thereby ensuring that the other service nodes can smoothly support the service function a, so as to meet the response requirement of the user; in addition, in the first service downgrading operation, part of the service nodes with the first service function deployed are dynamically replaced by non-online nodes capable of returning fixed content, so that although the part of the service nodes are downgraded, the first service function still has corresponding returned content, and the availability of the first service function is ensured.
According to the service degradation method provided by the embodiment, the first service function which needs to be degraded currently is determined according to the service priority of the service function accessed by the current user, and the first mapping relation corresponding to the service function is determined according to the service function and the preset mapping relation set, so that the first service degradation operation is determined to be executed on the first service function according to the first mapping relation and the first threshold range corresponding to the access amount of the service function, and therefore, the distributed task scheduling system can obtain different degradation schemes for the access amounts of different levels, the flexibility of service degradation in a distributed system is greatly improved, and the use requirement of the user can be met in time. Meanwhile, in the embodiment, the current available nodes can be dynamically adjusted through the first service degradation operation, so that the load pressure of each service node is relieved, and overload of one service node is prevented.
FIG. 4 is a flow chart illustrating a method of traffic degradation in accordance with yet another exemplary embodiment. The present embodiments relate to a specific process by which a distributed task scheduling system determines when a traffic destaging operation needs to be performed. On the basis of the above embodiment, further, the method may further include:
in step S301, the amount of access of a user to service functions registered on the distributed task scheduling system is monitored.
In this step, the distributed task scheduling system may monitor the current access amount of the user to the service functions registered on the distributed task scheduling system in real time, and optionally, the distributed task scheduling system may monitor the access amounts of a plurality of registered service functions in real time and may also monitor the access amount of one registered service function. When monitoring the access volume of a registered service function, the service function may be the core service function with the highest service priority.
In step S302, when the access amount of the service function is within the minimum threshold range in the threshold range set, it is determined that the distributed task scheduling system needs to perform a service degradation operation.
In this step, taking an example that the distributed task scheduling system detects the access amount of the core service function in real time, when the distributed task scheduling system monitors the access amount of the core service function, it may be determined whether the access amount of the core service function is within the minimum threshold range in the preset threshold range set, that is, it is determined whether the current core service function needs the distributed task scheduling system to perform service degradation for other service functions through the minimum threshold range. The minimum value in the minimum threshold range is actually the lowest limit value that allows the distributed task scheduling system to perform traffic degradation. That is, when the access amount of the core service function is greater than the minimum value in the minimum threshold range, the distributed task scheduling system determines that traffic degradation can be currently performed on other service functions having a service priority lower than that of the core service function.
Optionally, in this embodiment, it may also be determined that the distributed task scheduling system needs to perform a service degradation operation when it is monitored that the system time of the distributed task scheduling system reaches a preset service degradation time, that is, the distributed task scheduling system in this embodiment supports a function of timing service degradation.
Optionally, the distributed task scheduling system according to this embodiment may further provide an editable interface, and an administrator may perform corresponding operation and maintenance editing through the editable page, for example, add a new service function.
The service degradation method provided by the embodiment can monitor the load pressure of the service node in real time, can support the function of timing service degradation, enriches the service degradation modes of the distributed task scheduling system, and meets the service degradation requirements of users.
The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods. For details not disclosed in the embodiments of the apparatus of the present disclosure, refer to the embodiments of the method of the present disclosure.
FIG. 5 is a block diagram illustrating a traffic downgrading apparatus, which may be implemented by software, hardware, or a combination of both, as part or all of a distributed task scheduling system, according to an example embodiment. As shown in fig. 5, the service degradation apparatus includes: a first determination module 11 and a second determination module 12.
Specifically, the first determining module 11 is configured to, when it is determined that the distributed task scheduling system needs to perform a service degradation operation, determine that an access amount of a service function registered on the distributed task scheduling system is within a first threshold range according to an access amount of a user to the service function and a preset threshold range set; wherein the set of threshold ranges comprises at least one threshold range;
a second determining module 12, configured to determine, according to the first threshold range and a first mapping relation corresponding to the service function, a first service degradation operation to be currently executed by the distributed task scheduling system; wherein the first mapping relation comprises a corresponding relation between different threshold value ranges under the service function and service degradation operation.
In summary, the service degradation apparatus provided by the embodiments of the present disclosure, when the distributed task scheduling system determines that the service degradation operation needs to be performed, the first determination module determines that the access quantity of the service function is within a first threshold range according to the access quantity of the user to the service function registered on the distributed task scheduling system and a preset threshold range set, then the second determining module determines the first service degradation operation to be executed currently by the distributed task scheduling system according to the first threshold range and the first mapping relation corresponding to the service function, therefore, the distributed task scheduling system can obtain different adaptive degradation schemes aiming at different levels of access amount, therefore, the flexibility of service degradation under the distributed system is greatly improved, and the use requirements of users can be met in time.
Fig. 6 is a block diagram of a traffic degradation apparatus according to another exemplary embodiment, and based on the embodiment shown in fig. 5, the traffic degradation apparatus may further include: a monitoring module 13 and a third determination module 14.
The monitoring module 13 is configured to monitor the access amount of the user to the service function currently registered on the distributed task scheduling system;
a third determining module 14 configured to determine that the distributed task scheduling system needs to perform a traffic degradation operation when the access amount of the service function is within a minimum threshold range of the set of threshold ranges.
Optionally, the service degradation apparatus may further include: a fourth determination module 15. The fourth determining module 15 is configured to determine that the distributed task scheduling system needs to perform a service degradation operation when it is monitored that the system time of the distributed task scheduling system reaches a preset service degradation time.
Optionally, the service degradation apparatus may further include: a receiving module 16. The receiving module 16 is configured to receive a registration request sent by a service node before the monitoring module 13 monitors the access amount of a user to a service function registered on the distributed task scheduling system, where the registration request carries a service priority of the service function on the service node.
To sum up, in the service degradation device provided in this embodiment of the present disclosure, the monitoring module may monitor the load pressure of the service node in real time, and when the access amount of the service function is within the minimum threshold range in the threshold range set, the third determining module determines that the distributed task scheduling system needs to perform a service degradation operation, which may implement real-time monitoring of the load pressure of the service node, and may further adjust a service degradation scheme in time, thereby greatly meeting the service degradation requirement of the user; in addition, in this embodiment, when it is monitored that the system time of the distributed task scheduling system reaches the preset service degradation time, the fourth determining module also determines that the distributed task scheduling system needs to execute a service degradation operation, that is, this embodiment may also support a function of timing service degradation, enrich the service degradation manner of the distributed task scheduling system, and further meet the service degradation requirement of the user.
Fig. 7 is a block diagram of a traffic degradation apparatus according to yet another exemplary embodiment, and based on the embodiment shown in fig. 6, further, the second determining module 12 includes: a first determining unit 121, a second determining unit 122, and a third determining unit 123.
A first determining unit 121, configured to determine that a first service function needs to be downgraded currently according to a service priority of the service function, where the service priority of the first service function is lower than the service priority of the service function;
a second determining unit 122, configured to determine, according to the service function and a preset mapping relationship set, a first mapping relationship corresponding to the service function; the mapping relation set comprises first mapping relations corresponding to different service functions;
a third determining unit 123 configured to determine to perform the first traffic degradation operation on the first service function according to the first mapping relationship and the first threshold range.
Further, the first traffic downgrading operation includes:
and updating a part of service nodes deploying the first service function to be offline service nodes so as to allocate part of processing resources on the part of service nodes to the service function.
To sum up, in the service degradation apparatus provided in the embodiment of the present disclosure, the first determining unit determines that the first service function needs to be degraded currently, and then the second determining unit determines the first mapping relationship corresponding to the service function according to the service function and the preset mapping relationship set, so that the third determining unit can determine to execute the first service degradation operation on the first service function according to the first mapping relationship and the first threshold range corresponding to the access amount of the service function, so that the distributed task scheduling system can obtain different degradation schemes for the access amounts at different levels, thereby greatly improving the flexibility of service degradation in the distributed system and timely satisfying the use requirements of the user. Meanwhile, the embodiment can also realize dynamic adjustment of available nodes through the first service degradation operation, so as to relieve the load pressure of each service node and prevent one service node from being overloaded; in addition, in the first service downgrading operation, part of the service nodes with the first service function deployed are dynamically replaced by non-online nodes capable of returning fixed content, so that although the part of the service nodes are downgraded, the first service function still has corresponding returned content, and the availability of the first service function is ensured.
With regard to the apparatus in the above-described embodiment, the specific manner in which the respective modules and units perform operations has been described in detail in the embodiment related to the method, and will not be elaborated upon here.
Having described the internal functional modules and structural schematic of the service downgrading apparatus, fig. 8 is a block diagram illustrating an entity of a distributed service scheduling system according to an exemplary embodiment, and as shown in fig. 8, the distributed service scheduling system may include: a processor 21, a memory 22 for storing instructions executable by the processor 21;
wherein the processor 21 is configured to:
when determining that a distributed task scheduling system needs to execute service degradation operation, determining that the access amount of a service function is located in a first threshold range according to the access amount of a user to the service function registered on the distributed task scheduling system and a preset threshold range set; wherein the set of threshold ranges comprises at least one threshold range;
determining a first service degradation operation to be executed currently by the distributed task scheduling system according to the first threshold range and a first mapping relation corresponding to the service function; wherein the first mapping relation comprises a corresponding relation between different threshold value ranges under the service function and service degradation operation.
In the embodiment of the service degradation device, it should be understood that the Processor 21 may be a Central Processing Unit (CPU), other general purpose processors, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), etc. The general purpose processor may be a microprocessor, the processor may be any conventional processor, and the memory 22 may be a read-only memory (ROM), a Random Access Memory (RAM), a flash memory, a hard disk, or a solid state disk.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as the memory 22 comprising instructions, executable by the processor 21 of the distributed traffic scheduling system to perform the traffic downgrading method described above is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer readable storage medium, instructions in the storage medium, when executed by a processor of a distributed service scheduling system, enable the distributed service scheduling system to perform the service downgrading method described above, the method comprising:
when determining that a distributed task scheduling system needs to execute service degradation operation, determining that the access amount of a service function is located in a first threshold range according to the access amount of a user to the service function registered on the distributed task scheduling system and a preset threshold range set; wherein the set of threshold ranges comprises at least one threshold range;
determining a first service degradation operation to be executed currently by the distributed task scheduling system according to the first threshold range and a first mapping relation corresponding to the service function; wherein the first mapping relation comprises a corresponding relation between different threshold value ranges under the service function and service degradation operation.
Optionally, the method further includes:
monitoring the access amount of a user to service functions registered on a distributed task scheduling system;
and when the access quantity of the service function is within the minimum threshold range in the threshold range set, determining that the distributed task scheduling system needs to execute service degradation operation.
Optionally, the method further includes:
when the system time of the distributed task scheduling system is monitored to reach the preset service degradation time, it is determined that the distributed task scheduling system needs to execute service degradation operation.
Further, before monitoring the access amount of the user to the service function registered on the distributed task scheduling system, the method further comprises:
receiving a registration request sent by a service node, wherein the registration request carries the service priority of a service function on the service node.
Further, the determining, according to the first threshold range and the first mapping relationship corresponding to the service function, a first service degradation operation to be currently executed by the distributed task scheduling system includes:
determining that a first service function needs to be degraded currently according to the service priority of the service function, wherein the service priority of the first service function is lower than that of the service function;
determining a first mapping relation corresponding to the service function according to the service function and a preset mapping relation set; the mapping relation set comprises first mapping relations corresponding to different service functions;
and determining to execute the first service degradation operation on the first service function according to the first mapping relation and the first threshold range.
Still further, the first traffic downgrading operation includes:
and updating a part of service nodes deploying the first service function to be offline service nodes so as to allocate part of processing resources on the part of service nodes to the service function.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.
Claims (11)
1. A method for traffic degradation, comprising:
when determining that a distributed task scheduling system needs to execute service degradation operation, determining that the access amount of a service function is located in a first threshold range according to the access amount of a user to the service function registered on the distributed task scheduling system and a preset threshold range set; the threshold range set comprises at least one threshold range, wherein the service function registered on the distributed task scheduling system refers to a service function of the distributed task scheduling system writing service priority information of the service function into registration information;
determining a first service degradation operation to be executed currently by the distributed task scheduling system according to the first threshold range and a first mapping relation corresponding to the service function; wherein the first mapping relation comprises a corresponding relation between different threshold value ranges under the service functions and business degradation operation, wherein the business degradation operation is the degradation operation of other service functions with lower service priority than the service functions;
monitoring the access amount of a user to service functions registered on a distributed task scheduling system;
and when the access quantity of the service function is within the minimum threshold range in the threshold range set, determining that the distributed task scheduling system needs to execute service degradation operation, wherein the minimum value in the minimum threshold range is the minimum limit value for allowing the distributed task scheduling system to execute service degradation.
2. The method of claim 1, further comprising:
when the system time of the distributed task scheduling system is monitored to reach the preset service degradation time, it is determined that the distributed task scheduling system needs to execute service degradation operation.
3. The method of claim 1, wherein prior to monitoring the amount of user access to service functions registered on the distributed task scheduling system, the method further comprises:
receiving a registration request sent by a service node, wherein the registration request carries the service priority of a service function on the service node.
4. The method according to any one of claims 1 to 3, wherein the determining, according to the first threshold range and the first mapping relationship corresponding to the service function, a first service degradation operation to be currently executed by the distributed task scheduling system includes:
determining that a first service function needs to be degraded currently according to the service priority of the service function, wherein the service priority of the first service function is lower than that of the service function;
determining a first mapping relation corresponding to the service function according to the service function and a preset mapping relation set; the mapping relation set comprises first mapping relations corresponding to different service functions;
and determining to execute the first service degradation operation on the first service function according to the first mapping relation and the first threshold range.
5. The method of claim 4, wherein the first traffic downgrading operation comprises:
and updating a part of service nodes deploying the first service function to be offline service nodes so as to allocate part of processing resources on the part of service nodes to the service function.
6. A traffic downgrading apparatus, comprising:
the distributed task scheduling system comprises a first determining module, a second determining module and a third determining module, wherein the first determining module is configured to determine that the access quantity of the service function is within a first threshold range according to the access quantity of a user to the service function registered on the distributed task scheduling system and a preset threshold range set when determining that the distributed task scheduling system needs to execute service degradation operation; the threshold range set comprises at least one threshold range, wherein the service function registered on the distributed task scheduling system refers to a service function of the distributed task scheduling system writing service priority information of the service function into registration information;
a second determining module, configured to determine, according to the first threshold range and a first mapping relation corresponding to the service function, a first service degradation operation to be currently executed by the distributed task scheduling system; wherein the first mapping relation comprises a corresponding relation between different threshold value ranges under the service functions and business degradation operation, wherein the business degradation operation is the degradation operation of other service functions with lower service priority than the service functions;
the monitoring module is configured to monitor the access amount of a user to the service function registered on the distributed task scheduling system;
a third determining module configured to determine that the distributed task scheduling system needs to perform a traffic degradation operation when the access amount of the service function is within a minimum threshold range in the set of threshold ranges, where a minimum value in the minimum threshold range is a minimum limit value allowing the distributed task scheduling system to perform traffic degradation.
7. The apparatus of claim 6, further comprising:
and the fourth determining module is configured to determine that the distributed task scheduling system needs to execute service degradation operation when the system time of the distributed task scheduling system is monitored to reach a preset service degradation time.
8. The apparatus of claim 6, further comprising:
the receiving module is configured to receive a registration request sent by a service node before the monitoring module monitors the access amount of a user to a service function registered on the distributed task scheduling system, wherein the registration request carries the service priority of the service function on the service node.
9. The apparatus of any of claims 7-8, wherein the second determining module comprises:
a first determining unit, configured to determine that a first service function needs to be downgraded currently according to a service priority of the service function, where the service priority of the first service function is lower than the service priority of the service function;
the second determining unit is configured to determine a first mapping relation corresponding to the service function according to the service function and a preset mapping relation set; the mapping relation set comprises first mapping relations corresponding to different service functions;
a third determining unit configured to determine to perform the first traffic degradation operation on the first service function according to the first mapping relationship and the first threshold range.
10. The apparatus of claim 9, wherein the first traffic downgrading operation comprises:
and updating a part of service nodes deploying the first service function to be offline service nodes so as to allocate part of processing resources on the part of service nodes to the service function.
11. A distributed task scheduling system, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
when determining that a distributed task scheduling system needs to execute service degradation operation, determining that the access amount of a service function is located in a first threshold range according to the access amount of a user to the service function registered on the distributed task scheduling system and a preset threshold range set; the threshold range set comprises at least one threshold range, wherein the service function registered on the distributed task scheduling system refers to a service function of the distributed task scheduling system writing service priority information of the service function into registration information;
determining a first service degradation operation to be executed currently by the distributed task scheduling system according to the first threshold range and a first mapping relation corresponding to the service function; wherein the first mapping relation comprises a corresponding relation between different threshold value ranges under the service functions and business degradation operation, wherein the business degradation operation is the degradation operation of other service functions with lower service priority than the service functions;
monitoring the access amount of a user to service functions registered on a distributed task scheduling system;
and when the access quantity of the service function is within the minimum threshold range in the threshold range set, determining that the distributed task scheduling system needs to execute service degradation operation, wherein the minimum value in the minimum threshold range is the minimum limit value for allowing the distributed task scheduling system to execute service degradation.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611187847.0A CN106713028B (en) | 2016-12-20 | 2016-12-20 | Service degradation method and device and distributed task scheduling system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611187847.0A CN106713028B (en) | 2016-12-20 | 2016-12-20 | Service degradation method and device and distributed task scheduling system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106713028A CN106713028A (en) | 2017-05-24 |
CN106713028B true CN106713028B (en) | 2020-06-02 |
Family
ID=58938217
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611187847.0A Active CN106713028B (en) | 2016-12-20 | 2016-12-20 | Service degradation method and device and distributed task scheduling system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106713028B (en) |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107454138A (en) * | 2017-06-19 | 2017-12-08 | 阿里巴巴集团控股有限公司 | The implementation method and device that business degrades |
LT3431931T (en) * | 2017-07-18 | 2021-07-12 | Kamstrup A/S | Smart metering device providing adaptive service level |
CN108366086A (en) * | 2017-12-25 | 2018-08-03 | 聚好看科技股份有限公司 | A kind of method and device of control business processing |
CN108762949B (en) * | 2018-05-21 | 2021-07-09 | 招银云创信息技术有限公司 | Centralized scheduling method, system, computer equipment and storage medium |
CN109257294B (en) * | 2018-09-07 | 2022-04-12 | 武汉斗鱼网络科技有限公司 | Service dynamic degradation method, device, server and storage medium based on redis |
CN109785077A (en) * | 2019-01-30 | 2019-05-21 | 北京互金新融科技有限公司 | The treating method and apparatus of order |
CN112187521A (en) * | 2020-09-09 | 2021-01-05 | 上海微亿智造科技有限公司 | Apollo-based system for realizing industrial internet distributed service degradation |
CN113746661A (en) * | 2021-01-07 | 2021-12-03 | 北京沃东天骏信息技术有限公司 | Service processing method and device |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8626900B2 (en) * | 2010-07-02 | 2014-01-07 | At&T Intellectual Property I, L.P. | Method and system to proactively identify degraded network performance |
CN103929454A (en) * | 2013-01-15 | 2014-07-16 | 中国移动通信集团四川有限公司 | Load balancing storage method and system in cloud computing platform |
CN105072201A (en) * | 2015-08-28 | 2015-11-18 | 北京奇艺世纪科技有限公司 | Distributed storage system and storage quality control method and device thereof |
CN105306507A (en) * | 2014-07-18 | 2016-02-03 | 阿里巴巴集团控股有限公司 | Disaster tolerance processing method and disaster tolerance processing device in distributed architecture |
CN105554160A (en) * | 2016-01-29 | 2016-05-04 | 四川长虹电器股份有限公司 | Dubbo distributed cluster system architecture method based on nginx load balancing |
CN106201722A (en) * | 2016-07-12 | 2016-12-07 | 乐视控股(北京)有限公司 | The load regulation method of server and system |
-
2016
- 2016-12-20 CN CN201611187847.0A patent/CN106713028B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8626900B2 (en) * | 2010-07-02 | 2014-01-07 | At&T Intellectual Property I, L.P. | Method and system to proactively identify degraded network performance |
CN103929454A (en) * | 2013-01-15 | 2014-07-16 | 中国移动通信集团四川有限公司 | Load balancing storage method and system in cloud computing platform |
CN105306507A (en) * | 2014-07-18 | 2016-02-03 | 阿里巴巴集团控股有限公司 | Disaster tolerance processing method and disaster tolerance processing device in distributed architecture |
CN105072201A (en) * | 2015-08-28 | 2015-11-18 | 北京奇艺世纪科技有限公司 | Distributed storage system and storage quality control method and device thereof |
CN105554160A (en) * | 2016-01-29 | 2016-05-04 | 四川长虹电器股份有限公司 | Dubbo distributed cluster system architecture method based on nginx load balancing |
CN106201722A (en) * | 2016-07-12 | 2016-12-07 | 乐视控股(北京)有限公司 | The load regulation method of server and system |
Also Published As
Publication number | Publication date |
---|---|
CN106713028A (en) | 2017-05-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106713028B (en) | Service degradation method and device and distributed task scheduling system | |
US11003497B2 (en) | Managing resource allocation in hierarchical quota system | |
US10235047B2 (en) | Memory management method, apparatus, and system | |
US8429666B2 (en) | Computing platform with resource constraint negotiation | |
US10091126B2 (en) | Cloud system, control method thereof, management server and control method thereof | |
KR20150017984A (en) | The method and apparatus for distributing data in a hybrid cloud environment | |
US20140143647A1 (en) | Method for improving browser cache by reducing duplicate stored content | |
CN109002357B (en) | Resource allocation method and device and Internet of things system | |
CN105791254B (en) | Network request processing method and device and terminal | |
TWI795565B (en) | Resource sharing method, device, computer device and storage media | |
CN110830604B (en) | DNS scheduling method and device | |
CN106302640A (en) | Data request processing method and device | |
CN112445857A (en) | Resource quota management method and device based on database | |
CN103414657A (en) | Cross-data-center resource scheduling method, super scheduling center and system | |
US20220086097A1 (en) | Stream allocation using stream credits | |
CN112600761A (en) | Resource allocation method, device and storage medium | |
CN112805684A (en) | Resource allocation using recovery borrowing | |
CN112615795A (en) | Flow control method and device, electronic equipment, storage medium and product | |
CN113014408A (en) | Distributed system and management method thereof | |
CN115794396A (en) | Resource allocation method, system and electronic equipment | |
CN113468442A (en) | Resource bit flow distribution method, computing device and computer storage medium | |
CN113761400A (en) | Access request forwarding method, device and equipment | |
CN117785486B (en) | Environment resource allocation method, device, equipment and medium | |
CN109672900B (en) | Method and device for generating hot content list | |
CN116846979B (en) | Scheduling method and scheduling system for resources in cloud computing environment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |