CN111193607B - Method, device and storage medium for transmission resource management - Google Patents

Method, device and storage medium for transmission resource management Download PDF

Info

Publication number
CN111193607B
CN111193607B CN201910899049.8A CN201910899049A CN111193607B CN 111193607 B CN111193607 B CN 111193607B CN 201910899049 A CN201910899049 A CN 201910899049A CN 111193607 B CN111193607 B CN 111193607B
Authority
CN
China
Prior art keywords
resource block
channel
resource
virtual machine
forwarding
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
CN201910899049.8A
Other languages
Chinese (zh)
Other versions
CN111193607A (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.)
Tencent Cloud Computing Beijing Co Ltd
Original Assignee
Tencent Cloud Computing Beijing 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 Tencent Cloud Computing Beijing Co Ltd filed Critical Tencent Cloud Computing Beijing Co Ltd
Priority to CN201910899049.8A priority Critical patent/CN111193607B/en
Publication of CN111193607A publication Critical patent/CN111193607A/en
Application granted granted Critical
Publication of CN111193607B publication Critical patent/CN111193607B/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
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0896Bandwidth or capacity management, i.e. automatically increasing or decreasing capacities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

An embodiment of the application provides a method, a device and a storage medium for transmission resource management, wherein the method comprises the following steps: setting a using mode of each resource block in a resource pool according to the service characteristics, wherein the resource block comprises at least one virtual machine, and the resource block comprises at least two ports and bears at least two channels; selecting a first resource block from the resource pool according to the service characteristics and the using mode of the resource block, wherein the first resource block is a resource block with the idle resource amount higher than the preset resource amount; and after determining that the first resource block and a first channel of the at least two channels meet a capacity adaptation condition, generating a first mapping relation for forwarding service traffic, where the first mapping relation includes a first mapping relation between the first resource block and the first channel. By adopting the scheme, the resource utilization rate can be improved, the resources can be reasonably distributed, and the resource distribution algorithm can be simplified.

Description

