CN114710443A - Traffic scheduling method and device for forwarding server - Google Patents

Traffic scheduling method and device for forwarding server Download PDF

Info

Publication number
CN114710443A
CN114710443A CN202210265259.3A CN202210265259A CN114710443A CN 114710443 A CN114710443 A CN 114710443A CN 202210265259 A CN202210265259 A CN 202210265259A CN 114710443 A CN114710443 A CN 114710443A
Authority
CN
China
Prior art keywords
forwarding
server
addresses
address
parameter value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210265259.3A
Other languages
Chinese (zh)
Other versions
CN114710443B (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.)
Hangzhou Huacheng Software Technology Co Ltd
Original Assignee
Hangzhou Huacheng Software Technology 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 Hangzhou Huacheng Software Technology Co Ltd filed Critical Hangzhou Huacheng Software Technology Co Ltd
Priority to CN202210265259.3A priority Critical patent/CN114710443B/en
Publication of CN114710443A publication Critical patent/CN114710443A/en
Application granted granted Critical
Publication of CN114710443B publication Critical patent/CN114710443B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/29Flow control; Congestion control using a combination of thresholds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/255Maintenance or indexing of mapping tables
    • H04L61/2553Binding renewal aspects, e.g. using keep-alive messages

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention relates to the technical field of traffic scheduling, in particular to a traffic scheduling method and device for a forwarding server. The method comprises the following steps: detecting a flow consumption value when each forwarding server in the forwarding cluster executes a forwarding task based on the IP address of the internet interconnection protocol bound to each forwarding server; for any forwarding server, when the traffic consumption value of the forwarding server meets a preset traffic threshold value of the forwarding server, unbinding the forwarding server from the IP address; and binding the IP address with any standby server, and using the bound standby server as a forwarding server for executing a forwarding task. Since the standby server has completed the initialization operations, the bound standby server can be quickly used to perform forwarding tasks. The IP address and the forwarding server can respectively and flexibly carry out automatic scheduling, the IP address is not updated in the whole process, and the IP address in the configuration file does not need to be changed. The speed of executing the forwarding task is further increased.

Description

