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

Traffic scheduling method and device for forwarding server Download PDF

Info

Publication number
CN114710443B
CN114710443B CN202210265259.3A CN202210265259A CN114710443B CN 114710443 B CN114710443 B CN 114710443B CN 202210265259 A CN202210265259 A CN 202210265259A CN 114710443 B CN114710443 B CN 114710443B
Authority
CN
China
Prior art keywords
forwarding
server
addresses
elastic
pool
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210265259.3A
Other languages
Chinese (zh)
Other versions
CN114710443A (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

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 flow consumption values when each forwarding server in the forwarding cluster executes forwarding tasks based on the respectively bound Internet Protocol (IP) addresses; for any forwarding server, unbinding the forwarding server from the IP address when the flow consumption value of the forwarding server meets the preset flow threshold of the forwarding server; binding the IP address with any standby server, and using the bound standby server as a forwarding server to execute forwarding tasks. Since the standby server has completed the initialization operation, the bound standby server can be quickly used to perform forwarding tasks. The IP address and the forwarding server can be respectively and flexibly scheduled automatically, the whole process has no update of the IP address, 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
The embodiment of the invention relates to the technical field of flow scheduling, in particular to a flow scheduling method, a flow scheduling device, a flow scheduling computing device and a flow scheduling computer readable storage medium for a forwarding server.
Background
In the field of security video monitoring, the P2P 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-punching cluster and a forwarding cluster, and when an extreme network environment is encountered, hole-punching penetration may fail, and at this time, public network traffic forwarding is required by the forwarding cluster.
In the current public cloud deployment and application scenario, the IP (Internet Protocol ) address in the forwarding cluster is permanently bound with the server, limiting the degree of automation scheduling at the operation and maintenance level. Meanwhile, the control of the enterprise cost is not facilitated.
Therefore, a traffic scheduling method for a forwarding server is provided to implement separate scheduling of IP addresses and servers.
Disclosure of Invention
The embodiment of the invention provides a traffic scheduling method for a forwarding server, which is used for realizing the separate 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 flow consumption values when each forwarding server in the forwarding cluster executes forwarding tasks based on the respectively bound Internet Protocol (IP) addresses;
for any forwarding server, unbinding the forwarding server from an IP address when the flow consumption value of the forwarding server meets the preset flow threshold of the forwarding server;
Binding the IP address with any standby server, and using the bound standby server as a forwarding server to execute a forwarding task; the standby server is a server which has completed the initialization operation.
By detecting the flow consumption value of each forwarding server, the flow consumption value of any forwarding server can be found out in time to meet the preset flow threshold, which means that the flow consumption of the forwarding server is too high and is not suitable for continuous operation, so that the forwarding server and the corresponding IP address are unbinding, the IP address is not destroyed any more, the IP address is continuously bound with the standby server, 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 forwarding tasks. The IP address is decoupled from the forwarding server, the IP address and the forwarding server can be respectively and flexibly scheduled automatically, the whole process has no update of the IP address, 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:
Placing the IP address into an elastic IP pool; the elastic IP pool is used for storing unbound IP addresses;
when the IP address exists in the elastic IP pool, a standby server is optionally selected from the elastic server pool to bind with the IP address; the elastic server pool is used for storing servers which have completed initialization operation and are not bound with IP addresses.
And when the IP address exists in the elastic IP pool, a standby server is optionally bound with 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 the forwarding task of the forwarding cluster is improved, and manual participation is not required.
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, acquiring one or more standby servers through a cloud server manufacturer, initializing, and adding the standby servers after initializing 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.
Because one or more standby servers exist in the previous step, the forwarding task is executed after the standby servers are bound with the IP address. The number of standby servers in the flexible server pool is thus less than the first preset threshold. In order to realize the binding of the IP address and the standby server continuously and rapidly in the follow-up process, the system automatically acquires the standby server through a cloud server manufacturer to initialize and then adds the standby server into an elastic server pool, so that the follow-up process of binding the IP address and the standby server is realized, and a new forwarding server is rapidly generated.
Optionally, the method further comprises:
detecting the total bandwidth of each forwarding server in the forwarding cluster;
if the total bandwidth is determined to deviate from the preset interval, modifying the number 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 first parameter value is the number of IP addresses corresponding to the total bandwidth of the forwarding cluster in the preset interval;
and 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, and the total bandwidth is found out to deviate from the preset interval which can be borne by the forwarding cluster at present, so that the number value of the IP addresses set by the configuration center is automatically modified, and the capacity expansion and the capacity reduction of the forwarding cluster can be effectively realized in time, and the problems of slow cluster operation or other faults are avoided.
Optionally, if the total bandwidth is determined to deviate from the preset interval, modifying, according to a preset rule, the number value of the IP addresses set in the configuration center from the first parameter value to the second parameter value, including:
if the total bandwidth is determined to be larger than a second preset threshold value, modifying the number 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, acquiring one or more IP addresses by the cloud server manufacturer and adding the one or more IP addresses into the elastic IP pool;
and when one or more IP addresses exist in the elastic IP pool, optionally binding a standby server from the elastic server pool with the IP addresses according to any IP address, and using the bound standby server as a forwarding server to execute forwarding tasks.
If the total bandwidth is too high and exceeds a second preset threshold value which can be borne by the forwarding cluster currently, the first parameter value is modified to be a second parameter value with larger value, and the cloud server manufacturer automatically acquires the corresponding number of IP addresses to be added into the elastic IP pool, so that the increase of the IP addresses is realized. The added IP address is bound with the standby server, so that the addition 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, by the cloud server vendor, one or more IP addresses to join the elastic IP pool includes:
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 to be added into the elastic IP pool; the number of available IP addresses is the sum of the number of IP addresses in the forwarding cluster being used to perform forwarding tasks and the number of IP addresses in the elastic IP pool.
Because the configuration center is modified to be the second parameter value, when the number of the available IP addresses is found to be smaller than the second parameter value, the system automatically acquires one or more IP addresses through the cloud server manufacturer and adds the one or more IP addresses into the elastic IP pool, so that the increase of the IP addresses is automatically and timely realized.
Optionally, if the total bandwidth is determined to deviate from the preset interval, modifying, according to a preset rule, the number value of the IP addresses set in the configuration center from the first parameter value to the second parameter value, including:
if the total bandwidth is determined to be smaller than a third preset threshold value, modifying the number 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 available IP addresses, unbinding the forwarding servers from the IP addresses aiming at any one or more forwarding servers in the forwarding cluster, and deleting the IP addresses until the number of available IP addresses is equal to the second parameter value, so that the number of forwarding servers used for executing 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 being used to perform forwarding tasks and the number of IP addresses in the elastic IP pool.
If the total bandwidth is too low and is lower than the third preset threshold value which can be borne by the forwarding cluster currently, the forwarding server is too much, so that the resource and the cost are wasted. The first parameter value is automatically modified to a second parameter value of a smaller value. Then unbinding the forwarding servers from the IP addresses for any one or more forwarding servers in the forwarding cluster when the second parameter value is smaller than the number of available IP addresses, and deleting the IP addresses 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. So that the capacity reduction can be automatically, timely and efficiently performed.
In a second aspect, an embodiment of the present invention further provides a traffic scheduling device 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 respectively bound Internet Protocol (IP) address;
a processing unit for:
for any forwarding server, unbinding the forwarding server from an IP address when the flow consumption value of the forwarding server meets the preset flow threshold of the forwarding server;
binding the IP address with any standby server, and using the bound standby server as a forwarding server to execute a forwarding task; the standby server is a server which has completed the initialization operation.
Optionally, the processing unit is specifically configured to:
placing the IP address into an elastic IP pool; the elastic IP pool is used for storing unbound IP addresses;
when the IP address exists in the elastic IP pool, a standby server is optionally selected from the elastic server pool to bind with the IP address; the elastic server pool is used for storing servers which have completed initialization operation and are not bound with 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, acquiring one or more standby servers through a cloud server manufacturer, initializing, and adding the standby servers after initializing 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.
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 configured to:
if the total bandwidth is determined to deviate from the preset interval, modifying the number 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 first parameter value is the number of IP addresses corresponding to the total bandwidth of the forwarding cluster in the preset interval;
and 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 number 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, acquiring one or more IP addresses by the cloud server manufacturer and adding the one or more IP addresses into the elastic IP pool;
and when one or more IP addresses exist in the elastic IP pool, optionally binding a standby server from the elastic server pool with the IP addresses according to any IP address, and using the bound standby server as a forwarding server to execute forwarding tasks.
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 to be added into the elastic IP pool; the number of available IP addresses is the sum of the number of IP addresses in the forwarding cluster being used to perform forwarding tasks and the number of IP addresses in the elastic IP pool.
Optionally, the processing unit is specifically configured to:
if the total bandwidth is determined to be smaller than a third preset threshold value, modifying the number 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 available IP addresses, unbinding the forwarding servers from the IP addresses aiming at any one or more forwarding servers in the forwarding cluster, and deleting the IP addresses until the number of available IP addresses is equal to the second parameter value, so that the number of forwarding servers used for executing 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 being used to perform forwarding tasks and the number of IP addresses in the elastic IP pool.
In a third aspect, embodiments of the present invention also provide a computing device, comprising:
a memory for storing a computer program;
and the processor is used for calling the computer program stored in the memory and executing the flow scheduling method aiming at the forwarding server according to any mode.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium storing a computer-executable program for causing a computer to execute the traffic scheduling method for a forwarding server set forth in any one of the above aspects.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
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 schematic diagram of one 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 device 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
For purposes of clarity, embodiments and advantages of the present application, the following description will make clear and complete the exemplary embodiments of the present application, with reference to the accompanying drawings in the exemplary embodiments of the present application, it being apparent that the exemplary embodiments described are only some, but not all, of the examples of the present application.
Based on the exemplary embodiments described herein, all other embodiments that may be obtained by one of ordinary skill in the art without making any inventive effort are within the scope of the claims appended hereto. Furthermore, while the disclosure is presented in the context of an exemplary embodiment or embodiments, it should be appreciated that the various aspects of the disclosure may, separately, comprise a complete embodiment.
It should be noted that the brief description of the terms in the present application is only for convenience in understanding the embodiments described below, and is not intended to limit the embodiments of the present application. Unless otherwise indicated, these terms should be construed in their ordinary and customary meaning.
The terms first, second, third and the like in the description and in the claims and in the above-described figures are used for distinguishing between similar or similar objects or entities and not necessarily for describing a particular sequential or chronological order, unless otherwise indicated (Unless otherwise indicated). It is to be understood that the terms so used are interchangeable under appropriate circumstances such that the embodiments of the application are, for example, capable of operation in sequences other than those illustrated or otherwise described herein.
Furthermore, the terms "comprise" and "have," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a product or apparatus that comprises a list of elements is not necessarily limited to those elements expressly listed, but may include other elements not expressly listed or inherent to such product or apparatus.
Taking the case that the user installs the monitoring camera in home as an example, if the user is also in home, the mobile terminal (mobile phone, computer, pad, etc.) of the user and the monitoring camera are connected with the same intranet in 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 to realize the general technical scheme of intranet penetration, so that the flow communication cost can be effectively reduced. In some extreme network environments, such as poor network or a user not in home, the mobile terminal of the user cannot connect to the intranet in home, so that the situation that the mobile terminal and the monitoring device are respectively connected to different intranets occurs, if one party is a symmetric network and the other party is a non-fully conical network, the P2P hole is not penetrable, and then the forwarding of the streaming media through the public network by means of the forwarding server in the forwarding cluster is needed.
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 the target mobile terminal, and a user can view the monitoring picture through the mobile terminal.
The server types provided by existing cloud server vendors are shown in table 1. The type 2 is that an enterprise purchases servers from cloud server manufacturers, gives away IP addresses, charges according to the amount of flow consumed by each server, and purchases the flow after the flow is used up. The cost spent by an enterprise purchasing such server types remains relatively high with respect to type 3. The type 3 is that the server and the traffic are packaged and sold, the IP address is not given any more, the traffic quota of the server is fixed, and the server needs to be destroyed (namely the virtual server is deleted) after the traffic is used. The cost of purchasing such a server for type 3 is relatively low.
TABLE 1
The existing mode of constructing the forwarding cluster based on the type 2 server is that the 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 traffic for each server. For example, the system purchases 5 forwarding servers each bound with a respective IP address from a cloud server vendor, purchases 100G traffic for each forwarding server, and constructs a forwarding cluster. It can be found that each forwarding server in the forwarding cluster is permanently bound with an IP address, so that flexible scheduling of the servers and the IP addresses cannot be realized, and because of the permanent binding of the servers and the IP addresses, after the traffic consumption of the servers is completed, the traffic needs to be purchased again, and the price of the server of the type is higher, which is not beneficial to enterprise cost control. In order to use a type 3 server proposed by a cloud server manufacturer, the embodiment of the invention provides a possible traffic scheduling method for a forwarding server, and the server and the IP address are respectively and automatically scheduled through decoupling of the server and the IP address, so that the flexibility is improved, and the cost is reduced.
As shown in fig. 2, includes:
in step 201, a traffic consumption value when each forwarding server in the forwarding cluster performs a forwarding task based on the respectively bound internet protocol IP address is detected.
In the embodiment of the invention, the system sets the number of required IP addresses based on the forwarding task amount at each moment, and sets the number of servers based on the forwarding task amount in a period of time. For example, obtaining the forwarding task amount of each minute in the past month, determining that the maximum forwarding task amount of each minute is not more than 100, and enabling 5 forwarding servers to complete the forwarding task amount of each minute, wherein the number of the IP addresses is set to be 5 in the configuration center; and acquiring total forwarding task amounts in the past month, and determining that 700G flow is needed for completing the forwarding task amounts, wherein the system sets the number of servers with the flow of 100G as 7 in a configuration center, and two servers serve as standby servers. The above-described setting may also be accomplished by the user, without limitation. Based on the setting of the configuration center, corresponding numbers of servers and IP addresses are purchased from cloud server manufacturers respectively. For example, purchasing 5 IP addresses and 7 servers. It may be found that in the embodiment of the present invention, the server and the IP address are purchased separately, and the number of the two is not necessarily the same, and the redundant server is used as a standby server.
Optionally, a first preset threshold value of the number of standby servers may be further set in the configuration center, and server acquisition is performed based on the first preset threshold value. For example, the first preset threshold is 2, which indicates that the number of standby servers is 2, and then the number of purchased servers is 2 more than the number of IP addresses as standby servers.
And placing the purchased IP address into an elastic IP pool, and placing the server into an elastic server pool after initializing operation. The elastic IP pool is used for storing unbound IP addresses; the elastic server pool is used for storing servers which have completed initialization operation and have not bound IP addresses. 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 IP address as a forwarding server into a forwarding cluster for executing forwarding tasks. The number of the servers in the configuration center is larger than the number of the IP addresses because the initialization process of the servers is complex and time-consuming, and the servers in 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 flow value, and the flow consumption value of each forwarding server is detected based on the flow consumed in executing the forwarding task by the respective bound IP address. The flow 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, unbinding the forwarding server from an IP address when the traffic consumption value of the forwarding server meets a preset traffic threshold of the forwarding server.
The preset flow threshold may be a flow value of the forwarding server, or may be any value smaller than the flow value, for example, may be 100G or may be 90G, and when the flow consumption value of the forwarding server is too large and exceeds the preset flow threshold, it is indicated that the forwarding server is no longer suitable for executing the forwarding task, so that the forwarding server is unbinding the IP address bound with the forwarding server.
The unbundled forwarding servers can be destroyed and are not used for executing forwarding tasks, wherein the destruction means that the forwarding servers are deleted in the forwarding cluster.
Step 203, binding the IP address with any standby server, and using the bound standby server as a forwarding server to execute a forwarding task; the standby server is a server which has completed the initialization operation.
Because the standby server pool has the standby server which has completed the initialization operation, the unbinding IP address 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.
By detecting the flow consumption value of each forwarding server, the flow consumption value of any forwarding server can be found out in time to meet the preset flow threshold, which means that the flow consumption of the forwarding server is too high and is not suitable for continuous operation, so that the forwarding server and the corresponding IP address are unbinding, the IP address is not destroyed any more, the IP address is continuously bound with the standby server, 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 forwarding tasks. The IP address is decoupled from the forwarding server, the IP address and the forwarding server can be respectively and flexibly scheduled automatically, the whole process has no update of the IP address, 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.
The method provided by the embodiment of the invention can effectively utilize the cost advantage of the type 3 server of the table 1 provided by the cloud server manufacturer, and is beneficial to enterprise cost control. Meanwhile, not only the type 3 server but also other types of servers can be used in the forwarding cluster, so that the selectable server types of the forwarding cluster are expanded.
Optionally, after the IP address is unbinding from the original forwarding server, the IP address may be put into the elastic IP pool, and when the IP address is detected to exist in the elastic IP pool, a standby server is optionally selected from the elastic server pool to bind with the IP address.
And when the IP address exists in the elastic IP pool, a standby server is optionally bound with 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 the forwarding task of the forwarding cluster is improved, and manual participation is not required.
After binding the IP address with any standby server, the number of standby servers in the elastic server pool is reduced, so a method is designed to keep the number of standby servers in the elastic server pool unchanged, and when the unbinding IP address occurs later, the standby servers still exist in the elastic server pool and are bound with the unbinding IP address.
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, acquiring one or more standby servers through a cloud server manufacturer, initializing, and adding the standby servers after initializing 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.
In the above example, the first preset threshold is set to 2 in the configuration center, that is, the number of standby servers in the elastic server pool cannot be less than 2. Based on the setting of the configuration center, when the system purchases the server from the cloud server manufacturer, 2 spare servers are purchased and put into the elastic server pool. So initially there are 2 standby servers in the elastic server pool, the first preset threshold is 2. If the flow consumption value of one forwarding server in the forwarding cluster meets a preset flow threshold, unbinding the forwarding server from the IP address, and binding the unbinding IP address with any standby server in the elastic server pool to serve as the forwarding server. And the number of the standby servers in the elastic server pool is reduced to 1, and when the number of the standby servers is detected to be smaller than the first preset threshold value, 1 standby server is purchased through a cloud server manufacturer and initialization operation is carried out, and the standby servers after the initialization operation are added into the elastic server pool. So far, 2 standby servers can still remain in the elastic server pool.
Because one or more standby servers exist in the previous step, the forwarding task is executed after the standby servers are bound with the IP address. The number of standby servers in the flexible server pool is thus less than the first preset threshold. In order to realize the binding of the IP address and the standby server continuously and rapidly in the follow-up process, the system automatically acquires the standby server through a cloud server manufacturer to initialize and then adds the standby server into an elastic server pool, so that the follow-up process of binding the IP address and the standby server is realized, and a new forwarding server is rapidly generated.
Optionally, the method provided by the embodiment of the invention not only can be used for realizing the separate scheduling of the server and the IP address according to the traffic consumption of the forwarding server, but also can monitor the total bandwidth of the forwarding cluster and realize the capacity expansion and the capacity contraction of the forwarding cluster based on the monitoring value.
The method comprises 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 it is determined that the total bandwidth deviates from the preset interval, modifying the number value of the IP addresses set in the configuration center from the first parameter value to the 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 initial preset interval and the number value of the IP addresses of the configuration center are determined according to the task quantity of each forwarding task required by the forwarding cluster. For example, if it is determined that the task amount of the forwarding cluster needs 5 forwarding servers (i.e. 5 IP addresses) to complete, and the total bandwidth that can be borne is 100Mbps, the initial preset interval may be set to 80-90Mbps, and the first parameter value is 5. As the amount of tasks increases, the total bandwidth increases more and more, and when more than 90Mbps or less than 80Mbps, the first parameter value is modified to 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 down. For example, if the second parameter value is 7, the preset interval is updated to 100-120Mbps; if the second parameter value is 3, the preset interval is updated to 60-80Mbps. 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 becomes 7 and the preset interval is updated to 100-120Mbps, and then the first parameter value 7 is modified after the next time the total bandwidth deviation from the preset interval is detected. And so on.
Step 303, updating the number of forwarding servers in the forwarding cluster for performing forwarding tasks based on the second parameter value.
If the total bandwidth is too high and is higher than the preset interval, the current forwarding requirement is too dense, and the number of the current forwarding servers in the forwarding cluster is insufficient to bear the current forwarding requirement. And thus requires expansion of the 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 has an idle condition, so that the forwarding cluster can be contracted.
Therefore, the total bandwidth can be found out in time to deviate from the preset interval which can be borne by the forwarding cluster at present, and the number value of the IP addresses 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 cluster operation or other faults are avoided.
Example 1
If the total bandwidth is determined to be larger than a second preset threshold value, modifying the number 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, acquiring one or more IP addresses by the cloud server manufacturer and adding the one or more IP addresses into the elastic IP pool; and when one or more IP addresses exist in the elastic IP pool, optionally binding a standby server from the elastic server pool with the IP addresses according to any IP address, and using the bound standby server as a forwarding server to execute forwarding tasks.
Wherein, based on the second parameter value, obtaining, by the cloud server vendor, one or more IP addresses to add to the elastic IP pool, includes:
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 to be added into the elastic IP pool; the number of available IP addresses is the sum of the number of IP addresses in the forwarding cluster being used to perform forwarding tasks and the number of IP addresses in the elastic IP pool.
In practice, 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 through the cloud server manufacturer, the IP addresses are used for being bound with the server and then added to the forwarding cluster, and when the traffic consumption value of the forwarding server meets the preset traffic threshold, unbound IP addresses are added to the elastic IP pool. The sum of the number of IP addresses being used to perform forwarding tasks and the number of IP addresses in the elastic 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, as known from the previous steps, 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 or 2 is added to the first parameter value each time, which is not limited. For example modifying the second parameter value to 7. The number of available IP addresses is the sum of the number of IP addresses in the forwarding cluster being used to perform forwarding tasks and the number of IP addresses in the elastic 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 that 2 IP addresses are purchased from the cloud server vendor to be added to the elastic IP pool. 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 a forwarding cluster. The number of forwarding servers in the forwarding cluster becomes 7, thereby realizing capacity expansion.
Optionally, a first preset threshold of standby servers is set in the configuration center, and a corresponding number of standby servers are purchased from a cloud server manufacturer based on the first preset threshold. For example, the first preset threshold is 2, then in the above method, 2 standby servers are used to bind with the newly added 2 IP addresses, so the number of standby servers in the elastic server pool is smaller than the first preset threshold, and 2 standby servers can be obtained again by the cloud server manufacturer.
If the total bandwidth is too high and exceeds a second preset threshold value which can be borne by the forwarding cluster currently, the first parameter value is modified to be a second parameter value with larger value, and the cloud server manufacturer automatically acquires the corresponding number of IP addresses to be added into the elastic IP pool, so that the increase of the IP addresses is realized. The added IP address is bound with the standby server, so that the addition 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 value, modifying the number 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 available IP addresses, unbinding the forwarding servers from the IP addresses aiming at any one or more forwarding servers in the forwarding cluster, and deleting the IP addresses until the number of available IP addresses is equal to the second parameter value, so that the number of forwarding servers used for executing 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 being used to perform forwarding tasks and the number of IP addresses in the elastic 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 between them is 2, so that 2 forwarding servers in the forwarding cluster are unbinding with the IP addresses, and the unbinding IP addresses are recovered, where recovering means deleting the IP addresses. Since the IP address decreases, the number of forwarding servers in the forwarding cluster becomes 3.
Optionally, the unbundled server may also be deleted.
Optionally, when the second parameter value is determined to be smaller than the number of available IP addresses, the forwarding servers in the forwarding cluster are not immediately unbinding from the IP addresses, but the unbinding is performed after the traffic consumption value of any forwarding server in the forwarding cluster meets the preset traffic threshold, and then the unbinding IP addresses are deleted.
If the total bandwidth is too low and is lower than the third preset threshold value which can be borne by the forwarding cluster currently, the forwarding server is too much, so that the resource and the cost are wasted. The first parameter value is automatically modified to a second parameter value of a smaller value. Then unbinding the forwarding servers from the IP addresses for any one or more forwarding servers in the forwarding cluster when the second parameter value is smaller than the number of available IP addresses, and deleting the IP addresses 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. So that the capacity reduction can be automatically, timely and efficiently performed.
Fig. 4 shows a schematic diagram of a possible system architecture according to an embodiment of the present invention, including 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 dispatching center. The user may set the number value of IP addresses, the number value of servers, the number value of standby servers (the first preset threshold above) in the configuration center.
The initialization center is responsible for interfacing with cloud server vendor APIs (Application Programming Interface, application program interfaces) and initializing the corresponding resources according to the configuration center settings. The initialization center comprises a server initialization module and an IP address initialization module. The server initialization module is used for initializing the 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 checking the number of the standby servers in the elastic server pool at regular time. The IP address initialization module is used for initializing the corresponding number of IP addresses to the elastic IP pool based on the number value of the IP addresses of the configuration center, and checking the number of the unbound IP addresses in the elastic IP pool at regular time.
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 backup server to 2 in the configuration center, and the number value of the server includes the number value of the backup 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 the cloud server manufacturer API, initializes the 7 servers and puts the 7 servers into the 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 the cloud server manufacturer API, initializes the 5 IP addresses and then places the initialized IP addresses into the elastic IP pool.
The resource center is responsible for maintaining a flexible server pool and a flexible IP pool.
The dispatch center is responsible for maintaining forwarding cluster availability. The dispatching center comprises a binding module, an 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 IP address into the forwarding cluster; the unbinding module is used for unbinding the forwarding server in the forwarding cluster and the IP address and moving out of the forwarding cluster; the traffic monitoring module is used for detecting traffic consumption conditions when each forwarding server in the forwarding cluster executes forwarding tasks based on the respectively bound IP addresses; the cluster total bandwidth monitoring module is used for detecting the total bandwidth of the forwarding cluster, and modifying the number value of the IP addresses of the configuration center and the number value of the servers after the total bandwidth deviates from a preset interval, so that capacity expansion and capacity reduction are realized.
The functions of the above modules and interactions between modules are described below through specific embodiments.
Fig. 5 shows a schematic workflow diagram of a server initialization module according to an embodiment of the present invention. The server initialization module reads the number value of the servers in the configuration center and the number value (a first preset threshold) of the standby servers, and initializes the corresponding number of servers to join the elastic server pool according to the number 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 standby servers in the elastic server pool is smaller than a first preset threshold, if so, calling a cloud server manufacturer API, initializing a corresponding number of servers and adding the initialized servers into the elastic server pool. If the standby server is not less than the first preset threshold value, the standby server is not bound, and detection is continued. In this way, it can be ensured that the number of standby servers in the elastic server pool is always equal to the first preset threshold.
Fig. 6 shows a schematic workflow diagram of an elastic IP initialization module according to an embodiment of the present invention.
The elastic IP initialization module reads the number value of the IP addresses of the configuration center, and initializes the corresponding number of IP addresses to the elastic IP pool through the cloud server manufacturer API according to the number value of the IP addresses. For example, initialize 5 IP addresses to a flexible IP pool.
The method comprises the steps of detecting whether the number of available IP addresses is smaller than the number of IP addresses of a configuration center or not at regular time, wherein the total bandwidth monitoring module of the cluster can modify the number of the IP addresses of the configuration center from a first parameter value to a second larger parameter value, the number of the available IP addresses is smaller than the number of the IP addresses of the configuration center, and if the number of the available IP addresses is smaller than the number of the IP addresses of the configuration center, initializing the corresponding number of the IP addresses to an elastic IP pool. If not, continuing to detect whether the IP address to be bound exists in the elastic IP pool, if so, calling a binding module, binding the IP address with any standby server, adding the IP address into a forwarding cluster, and then returning to detect the number of the available IP addresses; if not, the number of available IP addresses is returned to be detected. The method comprises the steps that an IP address to be bound appears in an elastic IP pool under the following two conditions, one is that a forwarding server in a forwarding cluster, the flow consumption value of which meets a preset flow threshold, is unbinding with the IP address, the unbinding IP address is added into the elastic IP pool, and the other is that according to a larger second parameter value modified by a configuration center, the IP address obtained by a cloud server manufacturer is added into the elastic IP pool.
Fig. 7 shows a schematic workflow diagram of 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, judges whether the flow consumption values are larger than a preset flow threshold for any forwarding server, wherein the preset flow threshold is a flow package value for purchasing the server, if yes, the unbinding module is called to unbinding the forwarding server and the IP address, and the unbinding IP address is recovered to the elastic IP pool. And calling a server destruction module to delete the unbinding server. And because the IP address which is not bound exists in the elastic IP pool at the moment, the binding module is called to bind the IP address with any standby server in the elastic server pool, and the IP address is added 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 the cloud server manufacturer API, and then adds the new server initialization into the elastic server pool to serve 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 greater than the preset flow threshold value, returning to the step of detecting the flow consumption value of each forwarding server.
By detecting the flow consumption value of each forwarding server, the flow consumption value of any forwarding server can be found out in time to meet the preset flow threshold, which means that the flow consumption of the forwarding server is too high and is not suitable for continuous operation, so that the forwarding server and the corresponding IP address are unbinding, the IP address is not destroyed any more, the IP address is continuously bound with the standby server, 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 forwarding tasks. The IP address is decoupled from the forwarding server, the IP address and the forwarding server can be respectively and flexibly scheduled automatically, the whole process has no update of the IP address, 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 of a cluster total bandwidth monitoring module according to an embodiment of the present invention.
The total bandwidth monitoring module of the cluster regularly detects the total bandwidth of the forwarding cluster, judges whether the total bandwidth is larger than a second preset threshold, if yes, the number value of the IP addresses of the configuration center is increased, and an alarm is sent to inform related personnel. Calling the IP address initialization module to re-read the number value of the IP addresses of the configuration center (entering the step of FIG. 6, it is found that the number of the available IP addresses is smaller than the number value of the IP addresses of the configuration center, so that the IP addresses are purchased through the cloud server manufacturer API to be added into the elastic IP pool, thereby realizing the capacity expansion of the forwarding cluster). Returning to the step of timing detection of the total bandwidth of the forwarding cluster. If the number of the IP addresses of the configuration center is not larger than the second preset threshold, judging whether the number of the IP addresses of the configuration center is smaller than the third preset threshold, if yes, reducing the number of the IP addresses of the configuration center, and sending an alarm to inform related personnel. And calling an IP address initialization module to re-read the number value of the IP addresses of the configuration center, and finding that the number of the available IP addresses is larger than the number value of the IP addresses of the configuration center, so that after the unbinding IP addresses appear in the elastic IP pool, deleting the IP addresses, thereby realizing the capacity reduction of the forwarding cluster. And if the total bandwidth of the forwarding cluster is not smaller than the third preset threshold value, returning to the step of detecting the total bandwidth of the forwarding cluster at fixed time.
The total bandwidth of each forwarding server in the forwarding cluster is detected at fixed time, the total bandwidth is found to deviate from the preset interval which can be borne by the forwarding cluster at present, and then the number value of the IP addresses 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 cluster operation 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 provided by an embodiment of the present invention, which may perform a flow of traffic scheduling for the forwarding server.
As shown in fig. 9, the apparatus specifically includes:
a detection unit 901, configured to detect a traffic consumption value when each forwarding server in the forwarding cluster performs a forwarding task based on an internet protocol IP address bound by the forwarding server;
a processing unit 902, configured to:
for any forwarding server, unbinding the forwarding server from an IP address when the flow consumption value of the forwarding server meets the preset flow threshold of the forwarding server;
binding the IP address with any standby server, and using the bound standby server as a forwarding server to execute a forwarding task; the standby server is a server which has completed the initialization operation.
By detecting the flow consumption value of each forwarding server, the flow consumption value of any forwarding server can be found out in time to meet the preset flow threshold, which means that the flow consumption of the forwarding server is too high and is not suitable for continuous operation, so that the forwarding server and the corresponding IP address are unbinding, the IP address is not destroyed any more, the IP address is continuously bound with the standby server, 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 forwarding tasks. The IP address is decoupled from the forwarding server, the IP address and the forwarding server can be respectively and flexibly scheduled automatically, the whole process has no update of the IP address, 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:
placing the IP address into an elastic IP pool; the elastic IP pool is used for storing unbound IP addresses;
when the IP address exists in the elastic IP pool, a standby server is optionally selected from the elastic server pool to bind with the IP address; the elastic server pool is used for storing servers which have completed initialization operation and are not bound with 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, acquiring one or more standby servers through a cloud server manufacturer, initializing, and adding the standby servers after initializing 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.
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 is determined to deviate from the preset interval, modifying the number 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 first parameter value is the number of IP addresses corresponding to the total bandwidth of the forwarding cluster in the preset interval;
and 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 number 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, acquiring one or more IP addresses by the cloud server manufacturer and adding the one or more IP addresses into the elastic IP pool;
and when one or more IP addresses exist in the elastic IP pool, optionally binding a standby server from the elastic server pool with the IP addresses according to any IP address, and using the bound standby server as a forwarding server to execute forwarding tasks.
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 to be added into the elastic IP pool; the number of available IP addresses is the sum of the number of IP addresses in the forwarding cluster being used to perform forwarding tasks and the number of IP addresses in the elastic IP pool.
Optionally, the processing unit 902 is specifically configured to:
if the total bandwidth is determined to be smaller than a third preset threshold value, modifying the number 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 available IP addresses, unbinding the forwarding servers from the IP addresses aiming at any one or more forwarding servers in the forwarding cluster, and deleting the IP addresses until the number of available IP addresses is equal to the second parameter value, so that the number of forwarding servers used for executing 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 being used to perform forwarding tasks and the number of IP addresses in the elastic 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 in fig. 10, the processor 1001 and the memory 1002 are connected by a bus, for example. The buses may be divided into address buses, data buses, control buses, etc.
In the embodiment of the present application, the memory 1002 stores instructions executable by the at least one processor 1001, and the at least one processor 1001 may perform the steps of the traffic scheduling method for a forwarding server described above by executing the instructions stored in the memory 1002.
The processor 1001 is a control center of a computer device, and may use various interfaces and lines to connect various parts of the computer device, and execute or execute instructions stored in the memory 1002 and call data stored in the memory 1002, so as to perform traffic scheduling for a forwarding server. 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 primarily processes an operating system, a user interface, an application program, and the like, and the modem processor primarily 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, and 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), digital signal processor, application specific integrated circuit (Application Specific Integrated Circuit, ASIC), field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, and may implement or perform the methods, steps, and logic blocks disclosed in embodiments of the present application. The 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 embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in the processor for execution.
The memory 1002 is a non-volatile computer-readable storage medium that can 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, and may include, for example, flash Memory, hard disk, multimedia card, card Memory, random access Memory (Random Access Memory, RAM), static random access Memory (Static Random Access Memory, SRAM), programmable Read-Only Memory (Programmable Read Only Memory, PROM), read-Only Memory (ROM), charged erasable programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), magnetic Memory, magnetic disk, optical disk, and the like. 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 implementing a memory function for storing program instructions and/or data.
Based on the same technical concept, the embodiment of the present invention also provides a computer-readable storage medium, where a computer-executable program is stored, where the computer-executable program is configured to cause a computer to perform a method for traffic scheduling for a forwarding server set forth in any one of the above modes.
It will be appreciated by those skilled in the art that 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 flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations 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 modifications and variations can be made in the present application without departing from the spirit or scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims and the equivalents thereof, the present application is intended to cover such modifications and variations.