Method, device and storage medium for transmission resource management
Technical Field
The embodiment of the application relates to the technical field of communication, in particular to a method, a device and a storage medium for transmission resource management.
Background
In a transmission network, an acceleration mode for data transmission mainly includes public network acceleration and private line acceleration, and the public network acceleration generally adopts Content Delivery Network (CDN) dynamic acceleration. The special line acceleration means that a cloud service provider provides a data transmission channel with low delay and low packet loss rate for a user by using the capacity built by the special line and an internet data center (hereinafter, referred to as internet data center, IDC for short). However, in both acceleration modes, service data needs to be transmitted to a target source station hop by hop, so when a transmission channel is constructed in a transmission network, a forwarding resource needs to be allocated to each hop and a forwarding resource management manner needs to be set.
At present, a forwarding resource management mode includes a cluster management mode and a resource exclusive mode. The cluster management is to establish a plurality of clusters in each large forwarding area and utilize the common resource sharing capacity of the clusters to carry flow. Meanwhile, the data transmission is carried out by adopting modes such as a private protocol and the like so as to achieve the purposes of isolating the flow of different users and sharing public resources. The resource exclusive mode is a mode in which each transmission channel exclusively occupies all forwarding resources, for example, data is forwarded by using a Virtual Private Network (VPN) mode such as socket5 and fullnat.
In the research and practice process of the prior art, the inventor of the present application finds that, although the cluster management mode can simultaneously implement the user traffic isolation function and the resource sharing function, a private protocol is adopted, so that a great deal of manpower and material resources are needed to develop a forwarding engine, and the development period is long. Although the resource exclusive mode has the function of isolating user traffic, since the resource exclusive mode employs a mode in which each transmission channel exclusively owns all forwarding resources, the exclusive mode wastes a large amount of forwarding resources, and especially some small users still exclusively own a whole forwarding resource under the condition that the bandwidth and the packet amount are not large. Therefore, both the cluster management mode and the resource exclusive mode cannot give consideration to the purposes of resource sharing and efficient resource scheduling.
Disclosure of Invention
Embodiments of the present application provide a method, an apparatus, and a storage medium for transmission resource management, which can improve resource utilization, reasonably allocate resources, and simplify a resource allocation algorithm.
In a first aspect, an embodiment of the present application provides a method for transmission resource management, where the method includes:
setting a use mode of each resource block in the resource pool according to service characteristics, wherein the resource block comprises at least one virtual machine, and comprises at least two ports and bears at least two channels;
selecting a first resource block from the resource pool according to the service characteristics and the using mode of the resource block, wherein the first resource block is a resource block with the idle resource amount higher than the preset resource amount;
after determining that the first resource block and at least two first channels meet a capacity adaptation condition, generating a first mapping relationship for forwarding service traffic, where the first channel is a channel of the at least two channels, and the first mapping relationship includes a first mapping relationship between the first resource block and the at least two first channels.
In a possible design, after determining that the first resource block and the at least two first channels satisfy the capacity adaptation condition and before generating the first mapping relationship for forwarding the traffic, the method further includes:
dividing at least two ports on the first resource block;
respectively allocating at least one available port of the at least two ports to each first channel, wherein each first channel is uniquely corresponding to at least one available port;
the first mapping relationship comprises a mapping relationship among virtual machines in the first resource block, available ports in the first resource block, and at least two first channels.
In a possible design, when the first resource block is used exclusively, after allocating, to the first channel, an available port of the first channel on the first resource block, the method further includes:
calculating a first target size of a resource block required after capacity expansion of the first channel;
selecting a first virtual machine which is available in a state and is not allocated from the resource pool according to a first difference value between the preset size of the first resource block and the first target size;
setting the identifier of the resource block to which the first virtual machine belongs as the identifier of the first resource block, setting the state of the first virtual machine as allocated, and updating the first virtual machine into the first mapping relation.
In a possible design, when the first resource block is used in a sharing manner, after allocating an available port of the first channel on the first resource block to the first channel, the method further includes:
determining a second channel from a plurality of first channels carried by the first resource block; the second channel is a channel with the flow rate exceeding the preset flow rate;
migrating at least one second channel to a second resource block, wherein the second resource block comprises at least one resource block with an adaptation condition for accommodating the channel;
adding a second mapping relation to a forwarding rule of the load balancer for an available port of the second channel on the second resource block, so as to migrate the traffic of the second channel to the second resource block; the second mapping relationship comprises a mapping relationship of the second channel, the virtual machine in the second resource block, and the available port in the second resource block.
In one possible design, the second channel is subsequent to an available port on the second resource block, and the method further includes:
setting a first forwarding weight of the first resource block corresponding to the first channel to zero, where the first forwarding weight refers to a ratio of forwarding a new service traffic after the service traffic is migrated from the first channel to the second channel to the first resource block;
deleting the mapping relation between the first resource block and the first channel in the forwarding rule after all the service traffic on the first resource block is migrated from the first channel to the second channel.
In a possible design, when the first resource block is used exclusively, after allocating, to the first channel, an available port of the first channel on the first resource block, the method further includes:
calculating a second target size of the resource block required after the first channel is scaled;
selecting second virtual machines from the virtual machines bound by the load balancer according to a second difference between the preset size and the second target size, wherein the number of the second virtual machines is the second difference;
unbinding the second virtual machine from the load balancer;
and setting the identifier of the resource block corresponding to the second virtual machine to be null, and setting the state of the resource block corresponding to the target virtual machine to be available and unallocated.
In a possible design, when the first resource block is used in a sharing manner, after allocating an available port of the first channel on the first resource block to the first channel, the method further includes:
calculating a second target size of the resource block required after the first channel is scaled;
acquiring a third resource block according to the second target size, wherein the third resource block and the first channel after capacity reduction meet the adaptation condition;
adding a third mapping relationship to the forwarding rule for an available port of the first channel on the third resource block, so as to migrate the traffic flow of the first channel to the third resource block, where the third mapping relationship includes mapping relationships between the first channel, a virtual machine in the third resource block, and an available port in the third resource block.
In one possible design, the available port on the third resource block for the first channel is followed by the method further comprising:
setting a second forwarding weight of the first resource block corresponding to the first channel to zero, where the second forwarding weight refers to a ratio of forwarding a new service traffic after the service traffic is migrated from the first resource block to the third resource block to the first resource block;
and deleting the mapping relation between the first channel and the first resource block in the forwarding rule after all the service traffic on the first resource block is migrated to the third resource block.
In a possible design, the setting of the usage mode of each resource block in the resource pool according to the service characteristics includes:
when the service flow meets at least one of the characteristics that the flow fluctuation is larger than a preset fluctuation range and the port occupancy rate is higher than the preset occupancy rate, setting the use mode of a resource block for forwarding the service flow as an exclusive mode;
and when the service flow meets at least one of the characteristics that the flow is less than the preset flow and the utilization rate of the resource block for forwarding the service flow is lower than the preset utilization rate, setting the utilization mode of the resource block for forwarding the service flow as a sharing mode.
In one possible design, the determining that the first resource block and at least two first channels satisfy a capacity adaptation condition includes:
and determining that the first resource block has the capacity adaptation condition for accommodating the first channel according to the first capacity, the historical peak usage, the second capacity and the early warning threshold of the first resource block. Specifically, a difference between a first capacity and a historical peak usage amount is calculated, and a product between a second capacity and an early warning threshold of the first resource block is calculated, where the first capacity is a maximum capacity that the first resource block can accommodate, the second capacity is a maximum capacity that the first channel needs for the service data, and the historical peak usage amount is a peak usage amount of the first resource block in a historical period;
determining that the first resource block is provided with the capacity adaptation condition accommodating the first channel when the difference is greater than or equal to the product.
In one possible design, the selecting a first resource block from resource blocks in the resource pool having a free capacity higher than a preset capacity includes:
determining a first resource block set from the resource pool, wherein the first resource block set comprises all resource blocks with preset sizes;
selecting a second resource block set with idle capacity higher than the preset capacity from the first resource block set;
selecting one resource block from the second set of resource blocks as the first resource block.
In a second aspect, an embodiment of the present application provides an apparatus for managing transmission resources, which has a function of implementing a method corresponding to the transmission resource management provided in the first aspect. The functions can be realized by hardware, and the functions can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above functions, which may be software and/or hardware.
In one possible design, the apparatus includes:
the processing module is used for setting the use mode of each resource block in the resource pool according to the service characteristics, the resource block comprises at least one virtual machine, and the resource block comprises at least two ports and bears at least two channels;
the selection module is used for selecting a first resource block from the resource pool according to the service characteristics and the using mode of the resource block, wherein the first resource block refers to a resource block with idle resource amount higher than preset resource amount;
the processing module is further configured to generate a first mapping relationship for forwarding service traffic after determining that the first resource block and at least two first channels meet a capacity adaptation condition, where the first channel is a channel of the at least two channels, and the first mapping relationship includes a first mapping relationship between the first resource block and the at least two first channels.
In a possible design, before the processing module determines that the first resource block and the first channel satisfy the capacity adaptation condition and generates the first mapping relationship for forwarding the traffic, the processing module is further configured to:
dividing, by the dividing module, at least two ports on the first resource block;
respectively allocating at least one available port of the at least two ports to each first channel, wherein each first channel is uniquely corresponding to at least one available port;
the first mapping relationship comprises a mapping relationship among virtual machines in the first resource block, available ports in the first resource block, and at least two first channels.
In a possible design, when the first resource block is used exclusively, after allocating, to the first channel, an available port of the first channel on the first resource block, the processing module is further configured to:
calculating a first target size of a resource block required after capacity expansion of the first channel;
selecting a first virtual machine which is available in a state and is not allocated from the resource pool according to a first difference value between the preset size of the first resource block and the first target size;
setting the identifier of the resource block to which the first virtual machine belongs as the identifier of the first resource block, setting the state of the first virtual machine as allocated, and updating the first virtual machine into the first mapping relation.
In a possible design, when the usage manner of the first resource block is a sharing manner, the processing module is further configured to, after allocating an available port of the first channel on the first resource block to the first channel, further:
determining a second channel from a plurality of first channels carried by the first resource block; the second channel is a channel with the flow rate exceeding the preset flow rate;
migrating at least one second channel to a second resource block, wherein the second resource block comprises at least one resource block with an adaptation condition for accommodating the channel;
for an available port of the second channel on the second resource block, adding a second mapping relationship in a forwarding rule of the load balancer, so as to migrate the service traffic of the second channel to the second resource block; the second mapping relationship comprises a mapping relationship of the second channel, the virtual machine in the second resource block, and the available port in the second resource block.
In one possible design, the processing module is further configured to, for the second channel, after an available port on the second resource block:
setting a first forwarding weight of the first resource block corresponding to the first channel to zero, where the first forwarding weight refers to a ratio of forwarding a new service traffic after the service traffic is migrated from the first channel to the second channel to the first resource block;
and deleting the mapping relation aiming at the first resource block and the first channel in the forwarding rule after all the service traffic on the first resource block is migrated from the first channel to the second channel.
In a possible design, when the first resource block is used exclusively, the processing module 801 is further configured to, after allocating an available port of the first channel on the first resource block to the first channel, further:
calculating a second target size of the resource block required after the first channel is scaled;
selecting second virtual machines from the virtual machines bound by the load balancer according to a second difference between the preset size and the second target size, wherein the number of the second virtual machines is the second difference;
unbinding the second virtual machine from the load balancer;
and setting the identifier of the resource block corresponding to the second virtual machine to be null, and setting the state of the resource block corresponding to the target virtual machine to be available and unallocated.
In a possible design, when the usage manner of the first resource block is a sharing manner, the processing module 801 is further configured to, after allocating an available port of the first channel on the first resource block to the first channel, further:
calculating a second target size of the resource block required after the first channel is scaled;
acquiring a third resource block according to the second target size, wherein the third resource block and the first channel after capacity reduction meet the adaptation condition;
for an available port of the first channel on the third resource block, adding a third mapping relationship in the forwarding rule to migrate the service traffic of the first channel to the third resource block, where the third mapping relationship includes mapping relationships of the first channel, a virtual machine in the third resource block, and an available port in the third resource block.
In one possible design, the processing module is further configured to, after an available port on the third resource block for the first channel:
setting a second forwarding weight of the first resource block corresponding to the first channel to zero, where the second forwarding weight refers to a ratio of forwarding a new service traffic after the service traffic is migrated from the first resource block to the third resource block to the first resource block;
and deleting the mapping relation between the first channel and the first resource block in the forwarding rule after all the service traffic on the first resource block is migrated to the third resource block.
In a possible design, the setting of the usage mode of each resource block in the resource pool according to the service characteristics includes:
when the service flow meets at least one of the characteristics that the flow fluctuation is larger than a preset fluctuation range and the port occupancy rate is higher than the preset occupancy rate, setting the use mode of a resource block for forwarding the service flow as an exclusive mode;
and when the service flow meets at least one of the characteristics that the flow is less than the preset flow and the utilization rate of the resource block for forwarding the service flow is lower than the preset utilization rate, setting the utilization mode of the resource block for forwarding the service flow as a sharing mode.
In one possible design, the processing module is specifically configured to:
and determining that the first resource block has the capacity adaptation condition for accommodating the first channel according to the first capacity, the historical peak usage amount, the second capacity and the early warning threshold of the first resource block. Specifically, the processing module calculates a difference between a first capacity and a historical peak usage amount, and calculates a product of a second capacity and an early warning threshold of the first resource block, where the first capacity is a maximum capacity that the first resource block can accommodate, the second capacity is a maximum capacity that the first channel needs for the service data, and the historical peak usage amount is a peak usage amount of the first resource block in a historical period;
determining that the first resource block is provided with the capacity adaptation condition accommodating the first channel when the difference is greater than or equal to the product.
In one possible design, the selection module is specifically configured to:
determining a first resource block set from the resource pool, wherein the first resource block set comprises all resource blocks with preset sizes;
selecting a second resource block set with idle capacity higher than the preset capacity from the first resource block set;
selecting one resource block from the second set of resource blocks as the first resource block.
In yet another aspect, the present invention provides a computer apparatus comprising at least one connected processor, a memory and a transceiver, wherein the memory is used for storing a computer program, and the processor is used for calling the computer program in the memory to execute the method of the above aspects.
Yet another aspect of the embodiments of the present application provides a computer-readable storage medium, which includes instructions that, when executed on a computer, cause the computer to perform the method of the first aspect.
Compared with the existing mechanism, in the scheme provided by the embodiment of the application, a plurality of virtual machine resources are logically divided into resource blocks for management, and the use mode of each resource block in the resource pool is set according to the service characteristics; selecting a first resource block from the resource pool according to the service characteristics and the using mode of the resource block; and generating a first mapping relation after determining that the first resource block and at least two first channels of the at least two channels meet a capacity adaptation condition. On one hand, when the resources are distributed, the resources of the virtual machine can be flexibly scheduled, and on the other hand, the use mode of the resource blocks is configured, so that the resource blocks can be flexibly selected according to the service characteristics, the service requirements of different service flows, different flow fluctuation ranges and different port occupancy rates are met, the resource utilization rate can be improved, the resources can be reasonably distributed, and the resource distribution algorithm can be simplified.
Drawings
FIG. 1 is a diagram illustrating a transmission channel architecture according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a resource organization logically partitioned in an embodiment of the present application;
fig. 3 is a flowchart illustrating a method for transmission resource management according to an embodiment of the present application;
fig. 4 is a schematic flow chart illustrating a process of performing capacity expansion operation on a channel in an exclusive manner in the embodiment of the present application;
fig. 5 is a schematic flow chart illustrating a capacity reduction operation performed on a channel in an exclusive manner in the embodiment of the present application;
fig. 6 is a schematic flow chart illustrating an operation of expanding the capacity of the channel in the sharing manner in the embodiment of the present application;
fig. 7 is a schematic flow chart of a capacity reduction operation performed on a channel in a sharing manner in the embodiment of the present application;
fig. 8 is a schematic structural diagram of an apparatus for managing transmission resources in an embodiment of the present application;
fig. 9 is a schematic structural diagram of a server in an embodiment of the present application.
Detailed Description
The terms "first," "second," and the like in the description and in the claims of the embodiments of the application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments described herein are capable of operation in other sequences than illustrated or otherwise described herein. Furthermore, the terms "comprise," "include," and "have," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or modules is not necessarily limited to those steps or modules expressly listed, but may include other steps or modules not expressly listed or inherent to such process, method, article, or apparatus, such that a division of modules presented in an embodiment of the present application is merely a logical division and may be implemented in a practical application in a different manner, such that multiple modules may be combined or integrated into another system or some features may be omitted or not implemented, such that a shown or discussed coupling or direct coupling or communication between modules may be through some interfaces and an indirect coupling or communication between modules may be electrical or other similar, and such that embodiments are not limited in this application. Moreover, the modules or sub-modules described as separate components may or may not be physically separated, may or may not be physical modules, or may be distributed in a plurality of circuit modules, and some or all of the modules may be selected according to actual needs to achieve the purpose of the embodiments of the present application.
Embodiments of the present application provide a method, an apparatus, and a storage medium for transmission resource management, which may be used for a load balancer, where the load balancer may be used to forward traffic, maintain forwarding rules, allocate resources, and the like. Fig. 1 is a schematic diagram of a transmission channel architecture in the embodiment of the present application, and fig. 2 is a schematic diagram of a resource organization logically divided in the embodiment of the present application.
As shown in fig. 1, the transmission channel architecture includes at least two load balancers, at least two forwarding zones, and at least two source stations. The load balancer configures a forwarding rule, and the forwarding rule may become a mapping relationship and may be embodied in a flow table form, which is not limited in this embodiment of the present application. The forwarding region includes resource blocks, and the resource blocks are mounted at the output end (also referred to as the back end) of the load balancer. Each resource block is configured according to a certain forwarding rule, and each resource block comprises at least two virtual machines (VM for short). And each forwarding region deploys resource blocks with corresponding sizes. In a forwarding region, the traffic flow between the resource blocks of the two hops before and after is forwarded based on the fullnat rule. Data between different regions are carried by using a dedicated line, for example, service traffic is forwarded between a resource block-1 in a forwarding region-1 and a resource block-2 in a forwarding region-2 based on a fullnat rule. The forwarding paths communicated by the solid lines and the forwarding paths communicated by the dotted lines respectively represent two different channels, and the forwarding region-1 and the forwarding region-2 both represent the shared part of the channels.
The following describes a data transmission process based on the transmission channel architecture shown in fig. 1:
after the service data enters the load balancer, the load balancer forwards the service traffic to each virtual machine of the resource block according to the forwarding rule, then transmits the service traffic to the next hop resource block through a special line according to the fullnat forwarding rule configured on the virtual machine, and finally forwards the service traffic to the source station.
As shown in fig. 2, the resource organization in this embodiment includes a resource block, a resource pool, a machine pool, and a plurality of virtual machines (for example, VM-1 in fig. 2 indicates that the serial number of a virtual machine is 1, and a virtual machine may also be referred to as a forwarder, and the like, and the specific name is not limited in this embodiment of the present application).
The resource block is a distributable minimum logic unit, and one resource block comprises at least two virtual machines, so that on one hand, resources can be reasonably scheduled, on the other hand, single-point faults can be avoided, and the availability of the resource block is ensured.
The virtual machines are the minimum unit of flow load, a plurality of virtual machines form a resource block, each virtual machine uniquely belongs to a certain resource block, and each virtual machine cannot be shared by a plurality of resource blocks. In some embodiments, the performance of all virtual machines may be set to maintain consistency, so that the problem that the performance of resource blocks of the same size is inconsistent due to different virtual machine combinations can be avoided. All resource blocks are uniformly stored in a resource block pool, and the resource pool can filter the resource blocks according to the information of the state, the region, the size and the like of the resource blocks.
The virtual machines run in a machine (also called a back-end server) serving as a host machine, all the virtual machines are stored in a machine pool, and the machine pool dynamically adjusts the number of the virtual machines in each region in the pool according to the used amount of the current network according to a certain proportion. For example, the reservation may be performed in a proportion of 30%, and the specific reservation proportion may be adjusted according to the traffic demand. For example, an existing network already uses 80 virtual machines, then a total of 80/(1-30%) of ≈ 115 virtual machines are required in the machine pool.
The embodiment of the application mainly provides the following technical scheme:
1. the resource allocation method comprises the steps of logically dividing a plurality of virtual machine resources into resource blocks for management, setting the using mode of each resource block in a resource pool according to service characteristics, selecting the resource blocks from the resource pool according to the service characteristics and the using mode of the resource blocks, and meanwhile, carrying out adaptation judgment on the resource blocks and channels. By allocating resources in this way, resource waste can be reduced and the sharing algorithm can be simplified. In addition, the resource block comprises at least two virtual machines, and single-point failure can be avoided.
2. Distinguishing resource blocks into two scenes of monopolizing and sharing, flexibly selecting the corresponding resource blocks in use modes according to the specific scenes of services, and carrying by using the mode of monopolizing the resource blocks aiming at some services with large flow fluctuation and high port occupation; and carrying some services with low resource utilization rate and small flow by using a mode of sharing resource blocks so as to achieve the purpose of saving cost.
3. And the smooth migration service flow is realized when the capacity expansion and the capacity reduction are carried out on the channel by adjusting the weight of the forwarding rule of the load balancer.
Referring to fig. 3, an embodiment of the present application provides a method for transmission resource management, where the method may be executed by a server, where the server is deployed with a plurality of virtual machines, and the plurality of servers may be deployed in a cluster manner to implement resource sharing. In the embodiment of the present application, a plurality of virtual machines are first divided into at least two resource blocks to obtain a resource pool.
Wherein the resource block includes at least two ports and carries at least two channels.
In some embodiments, the channel configuration parameter may be obtained first, and then the size of the resource block to be divided is calculated based on the channel configuration parameter, where the size of the resource block is the number of virtual machines in the resource block. The channel configuration parameters refer to channel configuration parameters that can be provided by a product, and include, for example, a maximum traffic transmitted by a channel, a channel identification channel state, resource block information corresponding to the channel, a forwarding region to which the channel belongs, and the like.
Taking a cloud global application acceleration product as an example, the product interface can provide channel configuration such as 8 ten thousand pps, 12 ten thousand pps, 20 ten thousand pps and the like, if the peak value performance of each virtual machine is 6 ten thousand pps, and 1/3 buffer is reserved, then the size of a resource block can be set to be 2 virtual machines aiming at the channel configuration of 8 ten thousand pps; aiming at the channel configuration of 12 ten thousand pps, the size of a resource block can be set to be 3 virtual machines; for a channel configuration of 20 ten thousand pps, the resource block size can be set to 5 virtual machines.
After the division of the resource blocks is completed, the method for managing the transmission resources in the embodiment of the present application includes:
301. and setting the use mode of each resource block in the resource pool according to the service characteristics.
In some embodiments, the usage of the resource blocks includes an exclusive mode or a shared mode.
The exclusive mode is a mode that each channel exclusively occupies all forwarding resources in a resource block, as shown in fig. 6, a channel Link-0001 exclusively occupies a resource block-2.
The sharing mode refers to a mode that at least two channels share all forwarding resources in a resource block, as shown in fig. 1, a channel indicated by a solid line and a channel indicated by a dotted line both share forwarding resources of a resource block-1 and a resource block-2; or as shown in FIG. 6, the channels Link-0001, link-0002 and Link-0003 share resource block-1.
302. And selecting a first resource block from the resource pool according to the service characteristics and the use mode of the resource block.
The first resource block is a resource block with idle resource amount higher than preset resource amount.
For example, when the service characteristic is a live video and the usage mode of the resource block is an exclusive mode, the first resource block is an exclusive resource block; and when the service characteristic is instant message sending and the using mode of the resource block is a sharing mode, the first resource block is a sharing resource block.
For another example, when the service characteristic is a live video, determining that the use mode of the resource block is an exclusive mode, and the first resource block is an exclusive resource block; and when the service characteristic is instant message sending, determining that the use mode of the resource block is a sharing mode, wherein the first resource block is a shared resource block. Therefore, the use mode of the resource block is set through the pre-judging mode, the resource utilization rate can be improved through the resource sharing mode, enough resources can be provided for the service with large flow to ensure that the service is normally carried out, and the reasonability of resource allocation is improved.
In some embodiments, when the usage manner of each resource block in the resource pool is set according to the service characteristics, the following 2 scenarios may be included:
and when the service flow meets at least one of the characteristics that the flow fluctuation is larger than a preset fluctuation range and the port occupancy rate is higher than the preset occupancy rate, setting the use mode of the resource block for forwarding the service flow as an exclusive mode. For example, taking a live video service as an example, when it is detected that the port occupancy rate of the service traffic is higher than 60% when the live video service is live, the resource block corresponding to the channel carrying the service traffic of the live video service may be set to be an exclusive mode.
And when the service flow meets at least one of the characteristics that the flow is less than the preset flow and the utilization rate of the resource block for forwarding the service flow is lower than the preset utilization rate, setting the utilization mode of the resource block for forwarding the service flow as a sharing mode.
303. And after the first resource block and the first channel are determined to meet the capacity adaptation condition, generating a first mapping relation for forwarding the service flow.
Wherein the first channel is a channel of the at least two channels. The first mapping relationship comprises a first mapping relationship between the first resource block and the first channel. The number of the second channels satisfying the capacity adaptation condition with the first resource block is not limited in the embodiments of the present application, for example, the number of the first channels may be at least one or at least two.
After the first mapping relationship is generated, adding the first mapping relationship to a forwarding rule of a load balancer to enable the first mapping relationship to take effect.
In some embodiments, whether the first resource block has the capacity adaptation condition for accommodating the first channel may be determined according to a first capacity, a historical peak usage, a second capacity, and an early warning threshold of the first resource block. Specifically, it is determined whether the first resource block and the first channel satisfy a capacity adaptation condition by:
calculating a difference value between a first capacity and a historical peak value usage amount, and calculating a product of a second capacity and an early warning threshold of the first resource block, wherein the first capacity is a maximum capacity which can be accommodated by the first resource block, the second capacity is a maximum capacity which is required by the first channel corresponding to the service data, and the historical peak value usage amount is a peak value usage amount of the first resource block in a historical period;
when the difference is greater than or equal to the product, determining that the first resource block is provided with the capacity adaptation condition to accommodate the first channel.
For example, the following inequality may be used to determine whether the first resource block can accommodate the first channel:
if (C-max P% -C-peak) > C-tunnel P-use is True, the first resource block may accommodate the first channel. Wherein C-max refers to the first capacity; c-tunnel refers to the second capacity; p-use refers to the first channel capacity average usage, e.g., 50%; c-peak refers to historical peak usage, e.g., peak usage over the past 24 hours; p-res refers to the pre-warning threshold, e.g., 80%.
Therefore, by judging whether the first resource block has the capacity adaptation condition for accommodating the first channel or not, the resource block bound with the channel can be reasonably selected, and the problem that the flow is too large and the bearing cannot be carried due to the fact that the resource block is not matched with the channel is avoided.
In some embodiments, for a resource block whose usage mode is a sharing mode, service traffic passing through the resource block needs to be isolated to ensure that a service is performed normally. Specifically, after determining that the first resource block and at least two first channels satisfy a capacity adaptation condition, before generating a mapping relationship between the first resource block and at least two first channels, the method further includes:
dividing a plurality of ports on the first resource block, wherein the ports are used for isolating different channels and sharing the service flow using the same resource block;
respectively allocating at least one available port in the plurality of ports to each first channel, wherein each first channel is uniquely corresponding to at least one available port;
the first mapping relationship comprises a mapping relationship among virtual machines in the first resource block, available ports in the first resource block, and at least two first channels.
For example, for channels sharing the same resource block, N port segments (indicating that the highest N channel shares are supported) may be divided in advance on the shared resource block, for example, starting from 10000, one segment for every 500 ports. The segment index idx is 1 to N. A list of segment indices that may be allocated is maintained on each resource block. When a port segment is allocated to a channel, only a segment index idx is allocated to indicate that the channel can use ports of [10000+ (idx-1) × 500,10000+ idx × 500) on the resource block.
Compared with the existing mechanism, in the embodiment of the application, a plurality of virtual machine resources are logically divided into resource blocks for management, and the use mode of each resource block in the resource pool is set according to the service characteristics; selecting a first resource block from the resource pool according to the service characteristics and the using mode of the resource block; and generating a first mapping relation after determining that the first resource block and at least two first channels of the at least two channels meet a capacity adaptation condition. On one hand, when the resources are distributed, the resources of the virtual machine can be flexibly scheduled, and on the other hand, two configurations of an exclusive mode and a sharing mode are carried out on the use mode of the resource blocks, so that the resource blocks can be flexibly selected according to service characteristics, service requirements of different service flows, different flow fluctuation ranges and different port occupancy rates are met, the resource utilization rate can be improved, the resources can be reasonably distributed, and a resource distribution algorithm can be simplified.
Optionally, in some embodiments of the present application, the resource management includes, in addition to a resource allocation operation at an initial stage of creating a channel, a resource allocation operation when a channel traffic flow changes, a channel fails, or is actively changed. The resource allocation operation when the channel service traffic changes, the channel fails or is actively changed includes a capacity expansion operation and a capacity reduction operation. The capacity expansion operation aiming at the resource block means that capacity expansion is realized through newly added resource blocks and flow migration; the capacity reduction operation for a resource block refers to migrating a channel with reduced configuration to other resource blocks, similar to reallocating resources once. It should be noted that, in the embodiment of the present application, the expansion or contraction operation may also be performed without considering the situation that the user autonomously changes the channel configuration, increases the traffic flow, and migrates when the resource block fails. For example, the capacity expansion or capacity reduction operation is periodically and automatically executed to dynamically adjust the allocation state of the resource, and the embodiment of the present application does not limit the condition or scenario for triggering the capacity expansion or capacity reduction operation performed on the channel.
In the embodiment of the present application, since the usage modes of the resource block are divided into an exclusive mode and a sharing mode, when performing capacity expansion operation and capacity reduction operation on resource blocks of different usage modes, the specific flows are different, and the following are introduced respectively:
1. when the usage mode of the resource block is exclusive mode
1. Capacity expansion operation
In the exclusive mode, the service traffic passing through the resource block does not involve traffic migration, so capacity expansion can be realized only by additionally allocating a virtual machine to the resource block. In the embodiment of the present application, the triggering condition of the capacity expansion operation in the exclusive mode is, for example, a configuration of the active upgrade channel of the user, and the capacity expansion operation flow described herein may be adopted or not adopted when the traffic flow is increased or the disaster recovery mechanism is set. Specifically, after allocating the available port of the first channel on the first resource block for the first channel, the method further comprises:
calculating a first target size of a resource block required after capacity expansion of the first channel;
selecting a first virtual machine which is available in a state and is not allocated from the resource pool according to a first difference value between the preset size of the first resource block and the first target size;
setting the identifier of the resource block to which the first virtual machine belongs as the identifier of the first resource block, setting the state of the first virtual machine as allocated, and updating the first virtual machine into the first mapping relation.
In some embodiments, considering that the problem of transmission interruption of service traffic may be caused by capacity expansion of a resource block, the embodiment of the present application further implements smooth migration of service traffic by:
after an available port of the second channel on the second resource block is set, setting a first forwarding weight of the first resource block corresponding to the first channel to zero, where the first forwarding weight refers to a ratio of forwarding a new service traffic after the service traffic is migrated from the first channel to the second channel to the first resource block;
and deleting the mapping relation aiming at the first resource block and the first channel in the forwarding rule after all the service traffic on the first resource block is migrated from the first channel to the second channel.
It can be seen that by setting the ratio of forwarding the newly accessed traffic on the load balancer to the server at the backend to 0, the newly accessed traffic is not forwarded to the machine. The first channel will not have new traffic and the original existing traffic on the first channel will not be affected. And the new traffic of the second channel can all automatically run onto the first resource block. In addition, in the process of migrating the traffic, the traffic is prevented from being led into the old resource block by adjusting the weight, but the service is not interrupted, and the old resource block can be released after the traffic on the first resource block gradually fades away.
Taking an exclusive manner to perform capacity expansion operation on the channel link-0001 as an example, for example, as shown in fig. 4, a resource block-1 includes virtual machines (VM-1, VM-2), and the channel link-0001 is bound in the resource block-1. For example, when the user actively upgrades the channel configuration, the capacity expansion operation for the resource block-1 bound by the link-0001 is triggered. Specifically, as shown in fig. 4, VM-18 which is currently available and not allocated is found from the machine pool, VM-18 is bound in resource block-9, and the resource block-9 to which VM-18 is currently bound is changed to be bound in resource block-1, which is equivalent to the VM-18 is re-divided into resource block-1, so as to realize resource reorganization.
2. Capacity reduction operation
The embodiment of the application introduces the capacity reduction operation aiming at the resource block by taking the case that the user actively reduces the channel configuration as an example, and the capacity reduction operation on the resource block can be considered or not considered when the service flow is reduced. Specifically, after allocating the available port of the first channel on the first resource block for the first channel, the method further comprises:
calculating a second target size of the resource block required after the first channel is scaled;
selecting second virtual machines from the virtual machines bound by the load balancer according to a second difference value between the preset size and the second target size, wherein the number of the second virtual machines is the second difference value;
unbinding the second virtual machine from the load balancer;
and setting the identifier of the resource block corresponding to the second virtual machine to be null, and setting the state of the resource block corresponding to the target virtual machine to be available and unallocated.
As shown in fig. 5, the channel link0001 originally needs 5 virtual machines (e.g., VM-1, VM-2, VM-3, VM-4, and VM-5 in fig. 5) to carry, and becomes 3 virtual machines after capacity reduction, if the difference is 2, it indicates that there are 2 virtual machines in excess, and the 2 virtual machines are recycled by setting the IDs of the resource blocks bound by the 2 virtual machines to be empty, thereby avoiding resource waste.
Therefore, by adopting the capacity reduction operation in the exclusive mode, the resources can be released in time, and the resource waste is avoided.
2. When the resource block is used in a shared manner
1. Capacity expansion operation
And in the sharing mode, if the server receives a capacity expansion instruction sent by a user or detects that the service flow reaches the early warning threshold, performing capacity expansion processing. The server may bind the virtual machine and the port of the second resource block to the forwarding rule to implement traffic migration. The embodiment of the application can also execute capacity expansion operation without considering the situations of channel configuration change by a user, service flow increase and migration when a resource block fails, and the application does not limit the conditions for executing the capacity expansion operation in a sharing mode. Specifically, after allocating the available port of the first channel on the first resource block for the first channel, the method further comprises:
determining a second channel from a plurality of first channels carried by the first resource block; the second channel is a channel with the flow rate exceeding the preset flow rate;
migrating at least one second channel to a second resource block, wherein the second resource block comprises at least one resource block with an adaptation condition for accommodating the channel;
adding a second mapping relation to a forwarding rule of the load balancer for an available port of the second channel on the second resource block, so as to migrate the traffic of the second channel to the second resource block; the second mapping relationship comprises a mapping relationship of the second channel, the virtual machine in the second resource block, and the available port in the second resource block.
For example, when the user actively promotes the channel configuration in the console, whether the current resource block meets the channel after the promotion is recalculated according to the adaptation algorithm. If yes, the resource block is still maintained unchanged in the current resource block, and otherwise, capacity expansion operation is triggered. And when the service flow naturally rises to reach the early warning threshold of the resource block, triggering the capacity expansion operation. As shown in FIG. 6, link-0001, link-0002 and link-0003 represent different channels, and link-0001, link-0002 and link-0003 are all bound in resource block-1. For example, when the traffic flow of link-0001 rises, the capacity expansion operation aiming at the resource block-1 bound by the link-0001 is triggered. Specifically, if the current traffic flow of link-0001 is the largest among link-0001, link-0002 and link-0003 shown in fig. 6, a new resource block-2 is added, and the traffic flow of link-0001 is migrated to the new resource block-2. The size of resource block-1 is the same as resource block-2.
2. Capacity reduction operation
And in the sharing mode, if the server receives a capacity expansion instruction sent by the user. The server may bind the virtual machine and the port of the second resource block to the forwarding rule to implement the resource release. Specifically, after allocating the available port of the first channel on the first resource block for the first channel, the method further comprises:
calculating a second target size of the resource block required after the first channel is scaled;
acquiring a third resource block according to the second target size, wherein the third resource block and the first channel after capacity reduction meet the adaptation condition;
adding a third mapping relationship to the forwarding rule for an available port of the first channel on the third resource block, so as to migrate the traffic flow of the first channel to the third resource block, where the third mapping relationship includes mapping relationships between the first channel, a virtual machine in the third resource block, and an available port in the third resource block.
In some embodiments, after the available ports on the third resource block for the first channel, the method further comprises:
setting a second forwarding weight of the first resource block corresponding to the first channel to zero, where the second forwarding weight refers to a ratio of forwarding a new service traffic after the service traffic is migrated from the first resource block to the third resource block to the first resource block;
and deleting the mapping relation between the first channel and the first resource block in the forwarding rule after all the service traffic on the first resource block is migrated to the third resource block.
Taking the link-0001 capacity reduction operation in the sharing mode as an example, as shown in fig. 7, the link-0001, link-0002 and link-0003 represent different channels, and the link-0001, link-0002 and link-0003 are all bound in the resource block-3. When the channel configuration is reduced for the channel link-0001 in fig. 7, the link-0001 needs to be subjected to the capacity reduction operation for the link-0001 in the resource block-3, the link-0001 is stripped from the current resource block-3, and then the link-0001 is bound into the new resource block-4, namely the capacity reduction operation for the link-0001 is realized by completing the migration operation for the link-0001.
It should be noted that, when a channel is expanded, it is considered that frequent traffic migration operation is caused by reallocating resources, which affects stability of a service. Therefore, in order to reduce the frequent migration traffic, the consistency between the size of the currently used resource block and the configuration of the channel can be ensured. For example, if the channel configuration calculates that the required resource block size is 4, the selected resource block size is 4, and although practically all resource blocks with a size larger than 4 can be used to carry the channel, if mixed, a large amount of fragmentation is caused, and the allocation algorithm is also complicated.
In the embodiment of the application, the size of the resource block can be ensured to be consistent, so that the phenomenon that a part of resources in a new resource block are judged when the traffic is migrated, if the new resource block is probably full in the past, the migration is triggered, and the algorithm is more complex, and the resource block which meets the service traffic and is most idle at the same time needs to be searched is avoided.
Any technical feature mentioned in the embodiment corresponding to any one of fig. 1 to 7 is also applicable to the embodiment corresponding to fig. 8 and 9 in the present application, and the details of the subsequent similarities are not repeated.
A method for transmission resource management in the present application is described above, and an apparatus for performing the method for transmission resource management is described below.
The above describes a method for managing transmission resources in this embodiment, and the following describes an apparatus for managing transmission resources in this embodiment.
Referring to fig. 8, a schematic diagram of an apparatus 80 for managing transmission resources shown in fig. 8 is applicable to allocating transmission resources, scheduling transmission paths of traffic flows, and the like. The apparatus 80 in the embodiment of the present application is capable of implementing steps corresponding to the method for transmission resource management performed in the embodiment corresponding to fig. 1. The functions implemented by the apparatus 80 may be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions, which may be software and/or hardware. The apparatus 80 may include a processing module 801, a dividing module 802, a selecting module 803, and a transceiver module (not identified in fig. 8), where the processing module 801, the dividing module 802, the selecting module 803, and the transceiver module may refer to operations executed in the embodiment corresponding to fig. 1, and are not described herein again. For example, the processing module may be configured to control the transceiver module to obtain a channel configuration parameter, a resource block identifier, a channel identifier, a transceiver forwarding rule, and the like, the processing module 801 may also be configured to control the partitioning module 802 to partition a resource block, and control the selection module 803 to select the first resource block, the third resource block, the second channel, and the like.
In some embodiments, the transceiver module may be configured to obtain channel configuration parameters.
The dividing module 802 may be configured to divide a plurality of virtual machines into at least two resource blocks to obtain a resource pool; the resource block comprises a plurality of ports and carries at least two channels; specifically, the processing module 801 may be configured to calculate a size of a resource block to be partitioned according to a channel configuration parameter obtained by the transceiver module;
the processing module 801 may be configured to set a usage mode of each resource block in the resource pool according to a service feature;
the selecting module 803 may be configured to select a first resource block from the resource pool according to the service characteristics and the usage manner of the resource block, where the first resource block is a resource block whose idle resource amount is higher than a preset resource amount;
the processing module 801 is further configured to generate a first mapping relationship for forwarding service traffic after determining that the first resource block and at least two first channels of the at least two channels satisfy a capacity adaptation condition, where the first mapping relationship includes a first mapping relationship between the first resource block and the at least two first channels.
Compared with the existing mechanism, in the embodiment of the present application, the dividing module 802 logically divides many virtual machine resources into resource blocks for management, and the processing module 801 sets the usage mode of each resource block in the resource pool according to the service characteristics; the selection module 803 selects a first resource block from the resource pool according to the service characteristics and the usage mode of the resource block; the processing module 801 determines that the first resource block and at least two first channels of the at least two channels satisfy a capacity adaptation condition, and then generates a first mapping relationship. On one hand, when the resources are distributed, the resources of the virtual machine can be flexibly scheduled, and on the other hand, the use mode of the resource blocks is configured, so that the resource blocks can be flexibly selected according to the service characteristics, the service requirements of different service flows, different flow fluctuation ranges and different port occupancy rates are met, the resource utilization rate can be improved, the resources can be reasonably distributed, and the resource distribution algorithm can be simplified.
In some embodiments, before determining that the first resource block and the at least two first channels satisfy the capacity adaptation condition and generating the first mapping relationship for forwarding the traffic, the processing module 801 is further configured to:
dividing, by the dividing module 802, at least two ports on the first resource block;
respectively allocating at least one available port of the at least two ports to each first channel, wherein each first channel is uniquely corresponding to at least one available port;
the first mapping relationship comprises a mapping relationship among a virtual machine in the first resource block, an available port in the first resource block, and a first channel.
In some embodiments, when the usage manner of the first resource block is an exclusive manner, after allocating, to the first channel, an available port of the first channel on the first resource block, the processing module 801 is further configured to:
calculating a first target size of a resource block required after capacity expansion of the first channel;
selecting a first virtual machine which is available in a state and is not allocated from the resource pool according to a first difference value between the preset size of the first resource block and the first target size;
setting the identifier of the resource block to which the first virtual machine belongs as the identifier of the first resource block, setting the state of the first virtual machine as allocated, and updating the first virtual machine into the first mapping relation.
In some embodiments, when the first resource block is used in a shared manner, the processing module 801 is further configured to, after allocating an available port of the first channel on the first resource block to the first channel, further:
determining a second channel from a plurality of first channels carried by the first resource block; the second channel is a channel with the flow rate exceeding the preset flow rate;
migrating at least one second channel to a second resource block, wherein the second resource block comprises at least one resource block with an adaptation condition for accommodating the channel;
adding a second mapping relation to a forwarding rule of the load balancer for an available port of the second channel on the second resource block, so as to migrate the traffic of the second channel to the second resource block; the second mapping relationship comprises a mapping relationship of the second channel, the virtual machine in the second resource block, and the available port in the second resource block.
In some embodiments, the processing module 801 is further configured to, for the second channel, after an available port on the second resource block:
setting a first forwarding weight of the first resource block corresponding to the first channel to zero, where the first forwarding weight refers to a ratio of forwarding a new service traffic after the service traffic is migrated from the first channel to the second channel to the first resource block;
deleting the mapping relation between the first resource block and the first channel in the forwarding rule after all the service traffic on the first resource block is migrated from the first channel to the second channel.
In some embodiments, when the usage manner of the first resource block is an exclusive manner, the processing module 801 is further configured to, after allocating an available port of the first channel on the first resource block to the first channel, further:
calculating a second target size of the resource block required after the first channel is scaled down;
selecting second virtual machines from the virtual machines bound by the load balancer according to a second difference between the preset size and the second target size, wherein the number of the second virtual machines is the second difference;
unbinding the second virtual machine from the load balancer;
and setting the identifier of the resource block corresponding to the second virtual machine to be null, and setting the state of the resource block corresponding to the target virtual machine to be available and unallocated.
In some embodiments, when the usage manner of the first resource block is a sharing manner, the processing module 801 is further configured to, after allocating an available port of the first channel on the first resource block to the first channel, further:
calculating a second target size of the resource block required after the first channel is scaled;
acquiring a third resource block according to the second target size, wherein the third resource block and the first channel after capacity reduction meet the adaptation condition;
for an available port of the first channel on the third resource block, adding a third mapping relationship in the forwarding rule to migrate the service traffic of the first channel to the third resource block, where the third mapping relationship includes mapping relationships of the first channel, a virtual machine in the third resource block, and an available port in the third resource block.
In some embodiments, the processing module 801 is further configured to, after an available port on the third resource block for the first channel:
setting a second forwarding weight of the first resource block corresponding to the first channel to zero, where the second forwarding weight refers to a ratio of forwarding a new service traffic after the service traffic is migrated from the first resource block to the third resource block to the first resource block;
and deleting the mapping relation between the first channel and the first resource block in the forwarding rule after all the service traffic on the first resource block is migrated to the third resource block.
The network authentication server and the terminal device in the embodiment of the present application are described above from the perspective of the modular functional entity, and the network authentication server and the terminal device in the embodiment of the present application are described below from the perspective of hardware processing. The embodiment of the present application further provides a server, as shown in fig. 9, which shows a schematic structural diagram of the server according to the embodiment of the present application, specifically:
fig. 9 is a schematic diagram of a server 920, which may have a relatively large difference due to different configurations or performances, and may include one or more Central Processing Units (CPUs) 922 (e.g., one or more processors) and a memory 932, and one or more storage media 930 (e.g., one or more mass storage devices) for storing applications 942 or data 944. Memory 932 and storage media 930 can be, among other things, transient storage or persistent storage. The program stored on the storage medium 930 may include one or more modules (not shown), each of which may include a series of instruction operations on a server. Still further, central processor 922 may be configured to communicate with storage medium 930 to execute a sequence of instruction operations in storage medium 930 on server 920.
The Server 920 may also include one or more power supplies 926, one or more wired or wireless network interfaces 950, one or more input-output interfaces 958, and/or one or more operating systems 941, such as Windows Server, mac OS X, unix, linux, freeBSD, etc.
Although not shown, the server may further include a display unit and the like, which will not be described in detail herein. The steps performed by the server in the above embodiments may be based on the server structure shown in fig. 9. Specifically, in this embodiment, the processor 901 in the server loads the executable file corresponding to the process of one or more application programs into the memory 902 according to the following instructions, and the processor 901 runs the application programs stored in the memory 902, thereby implementing various functions as follows:
dividing a plurality of virtual machines into at least two resource blocks to obtain a resource pool; the resource block comprises a plurality of ports and carries at least two channels; specifically, the processing module may be configured to calculate a size of a resource block to be partitioned according to a channel configuration parameter obtained by the transceiver module;
setting the use mode of each resource block in the resource pool according to the service characteristics; selecting a first resource block from the resource pool according to the service characteristics and the using mode of the resource block, wherein the first resource block is a resource block with the idle resource amount higher than the preset resource amount; after determining that the first resource block and at least two first channels of the at least two channels satisfy a capacity adaptation condition, generating a first mapping relationship for forwarding service traffic, where the first mapping relationship includes a first mapping relationship between the first resource block and the at least two first channels.
It should be noted that, in the embodiments of the present application (including the embodiments shown in fig. 8), the entity device corresponding to the transceiver module may be a transceiver, and the entity device corresponding to the processing module, the dividing module, and the selecting module may be a processor. Each device shown in fig. 8 may have a structure as shown in fig. 9, when a device has the structure as shown in fig. 9, the processor and the transceiver in fig. 9 implement the same or similar functions of the processing module 801, the dividing module 802, the selecting module 803 and the transceiver module provided in the device embodiment corresponding to the device, and the memory in fig. 9 stores instructions that the processor needs to call when executing the method of transmission resource management.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
It can be clearly understood by those skilled in the art that, for convenience and simplicity of description, the specific working processes of the system, the apparatus, and the module described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the embodiments of the present application, it should be understood that the disclosed system, apparatus, and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and in actual implementation, there may be other divisions, for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may be stored in a computer readable storage medium.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product.
The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can store or a data storage device, such as a server, a data center, etc., that is integrated with one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), among others.
The technical solutions provided in the embodiments of the present application are described in detail above, and the embodiments of the present application use specific examples to explain the principles and implementations of the embodiments of the present application, and the descriptions of the embodiments are only used to help understand the methods and core ideas of the embodiments of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (11)