Traffic scheduling method and device for forwarding server
Technical Field
Embodiments of the present invention relate to the field of traffic scheduling technologies, and in particular, to a traffic scheduling method and apparatus for a forwarding server, a computing device, and a computer-readable storage medium.
Background
In the field of security video monitoring, a P2P hole punching technology is a general technical scheme for realizing intranet penetration, and the flow communication cost is effectively reduced. The P2P scheme includes a hole cluster and a forwarding cluster, and when extreme network environments are encountered, hole penetration may fail, and public network traffic forwarding needs to be performed by the forwarding cluster.
In the deployment and application scenarios of the current public cloud, an IP (Internet Protocol) address in a forwarding cluster is permanently bound with a server, so that the degree of automation scheduling in an operation and maintenance layer is limited. Meanwhile, cost control of enterprises is not facilitated.
Therefore, a traffic scheduling method for a forwarding server is proposed to implement separate scheduling of an IP address and a server.
Disclosure of Invention
The embodiment of the invention provides a flow scheduling method for a forwarding server, which is used for realizing the respective scheduling of an IP address and the server.
In a first aspect, an embodiment of the present invention provides a traffic scheduling method for a forwarding server, including:
detecting a flow consumption value when each forwarding server in the forwarding cluster executes a forwarding task based on the IP address of the internetworking interconnection protocol bound to each forwarding server;
for any forwarding server, when the traffic consumption value of the forwarding server meets a preset traffic threshold value of the forwarding server, unbinding the forwarding server from the IP address;
binding the IP address with any standby server, and using the bound standby server as a forwarding server for executing a forwarding task; the standby server is a server which has completed initialization operation.
The flow consumption value of each forwarding server is detected, the fact that the flow consumption value of any forwarding server meets a preset flow threshold value can be timely found, and the fact that the flow consumption of the forwarding server is too high and is not suitable for continuous operation is indicated, therefore, the forwarding server and the corresponding IP address are unbound, the IP address is not destroyed, the IP address is bound with the standby server continuously, and the bound standby server is used for continuously executing the forwarding task. Since the standby server has completed the initialization operation, the binding process is less time consuming and the bound standby server can be quickly used to perform the forwarding task. The IP address is decoupled from the forwarding server, the IP address and the forwarding server can be flexibly and respectively scheduled automatically, the IP address is not updated in the whole process, and the IP address in the configuration file does not need to be changed. The speed and the accuracy of executing the forwarding task are further improved.
Optionally, binding the IP address with any standby server includes:
putting the IP address into an elastic IP pool; the elastic IP pool is used for storing the IP addresses which are not bound;
when the IP address exists in the elastic IP pool, any one standby server in the elastic server pool is bound with the IP address; the elastic server pool is used for storing the servers which have completed initialization operation and are not bound with the IP addresses.
And putting the unbound IP address into an elastic IP pool, and when the IP address exists in the elastic IP pool, optionally binding a standby server and the IP address from the elastic server pool, so that the binding of the IP address and the standby server is simply and efficiently realized, the efficiency of executing a forwarding task by a forwarding cluster is improved, and manual participation is not needed.
Optionally, after binding the IP address with any standby server, the method further includes:
deleting the bound standby server from the elastic server pool;
when the number of the standby servers in the elastic server pool is smaller than a first preset threshold value, one or more standby servers are obtained by a cloud server manufacturer and initialized, and the standby servers after the initialization are added into the elastic server pool, so that the number of the standby servers in the elastic server pool is equal to the first preset threshold value.
Because one or more standby servers exist in the previous step and are bound with the IP address to execute the forwarding task. The number of standby servers in the pool of resilient servers is therefore less than a first preset threshold. In order to continuously and quickly realize the subsequent binding of the IP address and the standby server, the system automatically acquires the standby server through a cloud server manufacturer, initializes the standby server and then adds the standby server into the elastic server pool, so that the subsequent quick binding of the IP address and the standby server is realized, and a new forwarding server is quickly generated.
Optionally, the method further comprises:
detecting the total bandwidth of each forwarding server in the forwarding cluster;
if the total bandwidth deviates from the preset interval, modifying the quantity value of the IP address set in the configuration center from a first parameter value to a second parameter value according to a preset rule; the first parameter value is the number of corresponding IP addresses when the total bandwidth of the forwarding cluster is in the preset interval;
updating the number of forwarding servers in the forwarding cluster for performing forwarding tasks based on the second parameter value.
The total bandwidth of each forwarding server in the forwarding cluster can be detected, the deviation of the total bandwidth from the preset interval which can be borne by the forwarding cluster at present can be found in time, and the quantity value of the IP address set by the configuration center is automatically modified, so that the capacity expansion and the capacity reduction of the forwarding cluster can be effectively realized in time, and the problems of slow operation of the cluster or other faults are avoided.
Optionally, if it is determined that the total bandwidth deviates from the preset interval, modifying the quantity value of the IP addresses set in the configuration center from a first parameter value to a second parameter value according to a preset rule, including:
if the total bandwidth is determined to be larger than a second preset threshold, modifying the quantity value of the IP addresses set in the configuration center from a first parameter value to a second parameter value according to a preset rule; the second parameter value is greater than the first parameter value;
updating the number of forwarding servers in the forwarding cluster for performing forwarding tasks based on the second parameter value, including:
based on the second parameter value, one or more IP addresses are obtained by the cloud server manufacturer and added into the elastic IP pool;
and when one or more IP addresses exist in the elastic IP pool, aiming at any IP address, optionally selecting one standby server from the elastic server pool to be bound with the IP address, and using the bound standby server as a forwarding server for executing a forwarding task.
If the total bandwidth is too high and exceeds a second preset threshold value which can be borne by the forwarding cluster at present, the first parameter value is modified into a second parameter value with a larger value, and the corresponding number of IP addresses are automatically obtained by a cloud server manufacturer and added into the elastic IP pool, so that the IP addresses are increased. The increased IP address is bound with the standby server, so that the increase of the forwarding server is realized, and the capacity expansion can be automatically, timely and efficiently carried out.
Optionally, based on the second parameter value, obtaining one or more IP addresses by the cloud server vendor and adding the one or more IP addresses into the elastic IP pool, including:
determining that the number of available IP addresses is smaller than the second parameter value, and acquiring one or more IP addresses by the cloud server manufacturer and adding the IP addresses into the elastic IP pool; the number of available IP addresses is the sum of the number of IP addresses in the forwarding cluster that are being used to perform forwarding tasks and the number of IP addresses in the resilient IP pool.
As the configuration center is modified to be the second parameter value, when the system finds that the number of the available IP addresses is smaller than the second parameter value, one or more IP addresses are automatically obtained by a cloud server manufacturer and added into the elastic IP pool, so that the IP addresses are automatically and timely increased.
Optionally, if it is determined that the total bandwidth deviates from the preset interval, modifying the quantity value of the IP addresses set in the configuration center from a first parameter value to a second parameter value according to a preset rule, including:
if the total bandwidth is determined to be smaller than a third preset threshold, modifying the quantity value of the IP addresses set in the configuration center from a first parameter value to a second parameter value according to a preset rule; the second parameter value is less than the first parameter value;
updating the number of forwarding servers in the forwarding cluster for performing forwarding tasks based on the second parameter value, including:
when the second parameter value is smaller than the number of the available IP addresses, for any one or more forwarding servers in the forwarding cluster, unbinding the forwarding servers from the IP addresses, and deleting the IP addresses until the number of the available IP addresses is equal to the second parameter value, so that the number of the forwarding servers used for executing the forwarding tasks in the forwarding cluster is reduced; the number of available IP addresses is based on a sum of the number of IP addresses in the forwarding cluster that are being used to perform forwarding tasks and the number of IP addresses in the resilient IP pool.
If the total bandwidth is too low and is lower than a third preset threshold value which can be currently carried by the forwarding cluster, resources and cost are wasted due to too many forwarding servers. Automatically modifying the first parameter value to a second parameter value of smaller value. Then, when the second parameter value is smaller than the number of available IP addresses, the forwarding server is unbound from the IP addresses for any one or more forwarding servers in the forwarding cluster, and the IP addresses are deleted until the number of available IP addresses is equal to the second parameter value, thereby reducing the number of forwarding servers in the forwarding cluster for performing forwarding tasks. Therefore, the capacity can be automatically, timely and efficiently reduced.
In a second aspect, an embodiment of the present invention further provides a traffic scheduling apparatus for a forwarding server, including:
the detection unit is used for detecting the flow consumption value when each forwarding server in the forwarding cluster executes the forwarding task based on the IP address of the internet interconnection protocol bound to each forwarding server;
a processing unit to:
for any forwarding server, when the traffic consumption value of the forwarding server meets a preset traffic threshold value of the forwarding server, unbinding the forwarding server from the IP address;
binding the IP address with any standby server, and using the bound standby server as a forwarding server for executing a forwarding task; the standby server is a server which completes initialization operation.
Optionally, the processing unit is specifically configured to:
putting the IP address into an elastic IP pool; the elastic IP pool is used for storing the IP addresses which are not bound;
when the IP address exists in the elastic IP pool, any one standby server in the elastic server pool is bound with the IP address; the elastic server pool is used for storing the servers which have finished initialization operation and are not bound with the IP addresses.
Optionally, the processing unit is further configured to:
deleting the bound standby server from the elastic server pool;
when the number of the standby servers in the elastic server pool is smaller than a first preset threshold value, one or more standby servers are obtained by a cloud server manufacturer and initialized, and the standby servers after the initialization are added into the elastic server pool, so that the number of the standby servers in the elastic server pool is equal to the first preset threshold value.
Optionally, the detection unit is further configured to:
detecting the total bandwidth of each forwarding server in the forwarding cluster;
the processing unit is further to:
if the total bandwidth deviates from the preset interval, modifying the quantity value of the IP address set in the configuration center from a first parameter value to a second parameter value according to a preset rule; the first parameter value is the number of corresponding IP addresses when the total bandwidth of the forwarding cluster is in the preset interval;
updating the number of forwarding servers in the forwarding cluster for performing forwarding tasks based on the second parameter value.
Optionally, the processing unit is specifically configured to:
if the total bandwidth is determined to be larger than a second preset threshold value, modifying the quantity value of the IP addresses set in the configuration center from a first parameter value to a second parameter value according to a preset rule; the second parameter value is greater than the first parameter value;
based on the second parameter value, one or more IP addresses are obtained by the cloud server manufacturer and added into the elastic IP pool;
and when one or more IP addresses exist in the elastic IP pool, aiming at any IP address, optionally selecting one standby server from the elastic server pool to be bound with the IP address, and using the bound standby server as a forwarding server for executing a forwarding task.
Optionally, the processing unit is specifically configured to:
determining that the number of available IP addresses is smaller than the second parameter value, and acquiring one or more IP addresses by the cloud server manufacturer and adding the IP addresses into the elastic IP pool; the number of available IP addresses is the sum of the number of IP addresses in the forwarding cluster that are being used to perform forwarding tasks and the number of IP addresses in the resilient IP pool.
Optionally, the processing unit is specifically configured to:
if the total bandwidth is determined to be smaller than a third preset threshold, modifying the quantity value of the IP addresses set in the configuration center from a first parameter value to a second parameter value according to a preset rule; the second parameter value is less than the first parameter value;
when the second parameter value is smaller than the number of the available IP addresses, for any one or more forwarding servers in the forwarding cluster, unbinding the forwarding servers from the IP addresses, and deleting the IP addresses until the number of the available IP addresses is equal to the second parameter value, so that the number of the forwarding servers used for executing the forwarding tasks in the forwarding cluster is reduced; the number of available IP addresses is based on a sum of the number of IP addresses in the forwarding cluster that are being used to perform forwarding tasks and the number of IP addresses in the resilient IP pool.
In a third aspect, an embodiment of the present invention further provides a computing device, including:
a memory for storing a computer program;
and the processor is used for calling the computer program stored in the memory and executing the traffic scheduling method for the forwarding server listed in any mode according to the obtained program.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a computer-executable program is stored in the computer-readable storage medium, and the computer-executable program is configured to cause a computer to execute a traffic scheduling method for a forwarding server, which is listed in any manner above.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic diagram of an application scenario provided in an embodiment of the present invention;
fig. 2 is a schematic diagram of a possible traffic scheduling method for a forwarding server according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a possible traffic scheduling method for a forwarding server according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating a possible system architecture according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a workflow of a server initialization module according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a workflow of an elastic IP initialization module according to an embodiment of the present invention;
fig. 7 is a schematic diagram of a workflow of a flow monitoring module according to an embodiment of the present invention;
fig. 8 is a schematic diagram of a workflow of a cluster total bandwidth monitoring module according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of a traffic scheduling apparatus for a forwarding server according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
To make the objects, embodiments and advantages of the present application clearer, the following description of exemplary embodiments of the present application will clearly and completely describe the exemplary embodiments of the present application with reference to the accompanying drawings in the exemplary embodiments of the present application, and it is to be understood that the described exemplary embodiments are only a part of the embodiments of the present application, and not all of the embodiments.
All other embodiments, which can be derived by a person skilled in the art from the exemplary embodiments described herein without inventive step, are intended to be within the scope of the claims appended hereto. In addition, while the disclosure herein has been presented in terms of one or more exemplary examples, it should be appreciated that aspects of the disclosure may be implemented solely as a complete embodiment.
It should be noted that the brief descriptions of the terms in the present application are only for the convenience of understanding the embodiments described below, and are not intended to limit the embodiments of the present application. These terms should be understood in their ordinary and customary meaning unless otherwise indicated.
The terms "first," "second," "third," and the like in the description and claims of this application and in the above-described drawings are used for distinguishing between similar or analogous objects or entities and are not necessarily intended to limit the order or sequence of any particular one, Unless otherwise indicated. It is to be understood that the terms so used are interchangeable under appropriate circumstances such that the embodiments described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein.
Furthermore, the terms "comprises" and "comprising," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a product or device that comprises a list of elements is not necessarily limited to those elements explicitly listed, but may include other elements not expressly listed or inherent to such product or device.
Taking the example that the user installs the monitoring camera at home, if the user is at home, the mobile terminal (mobile phone, computer, pad, etc.) of the user and the monitoring camera are connected to the same intranet at home, then the monitoring picture shot by the monitoring camera can be transmitted to the mobile terminal of the user through the intranet, and the P2P hole punching technology is a general technical scheme for realizing intranet penetration, and can effectively reduce the traffic communication cost. In some extreme network environments, for example, the network is poor or the user is not at home, the mobile terminal of the user cannot connect to the intranet in the home, and then the mobile terminal and the monitoring device are connected to different intranets, respectively, if one of the two networks is a symmetric network and the other one is a non-completely conical network, and the P2P is not perforated, then the streaming media needs to be forwarded through the public network by means of the forwarding server in the forwarding cluster.
Fig. 1 is an application scenario provided in an embodiment of the present invention. One or more forwarding servers are arranged in the forwarding cluster, each forwarding server is bound with an IP address, the monitoring camera transmits a shot monitoring picture to any IP address, the forwarding server corresponding to the IP address transmits the monitoring picture to a target mobile terminal, and a user can check the monitoring picture through the mobile terminal.
The types of servers provided by existing cloud server vendors are shown in table 1. The type 2 is that an enterprise purchases a server from a cloud server manufacturer, gives a gift of an IP address, charges according to the amount of the flow consumed by each server, and purchases the flow after the flow is used up. The cost of purchasing this type of server by a business is still high relative to type 3. The type 3 is that the server and the traffic are packaged and sold without being given an IP address, the traffic limit of the server is fixed, and after the traffic is used, the server needs to destroy (namely delete the virtual server). The cost of a business purchasing a type 3 server is relatively low.
TABLE 1
Figure BDA0003551490920000091
Figure BDA0003551490920000101
The existing mode for constructing the forwarding cluster based on the server of type 2 is that a system purchases a plurality of forwarding servers from a cloud server manufacturer, each forwarding server is bound with an IP address, and then purchases corresponding flow for each server. For example, the system purchases 5 forwarding servers each bound with a respective IP address from a cloud server manufacturer, and purchases 100G of traffic for each forwarding server to construct a forwarding cluster. It can be found that, since each forwarding server in the forwarding cluster is permanently bound to an IP address, flexible scheduling of the server and the IP address cannot be achieved, and the server and the IP address are permanently bound, after the traffic of the server is consumed, the server needs to purchase traffic again, and the price of the server is high, which is not favorable for enterprise cost control. In order to use a server of type 3 offered by a cloud server manufacturer, the embodiment of the invention provides a possible traffic scheduling method for a forwarding server, and by decoupling the server and an IP address, respective automatic scheduling of the server and the IP address is realized, so that the flexibility is improved, and the cost is reduced.
As shown in fig. 2, includes:
step 201, detecting a traffic consumption value when each forwarding server in the forwarding cluster executes a forwarding task based on the internet protocol IP address bound to each forwarding server.
In the embodiment of the invention, the system sets the number of the required IP addresses based on the forwarding task amount at each moment, and sets the number of the servers based on the forwarding task amount in a period of time. For example, the forwarding task amount of each minute in the past month is obtained, the maximum forwarding task amount of each minute is determined to be not more than 100, 5 forwarding servers can complete the forwarding task amount per minute, and then the number of the IP addresses set in the configuration center by the system is 5; and acquiring the total forwarding task amount in the past month, and determining that the traffic of 700G is needed to complete the forwarding task amount, wherein the system sets the number of servers with the traffic of 100G to be 7 in a configuration center, and two servers are used as standby servers. The above setting may also be performed by a user, and is not limited herein. And respectively purchasing a corresponding number of servers and IP addresses from a cloud server manufacturer based on the setting of the configuration center. For example, purchase 5 IP addresses, 7 servers. It can be seen that in the embodiment of the present invention, the servers and the IP addresses are purchased separately, and the number of the servers is not necessarily the same, and the extra servers are used as standby servers.
Optionally, a first preset threshold of the number of standby servers may also be set in the configuration center, and the servers are acquired based on the first preset threshold. For example, if the first preset threshold is 2, which means that the number of standby servers is 2, the number of purchased servers will be 2 more than the number of IP addresses as standby servers.
And (4) putting the purchased IP address into an elastic IP pool, and putting the server into the elastic server pool after initialization operation. The elastic IP pool is used for storing the IP addresses which are not bound; the elastic server pool is used for storing the servers which have finished the initialization operation and are not bound with the IP addresses. And binding any IP address in the elastic IP pool with any server in the elastic server pool until no IP address exists in the elastic IP pool. And then adding the bound server and the IP address as a forwarding server into the forwarding cluster for executing a forwarding task. The servers which are added out of the elastic server pool are used as standby servers, and the initialization process of the servers is complex and time-consuming, so that the number of the servers which are added out of the elastic server pool is larger than that of the IP addresses in the configuration center, and the servers which are added out of the elastic server pool are placed in the elastic server pool for standby. In the above example, 5 IP addresses and 5 servers are respectively bound to obtain 5 forwarding servers, and 2 standby servers exist in the elastic server pool.
Each forwarding server has a respective traffic value, and the traffic consumed in executing the forwarding task based on the respective bound IP address is detected. The traffic values of the forwarding servers may be the same or different, and are not limited herein. For example, a certain forwarding server has 100G traffic, and the traffic consumption value at the time of detection is 40G, that is, 40G has been consumed.
Step 202, for any forwarding server, when the traffic consumption value of the forwarding server meets the preset traffic threshold value of the forwarding server, unbundling the forwarding server and the IP address.
The preset traffic threshold may be a traffic value of the forwarding server, or may be any value smaller than the traffic value, for example, 100G or 90G, and when the traffic consumption value of the forwarding server is too large and exceeds the preset traffic threshold, it indicates that the forwarding server is no longer suitable for executing the forwarding task, so that the forwarding server is unbound to the IP address bound to the forwarding server.
The unbound forwarding server may be destroyed and is no longer used for executing the forwarding task, where the destruction refers to deleting the forwarding server in the forwarding cluster.
Step 203, binding the IP address with any standby server, and using the bound standby server as a forwarding server for executing a forwarding task; the standby server is a server which has completed initialization operation.
Because the standby server which has completed the initialization operation exists in the standby server pool, the IP address after being unbound can be directly bound with any standby server in the elastic server pool to obtain a new forwarding server, and the new forwarding server is added into the forwarding cluster to execute the subsequent forwarding task.
The flow consumption value of each forwarding server is detected, the fact that the flow consumption value of any forwarding server meets a preset flow threshold value can be timely found, and the fact that the flow consumption of the forwarding server is too high and is not suitable for continuous operation is indicated, therefore, the forwarding server and the corresponding IP address are unbound, the IP address is not destroyed, the IP address is bound with the standby server continuously, and the bound standby server is used for continuously executing the forwarding task. Since the standby server has completed the initialization operation, the binding process is less time consuming and the bound standby server can be quickly used to perform the forwarding task. The IP address is decoupled from the forwarding server, the IP address and the forwarding server can be flexibly and respectively scheduled automatically, the IP address is not updated in the whole process, and the IP address in the configuration file does not need to be changed. The speed and the accuracy of executing the forwarding task are further improved.
By the method provided by the embodiment of the invention, the cost advantage of the server of type 3 in the table 1 provided by a cloud server manufacturer can be effectively utilized, and enterprise cost control is facilitated. Meanwhile, the forwarding cluster can use not only the server of type 3, but also other types of servers, so that the types of the servers selectable by the forwarding cluster are expanded.
Optionally, after the IP address is unbound from the original forwarding server, the IP address may be placed in the elastic IP pool, and when it is detected that the IP address exists in the elastic IP pool, one standby server selected from the elastic server pool is bound with the IP address.
And putting the unbound IP address into an elastic IP pool, and when the IP address exists in the elastic IP pool, optionally binding a standby server and the IP address from the elastic server pool, so that the binding of the IP address and the standby server is simply and efficiently realized, the efficiency of executing a forwarding task by a forwarding cluster is improved, and manual participation is not needed.
After the IP address is bound to any backup server, the number of backup servers in the elastic server pool is reduced, so a method is designed to keep the number of backup servers in the elastic server pool unchanged, and then when the unbound IP address appears later, the backup server still exists in the elastic server pool and is bound with the backup server.
After binding the IP address with any standby server, the method further comprises the following steps:
deleting the bound standby server from the elastic server pool;
when the number of the standby servers in the elastic server pool is smaller than a first preset threshold value, one or more standby servers are obtained by a cloud server manufacturer and initialized, and the standby servers after the initialization are added into the elastic server pool, so that the number of the standby servers in the elastic server pool is equal to the first preset threshold value.
In the above example, the first preset threshold is set to 2 in the configuration center, i.e., the number of standby servers in the elastic server pool cannot be less than 2. Based on the setting of the configuration center, when a system purchases a server from a cloud server manufacturer, 2 standby servers can be purchased and put into the elastic server pool. So initially, there are 2 standby servers in the elastic server pool, and the first preset threshold is 2. And if the flow consumption value of one forwarding server in the forwarding cluster meets a preset flow threshold value, unbinding the forwarding server from the IP address, and binding the unbound IP address with any standby server in the elastic server pool to be used as the forwarding server. And then, reducing the number of the standby servers in the elastic server pool to 1, and if the number of the standby servers is detected to be smaller than a first preset threshold value, purchasing 1 standby server by a cloud server manufacturer and carrying out initialization operation, and adding the standby servers after the initialization operation into the elastic server pool. Up to this point, there can still be 2 standby servers in the pool of elastic servers.
Because one or more standby servers exist in the previous step and are bound with the IP address to execute the forwarding task. The number of standby servers in the pool of resilient servers is less than a first predetermined threshold. In order to continuously and quickly realize the subsequent binding of the IP address and the standby server, the system automatically acquires the standby server through a cloud server manufacturer, initializes the standby server and then adds the standby server into the elastic server pool, so that the subsequent quick binding of the IP address and the standby server is realized, and a new forwarding server is quickly generated.
Optionally, the method provided in the embodiment of the present invention may be used to implement respective scheduling of the server and the IP address according to traffic consumption of the forwarding server, monitor the total bandwidth of the forwarding cluster, and implement the expansion and contraction of the forwarding cluster based on the monitored value.
Comprising the following steps, as shown in fig. 3:
step 301, detecting the total bandwidth of each forwarding server in the forwarding cluster.
Step 302, if the total bandwidth deviates from a preset interval, modifying the quantity value of the IP address set in the configuration center from a first parameter value to a second parameter value according to a preset rule; the first parameter value is the number of corresponding IP addresses when the total bandwidth of the forwarding cluster is in the preset interval.
The quantity values of the IP addresses of the initial preset interval and the configuration center are determined according to the task quantity of each forwarding task required by the forwarding cluster. For example, it is determined that the task amount of the forwarding cluster can be completed by 5 forwarding servers (i.e., 5 IP addresses), the total bandwidth that can be carried is up to 100Mbps, the initial preset interval may be set to 80 to 90Mbps, and the first parameter value is 5. The total bandwidth is larger and larger along with the gradual increase of the task amount, and when the total bandwidth exceeds 90Mbps or is less than 80Mbps, the first parameter value is modified into the second parameter value. Correspondingly, the preset interval is updated, and if the second parameter value is larger than the first parameter value, the upper limit of the preset interval is increased; if the second parameter value is smaller than the first parameter value, the upper limit of the preset interval is adjusted to be lower. For example, if the second parameter value is 7, the preset interval is updated to 100-120 Mbps; if the second parameter value is 3, the preset interval is updated to 60-80 Mbps. And enabling the modified second parameter value to be the first parameter value and corresponding to the updated preset interval. For example, the first parameter value is changed to 7, and the preset interval is updated to 100-120Mbps, then the first parameter value 7 is modified after the next time that the total bandwidth deviates from the preset interval is detected. And the process is circulated.
And step 303, updating the number of forwarding servers in the forwarding cluster for executing the forwarding task based on the second parameter value.
If the total bandwidth is too high and is higher than the preset interval, it indicates that the current forwarding requirement is too dense, and the number of the current forwarding servers in the forwarding cluster is not enough to bear the current forwarding requirement. There is therefore a need for capacity expansion of forwarding clusters. If the total bandwidth is too low and is lower than the preset interval, the current forwarding requirement is less, and the current forwarding server is idle, so that the capacity of the forwarding cluster can be reduced.
Therefore, the deviation of the total bandwidth from the preset interval which can be borne by the forwarding cluster at present can be found in time, and the numerical value of the IP address set by the configuration center is automatically modified, so that the capacity expansion and the capacity reduction of the forwarding cluster can be effectively realized in time, and the problems of slow operation of the cluster or other faults are avoided.
Example one
If the total bandwidth is determined to be larger than a second preset threshold value, modifying the quantity value of the IP addresses set in the configuration center from a first parameter value to a second parameter value according to a preset rule; the second parameter value is greater than the first parameter value. Based on the second parameter value, one or more IP addresses are obtained by the cloud server manufacturer and added into the elastic IP pool; and when one or more IP addresses exist in the elastic IP pool, aiming at any IP address, optionally selecting one standby server from the elastic server pool to bind with the IP address, and using the bound standby server as a forwarding server for executing a forwarding task.
Based on the second parameter value, one or more IP addresses acquired by the cloud server manufacturer are added into the elastic IP pool, and the method comprises the following steps:
determining that the number of available IP addresses is smaller than the second parameter value, and acquiring one or more IP addresses by the cloud server manufacturer and adding the IP addresses into the elastic IP pool; the number of available IP addresses is the sum of the number of IP addresses in the forwarding cluster that are being used to perform forwarding tasks and the number of IP addresses in the resilient IP pool.
In fact, the number of available IP addresses is determined according to the first parameter value of the configuration center, and based on the first parameter value of the configuration center, the system purchases a corresponding number of IP addresses by the cloud server manufacturer, and the IP addresses are used for binding with the server and adding to the forwarding cluster, and when the traffic consumption value of the forwarding server meets the preset traffic threshold, the unbound IP addresses are added to the elastic IP pool. The sum of the number of IP addresses being used to perform the forwarding task and the number of IP addresses in the resilient IP pool is equal to the first parameter value.
For example, if the first parameter value of the number of IP addresses set in the configuration center is 5, then it can be known from the previous steps that there are 5 IP addresses in the forwarding cluster available for forwarding. When the total bandwidth is greater than the second preset threshold, the parameter value is modified according to a preset rule, for example, 1 is added to the first parameter value each time or 2 is added to the first parameter value each time, which is not limited to this. For example, the second parameter value is modified to 7. The number of available IP addresses is the sum of the number of IP addresses in the forwarding cluster that are being used to perform forwarding tasks and the number of IP addresses in the resilient IP pool. In this example, the number of available IP addresses is 5, and the second parameter value is 2 greater than the number of available IP addresses, so 2 IP addresses are purchased from the cloud server vendor to join the elastic IP pool. And binding any IP address in the elastic IP pool with a standby server in the elastic server pool, and adding the bound IP address as a forwarding server into the forwarding cluster. The number of forwarding servers in the forwarding cluster becomes 7, thereby realizing capacity expansion.
Optionally, a first preset threshold of the standby servers is set in the configuration center, and based on the first preset threshold, a corresponding number of standby servers are purchased from a cloud server manufacturer. For example, if the first preset threshold is 2, in the above method, 2 backup servers are used to bind with the newly added 2 IP addresses, so that the number of the backup servers in the elastic server pool is smaller than the first preset threshold, and the cloud server manufacturer can obtain 2 backup servers again.
If the total bandwidth is too high and exceeds a second preset threshold value which can be borne by the forwarding cluster at present, the first parameter value is modified into a second parameter value with a larger value, and the corresponding number of IP addresses are automatically obtained by a cloud server manufacturer and added into the elastic IP pool, so that the IP addresses are increased. The increased IP address is bound with the standby server, so that the increase of the forwarding server is realized, and the capacity expansion can be automatically, timely and efficiently carried out.
Example two
If the total bandwidth is determined to be smaller than a third preset threshold, modifying the quantity value of the IP addresses set in the configuration center from a first parameter value to a second parameter value according to a preset rule; the second parameter value is less than the first parameter value; when the second parameter value is smaller than the number of the available IP addresses, for any one or more forwarding servers in the forwarding cluster, unbinding the forwarding servers from the IP addresses, and deleting the IP addresses until the number of the available IP addresses is equal to the second parameter value, so that the number of the forwarding servers used for executing the forwarding tasks in the forwarding cluster is reduced; the number of available IP addresses is based on a sum of the number of IP addresses in the forwarding cluster that are being used to perform forwarding tasks and the number of IP addresses in the resilient IP pool.
For example, when the total bandwidth is smaller than a third preset threshold, the first parameter value set in the configuration center is modified to a smaller second parameter value, for example, from 5 to 3. The second parameter value is smaller than the number of available IP addresses, and the difference value between the second parameter value and the available IP addresses is 2, so that 2 forwarding servers in the forwarding cluster are unbound with the IP addresses, and the unbound IP addresses are recycled, wherein the recycling refers to deleting the IP addresses. As the IP addresses decrease, the number of forwarding servers in the forwarding cluster becomes 3.
Optionally, the unbound servers may also be deleted.
Optionally, when it is determined that the second parameter value is smaller than the number of available IP addresses, the forwarding servers and the IP addresses in the forwarding cluster are not immediately unbound, and the unbinding is performed after the traffic consumption value of any one forwarding server in the forwarding cluster meets the preset traffic threshold, and then the unbound IP addresses are deleted.
If the total bandwidth is too low and is lower than a third preset threshold value which can be currently carried by the forwarding cluster, resources and cost are wasted due to too many forwarding servers. Automatically modifying the first parameter value to a second parameter value of smaller value. Then, when the second parameter value is smaller than the number of available IP addresses, the forwarding server is unbound from the IP addresses for any one or more forwarding servers in the forwarding cluster, and the IP addresses are deleted until the number of available IP addresses is equal to the second parameter value, thereby reducing the number of forwarding servers in the forwarding cluster for performing forwarding tasks. Therefore, the capacity can be automatically, timely and efficiently reduced.
Fig. 4 is a schematic diagram of a possible system architecture provided by an embodiment of the present invention, which includes a configuration center, an initialization center, a resource center, and a scheduling center.
The configuration center is responsible for the configuration information management of the initialization center, the resource center and the scheduling center. The user can set the number value of IP addresses, the number value of servers, the number value of standby servers (first preset threshold above) in the configuration center.
The initialization center is responsible for interfacing with an Application Programming Interface (API) of a cloud server manufacturer and initializing corresponding resources according to the setting of the configuration center. The initialization center comprises a server initialization module and an IP address initialization module. The server initialization module is used for initializing a corresponding number of servers to the elastic server pool based on the number value of the servers of the configuration center and/or the number value of the standby servers, and regularly checking the number of the standby servers in the elastic server pool. The IP address initialization module is used for initializing a corresponding number of IP addresses to the elastic IP pool based on the number value of the IP addresses of the configuration center, and regularly checking the number of the IP addresses which are not bound in the elastic IP pool.
For example, the user sets the number value of the IP address to 5, the number value of the server to 7, and the number value of the standby server to 2 in the configuration center, the number values of the servers including the number value of the standby server. The server initialization module reads the number value of the servers of the configuration center and the number value of the standby servers, purchases 7 servers through an API (application program interface) of a cloud server manufacturer, initializes the 7 servers and then places the servers into an elastic server pool; the IP address initialization module reads the quantity value of the IP addresses of the configuration center, purchases 5 IP addresses through an API (application program interface) of a cloud server manufacturer, initializes the 5 IP addresses and then puts the initialized 5 IP addresses into the elastic IP pool.
The resource center is responsible for maintaining the pool of elastic servers and the pool of elastic IPs.
The scheduling center is responsible for maintaining forwarding cluster availability. The dispatching center comprises a binding module, a unbinding module, a flow monitoring module, a cluster total bandwidth monitoring module and a server destroying module.
The binding module is used for binding the IP address in the elastic IP pool with the server in the elastic server pool and adding the bound IP address into the forwarding cluster; the unbinding module is used for unbinding the forwarding server and the IP address in the forwarding cluster and moving out of the forwarding cluster; the flow monitoring module is used for detecting the flow consumption condition when each forwarding server in the forwarding cluster executes the forwarding task based on the respective bound IP address; the cluster total bandwidth monitoring module is used for detecting the total bandwidth of the forwarding cluster, and modifying the quantity value of the IP address of the configuration center and the quantity value of the server after the total bandwidth deviates from a preset interval, so that capacity expansion and capacity reduction are realized.
The functions of the modules and the interaction between the modules are described below by specific embodiments.
Fig. 5 is a schematic diagram illustrating a workflow of a server initialization module according to an embodiment of the present invention. The server initialization module reads the quantity value of the servers in the configuration center and the quantity value (a first preset threshold value) of the standby servers, and initializes the servers in corresponding quantity to join the elastic server pool according to the quantity value of the servers. For example, the number of servers is 7, the number of standby servers is 2, and 7 servers are added to the elastic server pool, wherein 2 servers are standby servers.
And regularly detecting whether the number of the standby servers in the elastic server pool is smaller than a first preset threshold, if so, calling an API (application program interface) of a cloud server manufacturer, initializing the servers with the corresponding number and adding the initialized servers into the elastic server pool. If the current time is not less than the first preset threshold, the standby server is not bound, and the detection is continued. Thus, the number of standby servers in the elastic server pool can be guaranteed to be always equal to the first preset threshold value.
Fig. 6 illustrates a schematic workflow diagram of an elastic IP initialization module according to an embodiment of the present invention.
And the elastic IP initialization module reads the quantity value of the IP addresses of the configuration center and initializes the corresponding quantity of IP addresses to the elastic IP pool through the API of the cloud server manufacturer according to the quantity value of the IP addresses. For example, 5 IP addresses are initialized to the resilient IP pool.
And regularly detecting whether the number of the available IP addresses is smaller than the number value of the IP addresses of the configuration center or not, wherein the number value of the IP addresses of the configuration center may be modified to be a larger second parameter value from a first parameter value by the cluster total bandwidth monitoring module, so that the number of the available IP addresses is smaller than the number value of the IP addresses of the configuration center, and if so, initializing the corresponding number of the IP addresses to the elastic IP pool. If not, continuously detecting whether the IP addresses to be bound exist in the elastic IP pool, if so, calling a binding module, binding the IP addresses with any standby server, adding the IP addresses into the forwarding cluster, and then returning to detect the number of the available IP addresses; if not, the number of the available IP addresses is detected in a return mode. And the IP address to be bound appears in the elastic IP pool under two conditions, namely, the forwarding server with the flow consumption value meeting the preset flow threshold value in the forwarding cluster is unbound with the IP address, the unbound IP address is added into the elastic IP pool, and the IP address obtained by the cloud server manufacturer is added into the elastic IP pool according to the larger second parameter value modified by the configuration center.
Fig. 7 is a schematic workflow diagram illustrating a flow monitoring module according to an embodiment of the present invention.
The flow monitoring module detects flow consumption values of all forwarding servers in the forwarding cluster at regular time, and judges whether the flow consumption values are larger than a preset flow threshold value or not for any forwarding server, wherein the preset flow threshold value is a flow package value for purchasing the server, if yes, the unbinding module is called to unbind the forwarding server and the IP address, and the unbound IP address is recovered to the elastic IP pool. And calling a server destruction module to delete the unbound server. And calling the binding module to bind the IP address with any standby server in the elastic server pool and add the IP address into the forwarding cluster. The server initialization module detects that one standby server is less in the elastic server pool (namely the number of the standby servers is smaller than a first preset threshold), acquires new server initialization through a cloud server manufacturer API, and then adds the new server initialization into the elastic server pool as the standby server. And returning to the step of detecting the traffic consumption value of each forwarding server. And if the flow consumption value is not larger than the preset flow threshold value, returning to the step of detecting the flow consumption value of each forwarding server.
The flow consumption value of each forwarding server is detected, the fact that the flow consumption value of any forwarding server meets a preset flow threshold value can be timely found, and the fact that the flow consumption of the forwarding server is too high and is not suitable for continuous operation is indicated, therefore, the forwarding server and the corresponding IP address are unbound, the IP address is not destroyed, the IP address is bound with the standby server continuously, and the bound standby server is used for continuously executing the forwarding task. Since the standby server has completed the initialization operation, the binding process is less time consuming and the bound standby server can be quickly used to perform the forwarding task. The IP address is decoupled from the forwarding server, the IP address and the forwarding server can be flexibly and respectively scheduled automatically, the IP address is not updated in the whole process, and the IP address in the configuration file does not need to be changed. The speed and the accuracy of executing the forwarding task are further improved.
Fig. 8 is a schematic workflow diagram illustrating a cluster total bandwidth monitoring module according to an embodiment of the present invention.
And the cluster total bandwidth monitoring module detects the total bandwidth of the forwarding cluster at regular time, judges whether the total bandwidth is greater than a second preset threshold value, and if so, increases the quantity value of the IP address of the configuration center and sends an alarm to inform relevant personnel. Calling an IP address initialization module to re-read the quantity value of the IP address of the configuration center (entering the step of fig. 6, it is found that the quantity of the available IP address is less than the quantity value of the IP address of the configuration center, so that the IP address is purchased through the cloud server vendor API and added to the flexible IP pool, thereby implementing the extension of the forwarding cluster). And returning to the step of detecting the total bandwidth of the forwarding cluster at regular time. If not, judging whether the IP address is smaller than a third preset threshold, if so, reducing the quantity value of the IP address of the configuration center, and sending an alarm to inform relevant personnel. Calling an IP address initialization module to re-read the quantity value of the IP addresses of the configuration center, and finding that the quantity of the available IP addresses is greater than the quantity value of the IP addresses of the configuration center, so that after the unbound IP addresses appear in the elastic IP pool, deleting the IP addresses, and realizing the capacity reduction of the forwarding cluster. And if the total bandwidth is not less than the third preset threshold, returning to the step of detecting the total bandwidth of the forwarding cluster at regular time.
The total bandwidth of each forwarding server in the forwarding cluster is detected at regular time, the deviation of the total bandwidth from the preset interval which can be borne by the forwarding cluster at present is found in time, and then the numerical value of the IP address set by the configuration center is automatically modified, so that the capacity expansion and the capacity reduction of the forwarding cluster can be effectively realized in time, and the problems of slow operation of the cluster or other faults are avoided.
Based on the same technical concept, fig. 9 exemplarily shows a structure of a traffic scheduling apparatus for a forwarding server according to an embodiment of the present invention, where the structure can perform a flow of traffic scheduling for the forwarding server.
As shown in fig. 9, the apparatus specifically includes:
a detecting unit 901, configured to detect a traffic consumption value when each forwarding server in the forwarding cluster executes a forwarding task based on a respective bound IP address;
a processing unit 902 for:
for any forwarding server, when the traffic consumption value of the forwarding server meets a preset traffic threshold value of the forwarding server, unbinding the forwarding server from the IP address;
binding the IP address with any standby server, and using the bound standby server as a forwarding server for executing a forwarding task; the standby server is a server which has completed initialization operation.
The flow consumption value of each forwarding server is detected, the fact that the flow consumption value of any forwarding server meets a preset flow threshold value can be timely found, and the fact that the flow consumption of the forwarding server is too high and is not suitable for continuous operation is indicated, therefore, the forwarding server and the corresponding IP address are unbound, the IP address is not destroyed, the IP address is bound with the standby server continuously, and the bound standby server is used for continuously executing the forwarding task. Since the standby server has completed the initialization operation, the binding process is less time consuming and the bound standby server can be quickly used to perform the forwarding task. The IP address is decoupled from the forwarding server, the IP address and the forwarding server can be flexibly and respectively scheduled automatically, the IP address is not updated in the whole process, and the IP address in the configuration file does not need to be changed. The speed and the accuracy of executing the forwarding task are further improved.
Optionally, the processing unit 902 is specifically configured to:
putting the IP address into an elastic IP pool; the elastic IP pool is used for storing the IP addresses which are not bound;
when the IP address exists in the elastic IP pool, one standby server is selected from the elastic server pool to be bound with the IP address; the elastic server pool is used for storing the servers which have finished initialization operation and are not bound with the IP addresses.
Optionally, the processing unit 902 is further configured to:
deleting the bound standby server from the elastic server pool;
when the number of the standby servers in the elastic server pool is smaller than a first preset threshold value, one or more standby servers are obtained through a cloud server manufacturer and initialized, and the standby servers after the initialization are added into the elastic server pool, so that the number of the standby servers in the elastic server pool is equal to the first preset threshold value.
Optionally, the detecting unit 901 is further configured to:
detecting the total bandwidth of each forwarding server in the forwarding cluster;
the processing unit 902 is further configured to:
if the total bandwidth deviates from the preset interval, modifying the quantity value of the IP address set in the configuration center from a first parameter value to a second parameter value according to a preset rule; the first parameter value is the number of corresponding IP addresses when the total bandwidth of the forwarding cluster is in the preset interval;
updating the number of forwarding servers in the forwarding cluster for performing forwarding tasks based on the second parameter value.
Optionally, the processing unit 902 is specifically configured to:
if the total bandwidth is determined to be larger than a second preset threshold value, modifying the quantity value of the IP addresses set in the configuration center from a first parameter value to a second parameter value according to a preset rule; the second parameter value is greater than the first parameter value;
based on the second parameter value, one or more IP addresses are obtained by the cloud server manufacturer and added into the elastic IP pool;
and when one or more IP addresses exist in the elastic IP pool, aiming at any IP address, optionally selecting one standby server from the elastic server pool to be bound with the IP address, and using the bound standby server as a forwarding server for executing a forwarding task.
Optionally, the processing unit 902 is specifically configured to:
determining that the number of available IP addresses is smaller than the second parameter value, and acquiring one or more IP addresses by the cloud server manufacturer and adding the IP addresses into the elastic IP pool; the number of available IP addresses is the sum of the number of IP addresses in the forwarding cluster that are being used to perform forwarding tasks and the number of IP addresses in the resilient IP pool.
Optionally, the processing unit 902 is specifically configured to:
if the total bandwidth is smaller than a third preset threshold value, modifying the quantity value of the IP addresses set in the configuration center from a first parameter value to a second parameter value according to a preset rule; the second parameter value is less than the first parameter value;
when the second parameter value is smaller than the number of the available IP addresses, for any one or more forwarding servers in the forwarding cluster, unbinding the forwarding servers from the IP addresses, and deleting the IP addresses until the number of the available IP addresses is equal to the second parameter value, so that the number of the forwarding servers used for executing the forwarding tasks in the forwarding cluster is reduced; the number of available IP addresses is based on a sum of the number of IP addresses in the forwarding cluster that are being used to perform forwarding tasks and the number of IP addresses in the resilient IP pool.
Based on the same technical concept, the embodiment of the present application provides a computer device, as shown in fig. 10, including at least one processor 1001 and a memory 1002 connected to the at least one processor, where a specific connection medium between the processor 1001 and the memory 1002 is not limited in the embodiment of the present application, and the processor 1001 and the memory 1002 in fig. 10 are connected through a bus as an example. The bus may be divided into an address bus, a data bus, a control bus, etc.
In this embodiment of the application, the memory 1002 stores instructions executable by the at least one processor 1001, and the at least one processor 1001 may execute the steps of the traffic scheduling method for the forwarding server by executing the instructions stored in the memory 1002.
The processor 1001 is a control center of the computer device, and can connect various parts of the computer device by using various interfaces and lines, and perform traffic scheduling for the forwarding server by executing or executing instructions stored in the memory 1002 and calling data stored in the memory 1002. Alternatively, the processor 1001 may include one or more processing units, and the processor 1001 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, an application program, and the like, and the modem processor mainly processes wireless communication. It will be appreciated that the modem processor described above may not be integrated into the processor 1001. In some embodiments, the processor 1001 and the memory 1002 may be implemented on the same chip, or in some embodiments, they may be implemented separately on separate chips.
The processor 1001 may be a general-purpose processor, such as a Central Processing Unit (CPU), a digital signal processor, an Application Specific Integrated Circuit (ASIC), a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof, and may implement or perform the methods, steps, and logic blocks disclosed in the embodiments of the present Application. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or may be implemented by a combination of hardware and software modules in a processor.
Memory 1002, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The Memory 1002 may include at least one type of storage medium, which may include, for example, a flash Memory, a hard disk, a multimedia card, a card-type Memory, a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Programmable Read Only Memory (PROM), a Read Only Memory (ROM), a charged Erasable Programmable Read Only Memory (EEPROM), a magnetic Memory, a magnetic disk, an optical disk, and the like. The memory 1002 is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 1002 in the embodiments of the present application may also be circuitry or any other device capable of performing a storage function for storing program instructions and/or data.
Based on the same technical concept, an embodiment of the present invention further provides a computer-readable storage medium, where a computer-executable program is stored, where the computer-executable program is configured to enable a computer to execute the method for traffic scheduling for a forwarding server listed in any of the above manners.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (10)