Claims (7)

1. A traffic scheduling method for a forwarding server, comprising:
detecting flow consumption values when each forwarding server in the forwarding cluster executes forwarding tasks based on the respectively bound Internet Protocol (IP) addresses;
for any forwarding server, unbinding the forwarding server from an IP address when the flow consumption value of the forwarding server meets the preset flow threshold of the forwarding server;
binding the IP address with any standby server, and using the bound standby server as a forwarding server to execute a forwarding task; the standby server is a server which has completed initialization operation;
the method further comprises the steps of:
detecting the total bandwidth of each forwarding server in the forwarding cluster;
if the total bandwidth is determined to be larger than a second preset threshold value, modifying the number 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; the first parameter value is the number of IP addresses corresponding to the total bandwidth of the forwarding cluster in a preset interval;
based on the second parameter value, acquiring one or more IP addresses and adding the one or more IP addresses into an elastic IP pool; the elastic IP pool is used for storing unbound IP addresses;
When one or more IP addresses exist in the elastic IP pool, binding one standby server from the elastic server pool with the IP addresses according to any IP address, and using the bound standby server as a forwarding server to execute forwarding tasks; the elastic server pool is used for storing servers which have completed initialization operation and are not bound with IP addresses yet; and/or the number of the groups of groups,
if the total bandwidth is determined to be smaller than a third preset threshold value, modifying the number 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 available IP addresses, unbinding the forwarding servers from the IP addresses aiming at any one or more forwarding servers in the forwarding cluster, and recovering the IP addresses until the number of available IP addresses is equal to the second parameter value, so that the number of forwarding servers used for executing 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 being used to perform forwarding tasks and the number of IP addresses in the elastic IP pool.
2. The method of claim 1, wherein binding the IP address with any of the backup servers comprises:
placing the IP address into an elastic IP pool; and when the IP address exists in the elastic IP pool, optionally binding a standby server from the elastic server pool with the IP address.
3. The method of claim 1, further comprising, after binding the IP address with any of the backup servers:
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, acquiring one or more standby servers through a cloud server manufacturer, initializing, and adding the standby servers after initializing 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.
4. The method of claim 1, wherein obtaining one or more IP addresses to join 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 a cloud server manufacturer to be added into the elastic IP pool; the number of available IP addresses is the sum of the number of IP addresses in the forwarding cluster being used to perform forwarding tasks and the number of IP addresses in the elastic IP pool.
5. 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 respectively bound Internet Protocol (IP) address;
a processing unit for:
for any forwarding server, unbinding the forwarding server from an IP address when the flow consumption value of the forwarding server meets the preset flow threshold of the forwarding server;
binding the IP address with any standby server, and using the bound standby server as a forwarding server to execute a forwarding task; the standby server is a server which has completed initialization operation;
the detection unit is also used for:
detecting the total bandwidth of each forwarding server in the forwarding cluster;
the processing unit is further configured to:
if the total bandwidth is determined to be larger than a second preset threshold value, modifying the number 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; the first parameter value is the number of IP addresses corresponding to the total bandwidth of the forwarding cluster in a preset interval;
Based on the second parameter value, acquiring one or more IP addresses and adding the one or more IP addresses into an elastic IP pool; the elastic IP pool is used for storing unbound IP addresses;
when one or more IP addresses exist in the elastic IP pool, binding one standby server from the elastic server pool with the IP addresses according to any IP address, and using the bound standby server as a forwarding server to execute forwarding tasks; the elastic server pool is used for storing servers which have completed initialization operation and are not bound with IP addresses yet; and/or the number of the groups of groups,
if the total bandwidth is determined to be smaller than a third preset threshold value, modifying the number 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 available IP addresses, unbinding the forwarding servers from the IP addresses aiming at any one or more forwarding servers in the forwarding cluster, and recovering the IP addresses until the number of available IP addresses is equal to the second parameter value, so that the number of forwarding servers used for executing 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 being used to perform forwarding tasks and the number of IP addresses in the elastic IP pool.
6. A computing device, comprising:
a memory for storing a computer program;
a processor for invoking a computer program stored in said memory, performing the method according to any of claims 1 to 4 in accordance with the obtained program.
7. 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 4.
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 CN114710443A (en) 2022-07-05
CN114710443B true 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 (11)