1. A method of transmission resource management, the method comprising:
setting a using mode of each resource block in a resource pool according to service characteristics, wherein the resource block comprises at least one virtual machine, and comprises at least two ports and bears at least two channels;
selecting a first resource block from the resource pool according to the service characteristics and the using mode of the resource block, wherein the first resource block refers to a resource block with idle resource amount higher than preset resource amount;
after the first resource block and a first channel are determined to meet a capacity adaptation condition, dividing at least two ports on the first resource block;
respectively allocating at least one available port of the at least two ports to each first channel, wherein each first channel is uniquely corresponding to at least one available port;
generating a first mapping relation for forwarding service traffic, where the first channel is a channel of the at least two channels, and the first mapping relation includes a mapping relation between a virtual machine in the first resource block, an available port in the first resource block, and the first channel;
calculating a first target size of a resource block required after capacity expansion of the first channel;
selecting a first virtual machine which is available in a state and is not allocated from the resource pool according to a first difference value between the preset size of the first resource block and the first target size;
setting the identifier of the resource block to which the first virtual machine belongs as the identifier of the first resource block, setting the state of the first virtual machine as allocated, and updating the first virtual machine into the first mapping relation.
2. The method of claim 1, wherein when the first resource block is used in a shared manner, after allocating the available port of the first channel on the first resource block to the first channel, the method further comprises:
determining a second channel from a plurality of first channels carried by the first resource block; the second channel is a channel with the flow rate exceeding the preset flow rate;
migrating at least one second channel to a second resource block, wherein the second resource block comprises at least one resource block with an adaptation condition for accommodating the channel;
adding a second mapping relation to a forwarding rule of a load balancer for an available port of the second channel on the second resource block, so as to migrate the traffic of the second channel to the second resource block; the second mapping relationship comprises a mapping relationship of the second channel, the virtual machine in the second resource block, and the available port in the second resource block.
3. The method of claim 2, wherein the available port on the second resource block for the second channel is followed by the method further comprising:
setting a first forwarding weight of the first resource block corresponding to the first channel to zero, where the first forwarding weight refers to a ratio of forwarding a new service traffic after the service traffic is migrated from the first channel to the second channel to the first resource block;
deleting the mapping relation between the first resource block and the first channel in the forwarding rule after all the service traffic on the first resource block is migrated from the first channel to the second channel.
4. The method according to any of claims 1-3, wherein when the first resource block is used exclusively, the allocating the first channel with the available port of the first channel on the first resource block is followed, the method further comprising:
calculating a second target size of the resource block required after the first channel is scaled;
selecting second virtual machines from the virtual machines bound by the load balancer according to a second difference between the preset size and the second target size, wherein the number of the second virtual machines is the second difference;
unbinding the second virtual machine from the load balancer;
and setting the identifier of the resource block corresponding to the second virtual machine to be null, and setting the state of the resource block corresponding to the target virtual machine to be available and unallocated.
5. The method according to any of claims 1-3, wherein when the first resource block is used in a shared manner, the allocating the first channel to the first channel is performed after an available port of the first channel on the first resource block, the method further comprising:
calculating a second target size of the resource block required after the first channel is scaled;
acquiring a third resource block according to the second target size, wherein the third resource block and the first channel after capacity reduction meet the adaptation condition;
for an available port of the first channel on the third resource block, adding a third mapping relationship in a forwarding rule of a load balancer to migrate the traffic flow of the first channel to the third resource block, where the third mapping relationship includes mapping relationships of the first channel, a virtual machine in the third resource block, and an available port in the third resource block.
6. The method of claim 5, wherein the available port on the third resource block for the first channel is followed by the method further comprising:
setting a second forwarding weight of the first resource block corresponding to the first channel to zero, where the second forwarding weight refers to a ratio of forwarding a new service traffic after the service traffic is migrated from the first resource block to the third resource block to the first resource block;
and deleting the mapping relation between the first channel and the first resource block in the forwarding rule after all the service traffic on the first resource block is migrated to the third resource block.
7. The method of claim 1, wherein the setting of the usage mode of each resource block in the resource pool according to the service characteristics comprises:
when the service flow meets at least one of the characteristics that the flow fluctuation is larger than a preset fluctuation range and the port occupancy rate is higher than the preset occupancy rate, setting the use mode of a resource block for forwarding the service flow as an exclusive mode;
and when the service flow meets at least one of the characteristics that the flow is less than the preset flow and the utilization rate of the resource block for forwarding the service flow is lower than the preset utilization rate, setting the utilization mode of the resource block for forwarding the service flow as a sharing mode.
8. The method of claim 1, wherein selecting a first resource block from resource blocks in the resource pool having a free capacity higher than a preset capacity comprises:
determining a first resource block set from the resource pool, wherein the first resource block set comprises all resource blocks with preset sizes;
selecting a second resource block set with idle capacity higher than the preset capacity from the first resource block set;
selecting one resource block from the second set of resource blocks as the first resource block.
9. An apparatus for managing transmission resources, the apparatus comprising:
the processing module is used for setting the use mode of each resource block in a resource pool according to the service characteristics, wherein the resource block comprises at least one virtual machine, and comprises at least two ports and bears at least two channels;
the selection module is used for selecting a first resource block from the resource pool according to the service characteristics and the using mode of the resource block, wherein the first resource block refers to a resource block with idle resource amount higher than preset resource amount;
the processing module is further configured to divide at least two ports on the first resource block after determining that the first resource block and at least two first channels meet a capacity adaptation condition;
respectively allocating at least one available port of the at least two ports to each first channel, wherein each first channel is uniquely corresponding to the at least one available port;
generating a first mapping relation for forwarding service traffic, where the first channel is a channel of the at least two channels, and the first mapping relation includes a mapping relation between a virtual machine in the first resource block, an available port in the first resource block, and the first channel;
calculating a first target size of a resource block required after capacity expansion of the first channel;
selecting a first virtual machine which is available in a state and is not allocated from the resource pool according to a first difference value between the preset size of the first resource block and the first target size;
setting the identifier of the resource block to which the first virtual machine belongs as the identifier of the first resource block, setting the state of the first virtual machine as allocated, and updating the first virtual machine into the first mapping relation.
10. A computer apparatus, the apparatus comprising:
at least one processor, memory, and transceiver;
wherein the memory is adapted to store a computer program and the processor is adapted to invoke the computer program stored in the memory to perform the method of any of claims 1-8.
11. A computer-readable storage medium comprising instructions which, when executed on a computer, cause the computer to perform the method of any one of claims 1 to 8.
CN201910899049.8A 2019-09-23 2019-09-23 Method, device and storage medium for transmission resource management Active CN111193607B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910899049.8A CN111193607B (en) 2019-09-23 2019-09-23 Method, device and storage medium for transmission resource management

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910899049.8A CN111193607B (en) 2019-09-23 2019-09-23 Method, device and storage medium for transmission resource management