1. A traffic scheduling method for a forwarding server, comprising:
detecting a flow consumption value when each forwarding server in the forwarding cluster executes a forwarding task based on the IP address of the internet interconnection protocol bound to each forwarding server;
for any forwarding server, when the traffic consumption value of the forwarding server meets a preset traffic threshold value of the forwarding server, unbinding the forwarding server from the IP address;
binding the IP address with any standby server, and using the bound standby server as a forwarding server for executing a forwarding task; the standby server is a server which has completed initialization operation.
2. The method of claim 1, wherein binding the IP address with any backup server comprises:
putting the IP address into an elastic IP pool; the elastic IP pool is used for storing the IP addresses which are not bound;
when the IP address exists in the elastic IP pool, any one standby server in the elastic server pool is bound with the IP address; the elastic server pool is used for storing the servers which have finished initialization operation and are not bound with the IP addresses.
3. The method of claim 1, wherein after binding the IP address with any standby server, further comprising:
deleting the bound standby server from the elastic server pool;
when the number of the standby servers in the elastic server pool is smaller than a first preset threshold value, one or more standby servers are obtained through a cloud server manufacturer and initialized, and the standby servers after the initialization are added into the elastic server pool, so that the number of the standby servers in the elastic server pool is equal to the first preset threshold value.
4. The method of any one of claims 1-3, further comprising:
detecting the total bandwidth of each forwarding server in the forwarding cluster;
if the total bandwidth deviates from the preset interval, modifying the quantity value of the IP address set in the configuration center from a first parameter value to a second parameter value according to a preset rule; the first parameter value is the number of corresponding IP addresses when the total bandwidth of the forwarding cluster is in the preset interval;
updating the number of forwarding servers in the forwarding cluster for performing forwarding tasks based on the second parameter value.
5. The method of claim 4, wherein modifying the quantity value of the IP addresses set in the configuration center from a first parameter value to a second parameter value according to a preset rule if it is determined that the total bandwidth deviates from a preset interval comprises:
if the total bandwidth is determined to be larger than a second preset threshold value, modifying the quantity value of the IP addresses set in the configuration center from a first parameter value to a second parameter value according to a preset rule; the second parameter value is greater than the first parameter value;
updating the number of forwarding servers in the forwarding cluster for performing forwarding tasks based on the second parameter value, including:
based on the second parameter value, one or more IP addresses are obtained by the cloud server manufacturer and added into the elastic IP pool;
and when one or more IP addresses exist in the elastic IP pool, aiming at any IP address, optionally selecting one standby server from the elastic server pool to be bound with the IP address, and using the bound standby server as a forwarding server for executing a forwarding task.
6. The method of claim 5, wherein obtaining, by the cloud server vendor, one or more IP addresses to add to the elastic IP pool based on the second parameter value comprises:
determining that the number of available IP addresses is smaller than the second parameter value, and acquiring one or more IP addresses by the cloud server manufacturer and adding the IP addresses into the elastic IP pool; the number of available IP addresses is the sum of the number of IP addresses in the forwarding cluster that are being used to perform forwarding tasks and the number of IP addresses in the resilient IP pool.
7. The method of claim 4, wherein modifying the quantity value of the IP addresses set in the configuration center from a first parameter value to a second parameter value according to a preset rule if it is determined that the total bandwidth deviates from a preset interval comprises:
if the total bandwidth is smaller than a third preset threshold value, modifying the quantity value of the IP addresses set in the configuration center from a first parameter value to a second parameter value according to a preset rule; the second parameter value is less than the first parameter value;
updating the number of forwarding servers in the forwarding cluster for performing forwarding tasks based on the second parameter value, including:
when the second parameter value is smaller than the number of the available IP addresses, for any one or more forwarding servers in the forwarding cluster, unbinding the forwarding servers from the IP addresses, and deleting the IP addresses until the number of the available IP addresses is equal to the second parameter value, so that the number of the forwarding servers used for executing the forwarding tasks in the forwarding cluster is reduced; the number of available IP addresses is based on the sum of the number of IP addresses in the forwarding cluster that are being used to perform forwarding tasks and the number of IP addresses in the resilient IP pool.
8. A traffic scheduling apparatus for a forwarding server, comprising:
the detection unit is used for detecting the flow consumption value when each forwarding server in the forwarding cluster executes the forwarding task based on the IP address of the internet interconnection protocol bound to each forwarding server;
a processing unit to:
for any forwarding server, when the traffic consumption value of the forwarding server meets a preset traffic threshold value of the forwarding server, unbinding the forwarding server from the IP address;
binding the IP address with any standby server, and using the bound standby server as a forwarding server for executing a forwarding task; the standby server is a server which completes initialization operation.
9. A computing device, comprising:
a memory for storing a computer program;
a processor for calling a computer program stored in said memory, for executing the method of any one of claims 1 to 7 in accordance with the obtained program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer-executable program for causing a computer to execute the method of any one of claims 1 to 7.
CN202210265259.3A 2022-03-17 2022-03-17 Traffic scheduling method and device for forwarding server Active CN114710443B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210265259.3A CN114710443B (en) 2022-03-17 2022-03-17 Traffic scheduling method and device for forwarding server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210265259.3A CN114710443B (en) 2022-03-17 2022-03-17 Traffic scheduling method and device for forwarding server