* 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
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9900247B2 (en) * 2015-12-30 2018-02-20 Juniper Networks, Inc. Media access control address and internet protocol address binding proxy advertisement for network devices of a network

Patent Citations (11)

* 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
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
Dimensioning bandwidth for elastic traffic in high-speed data networks;A.W. Berger等;IEEE/ACM Transactions on Networking;全文 *
关于数字电视IP网络认证计费方式的探讨;巩佳玉;;黑龙江科技信息(17);全文 *
网点前置系统的省域集中;贾泰红;;金融电子化(03);全文 *

Also Published As

Publication number Publication date
CN114710443A (en) 2022-07-05

Similar Documents

Publication Publication Date Title
CN107451147B (en) Method and device for dynamically switching kafka clusters
CN111143133B (en) Virtual machine backup method and backup virtual machine recovery method
CN111338854A (en) Kubernetes cluster-based method and system for quickly recovering data
CN111638972B (en) Request response method, system, equipment and storage medium based on micro-service
CN112181677A (en) Service processing method and device, storage medium and electronic device
CN112965817B (en) Resource management method and device and electronic equipment
CN111858050B (en) Server cluster hybrid deployment method, cluster management node and related system
CN104573497A (en) Processing method and device for starting items
CN111752545B (en) Stream computing method supporting data replay
CN102419753B (en) Information processing equipment, information processing method and information processing system
CN111311254A (en) Service processing method, device and system based on block chain
CN104267985A (en) Software loading method and device
CN114710443B (en) Traffic scheduling method and device for forwarding server
CN109522177A (en) A kind of task daily record processing system, method and device
CN112148420B (en) Abnormal task processing method based on container technology, server and cloud platform
CN117435569A (en) Dynamic capacity expansion method, device, equipment, medium and program product for cache system
CN115291891A (en) Cluster management method and device and electronic equipment
CN114996955A (en) Target range environment construction method and device for cloud-originated chaotic engineering experiment
CN110045971A (en) System upgrade restoration methods and device
CN113504981A (en) Task scheduling method and device, storage medium and electronic equipment
CN113626054A (en) Business service updating method and device
CN113672348A (en) Method and system for carrying out service verification on joint calculation multiple parties based on container cluster
CN107168685B (en) Method and device for updating script and computer terminal
CN106569912A (en) Method and system of restoring factory settings for mobile terminal
JP2022529665A (en) How to install and operate application programs, electronic devices, computer-readable media

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