Publications (2)

Publication Number Publication Date
CN111193607A CN111193607A (en) 2020-05-22
CN111193607B true CN111193607B (en) 2023-04-07

Family

ID=70709058

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910899049.8A Active CN111193607B (en) 2019-09-23 2019-09-23 Method, device and storage medium for transmission resource management

Country Status (1)

Country Link
CN (1) CN111193607B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111611084A (en) * 2020-05-26 2020-09-01 杭州海康威视系统技术有限公司 Streaming media service instance adjusting method and device and electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102448068A (en) * 2011-11-25 2012-05-09 南京邮电大学 Dynamic resource block distributing method in long term evolution system
WO2016065762A1 (en) * 2014-10-28 2016-05-06 深圳市中兴微电子技术有限公司 Physical resource element fast mapping method, device and storage medium
CN106228395A (en) * 2016-07-15 2016-12-14 腾讯科技(深圳)有限公司 The evaluation method of Resource Properties and system
CN107026802A (en) * 2016-01-30 2017-08-08 华为技术有限公司 A kind of method for managing resource and equipment
CN107688492A (en) * 2016-08-05 2018-02-13 阿里巴巴集团控股有限公司 Control method, device and the cluster resource management system of resource
CN109471727A (en) * 2018-10-29 2019-03-15 北京金山云网络技术有限公司 A kind of task processing method, apparatus and system
CN110196770A (en) * 2018-07-13 2019-09-03 腾讯科技(深圳)有限公司 Cloud system internal storage data processing method, device, equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102448068A (en) * 2011-11-25 2012-05-09 南京邮电大学 Dynamic resource block distributing method in long term evolution system
WO2016065762A1 (en) * 2014-10-28 2016-05-06 深圳市中兴微电子技术有限公司 Physical resource element fast mapping method, device and storage medium
CN107026802A (en) * 2016-01-30 2017-08-08 华为技术有限公司 A kind of method for managing resource and equipment
CN106228395A (en) * 2016-07-15 2016-12-14 腾讯科技(深圳)有限公司 The evaluation method of Resource Properties and system
CN107688492A (en) * 2016-08-05 2018-02-13 阿里巴巴集团控股有限公司 Control method, device and the cluster resource management system of resource
CN110196770A (en) * 2018-07-13 2019-09-03 腾讯科技(深圳)有限公司 Cloud system internal storage data processing method, device, equipment and storage medium
CN109471727A (en) * 2018-10-29 2019-03-15 北京金山云网络技术有限公司 A kind of task processing method, apparatus and system