Publications (2)

Publication Number Publication Date
CN114710443A true CN114710443A (en) 2022-07-05
CN114710443B CN114710443B (en) 2024-03-19

Family

ID=82168888

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210265259.3A Active CN114710443B (en) 2022-03-17 2022-03-17 Traffic scheduling method and device for forwarding server

Country Status (1)

Country Link
CN (1) CN114710443B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102487342A (en) * 2010-12-03 2012-06-06 阿里巴巴集团控股有限公司 Device and method for controlling virtual internet protocol address binding
CN102638583A (en) * 2012-04-20 2012-08-15 浪潮电子信息产业股份有限公司 Method for realizing file distributing transmission
US8359376B1 (en) * 2010-04-20 2013-01-22 Hewlett-Packard Development Company, L.P. Proactive sending of an IP-to-MAC address binding for a high fan-in node
US20170195220A1 (en) * 2015-12-30 2017-07-06 Juniper Networks, Inc. Media access control address and internet protocol address binding proxy advertisement for network devices of a network
CN110278288A (en) * 2019-05-17 2019-09-24 平安科技(深圳)有限公司 Method, apparatus, computer equipment and the storage medium of pre-dispensed vessels IP
CN111212134A (en) * 2019-12-31 2020-05-29 北京金山云网络技术有限公司 Request message processing method and device, edge computing system and electronic equipment
CN111262960A (en) * 2020-01-15 2020-06-09 山东汇贸电子口岸有限公司 Public cloud elastic public network IP cluster implementation method and system
CN111585896A (en) * 2020-03-30 2020-08-25 华为技术有限公司 Data forwarding method and device and readable storage medium
CN111628906A (en) * 2020-05-11 2020-09-04 紫光云技术有限公司 Method for carrying out flow statistics and monitoring on IP of bullet-supplying public network
CN112532687A (en) * 2020-11-03 2021-03-19 杭州朗澈科技有限公司 Method and system for capacity expansion of kubernets load balancer
CN112671597A (en) * 2020-11-25 2021-04-16 紫光云技术有限公司 Method for carrying out sectional statistics on internal and external flows of elastic public network IP in shared bandwidth
CN112968802A (en) * 2021-02-25 2021-06-15 紫光云技术有限公司 Universal method for managing IP state and relation of elastic public network

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8359376B1 (en) * 2010-04-20 2013-01-22 Hewlett-Packard Development Company, L.P. Proactive sending of an IP-to-MAC address binding for a high fan-in node
CN102487342A (en) * 2010-12-03 2012-06-06 阿里巴巴集团控股有限公司 Device and method for controlling virtual internet protocol address binding
CN102638583A (en) * 2012-04-20 2012-08-15 浪潮电子信息产业股份有限公司 Method for realizing file distributing transmission
US20170195220A1 (en) * 2015-12-30 2017-07-06 Juniper Networks, Inc. Media access control address and internet protocol address binding proxy advertisement for network devices of a network
CN110278288A (en) * 2019-05-17 2019-09-24 平安科技(深圳)有限公司 Method, apparatus, computer equipment and the storage medium of pre-dispensed vessels IP
CN111212134A (en) * 2019-12-31 2020-05-29 北京金山云网络技术有限公司 Request message processing method and device, edge computing system and electronic equipment
CN111262960A (en) * 2020-01-15 2020-06-09 山东汇贸电子口岸有限公司 Public cloud elastic public network IP cluster implementation method and system
CN111585896A (en) * 2020-03-30 2020-08-25 华为技术有限公司 Data forwarding method and device and readable storage medium
CN111628906A (en) * 2020-05-11 2020-09-04 紫光云技术有限公司 Method for carrying out flow statistics and monitoring on IP of bullet-supplying public network
CN112532687A (en) * 2020-11-03 2021-03-19 杭州朗澈科技有限公司 Method and system for capacity expansion of kubernets load balancer
CN112671597A (en) * 2020-11-25 2021-04-16 紫光云技术有限公司 Method for carrying out sectional statistics on internal and external flows of elastic public network IP in shared bandwidth
CN112968802A (en) * 2021-02-25 2021-06-15 紫光云技术有限公司 Universal method for managing IP state and relation of elastic public network

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
A.W. BERGER等: "Dimensioning bandwidth for elastic traffic in high-speed data networks", IEEE/ACM TRANSACTIONS ON NETWORKING *
巩佳玉;: "关于数字电视IP网络认证计费方式的探讨", 黑龙江科技信息, no. 17 *
贾泰红;: "网点前置系统的省域集中", 金融电子化, no. 03 *

Also Published As

Publication number Publication date
CN114710443B (en) 2024-03-19

Similar Documents

Publication Publication Date Title
CN108683516B (en) Application instance upgrading method, device and system
CN108881495B (en) Resource allocation method, device, computer equipment and storage medium
US11188561B2 (en) Prioritizing microservices on a container platform for a restore operation
CN111143133B (en) Virtual machine backup method and backup virtual machine recovery method
CN111163130A (en) Network service system and data transmission method thereof
CN110222535A (en) Processing unit, method and the storage medium of block chain configuration file
CN104573497A (en) Processing method and device for starting items
CN104850394A (en) Management method of distributed application program and distributed system
CN110955523A (en) Service processing method and device
CN115297124A (en) System operation and maintenance management method and device and electronic equipment
US20160011904A1 (en) Intelligent application back stack management
CN115469813A (en) Data processing method and device, storage medium and electronic device
CN104572197A (en) Processing method and device for starting items
CN114710443A (en) Traffic scheduling method and device for forwarding server
CN109522177A (en) A kind of task daily record processing system, method and device
CN113127258A (en) Data backup method, device, equipment and medium
CN111124631A (en) Task processing method and device based on block chain network
CN109936462B (en) Disaster recovery method and device
CN116089040A (en) Service flow scheduling method and device, electronic equipment and storage medium
CN115291891A (en) Cluster management method and device and electronic equipment
CN110704382B (en) File deployment method, device, server and storage medium
CN114371954A (en) Automatic recovery method of micro-service system
WO2021102849A1 (en) Resource acquisition method and apparatus, and electronic device
CN107168685B (en) Method and device for updating script and computer terminal
EP2975516B1 (en) Intelligent application back stack management

Legal Events

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