Also Published As

Publication number Publication date
CN111193607A (en) 2020-05-22

Similar Documents

Publication Publication Date Title
US9999030B2 (en) Resource provisioning method
CN112867050B (en) UPF network element management method and system
WO2016152587A1 (en) Slice management system and slice management method
CN103051564B (en) The method and apparatus of dynamic resource allocation
WO2017161979A1 (en) Cloud platform-based method and device for managing servers
JP6881575B2 (en) Resource allocation systems, management equipment, methods and programs
CN105052074A (en) Methods, systems, and computer readable media for providing a virtualized diameter network architecture and for routing traffic to dynamically instantiated diameter resource instances
WO2012065426A1 (en) Load distribution method, apparatus and server in distributed cache system
JP2014522036A (en) Method and apparatus for allocating virtual resources in a cloud environment
US20100138540A1 (en) Method of managing organization of a computer system, computer system, and program for managing organization
KR20150017984A (en) The method and apparatus for distributing data in a hybrid cloud environment
CN106713378B (en) Method and system for providing service by multiple application servers
EP3005113B1 (en) Improved deployment of virtual machines by means of differencing disks
CN110727738B (en) Global routing system based on data fragmentation, electronic equipment and storage medium
CN104917805A (en) Load sharing method and equipment
KR20130065019A (en) System and method of resource management of centralized base station in mobile communication network
JP2005100387A (en) Computer system and program for cluster system
EP4068725A1 (en) Load balancing method and related device
US11374820B2 (en) Centralized controller-based dynamic network bandwidth allocation and management
CN111213343A (en) Host upgrading method and device
JP2020028060A (en) Communication system and communication method
CN111193607B (en) Method, device and storage medium for transmission resource management
CN112000435A (en) Multi-activity load balancing method and system based on Openstack
US11979335B2 (en) Network controller
CN106911741B (en) Method for balancing virtual network management file downloading load and network management server

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