Disclosure of Invention
The application provides a resource scheduling system and a resource scheduling method, which can solve the problem that scheduling conflict exists when on-line scheduling nodes and off-line scheduling are required to schedule virtual machine resources.
In a first aspect, the present application provides a resource scheduling system, including an offline scheduling node and an online scheduling node. The online scheduling node is used for receiving an online scheduling request for requesting to allocate cloud resources to a second instance, confirming the second cloud resources on the first host which need to be allocated to the second instance according to the online scheduling request, and refusing to provide the offline scheduling node with the use right of the first cloud resources on the first host under the condition that the first cloud resources and the second cloud resources are confirmed to have resource conflict on the first host.
In the resource scheduling system provided by the application, the online scheduling node uniformly manages the use right of cloud resources in the cloud resource pool managed by the resource scheduling system, when the offline scheduling node needs to use the cloud resources on the host, the online scheduling node needs to request the use right of the cloud resources on the host, and when the online scheduling node refuses to provide the offline scheduling node with the use right of the cloud resources on the host, the offline scheduling node cannot use the cloud resources on the host. In this way, the situation that the online scheduling node and the offline scheduling node have resource conflict in the use of cloud resources on the host can be avoided, the resource scheduling system can be used for effectively scheduling the cloud resources on the host, the creation efficiency of an instance to be created is guaranteed, and the user experience of the cloud platform is effectively improved. In addition, the use right of cloud resources in the cloud resource pool managed by the online node resource scheduling system is not required to be introduced into the resource scheduling system, and the additional expense caused by introducing the third party component can be reduced.
Optionally, the offline scheduling node is further configured to reconfirm the third cloud resource on the second host to be allocated to the first instance after the usage right is refused, and request the usage right of the third cloud resource on the second host to the online scheduling node, so as to obtain the usage right of the cloud resource to be reallocated to the first instance, and realize resource optimization configuration of the first instance.
Optionally, the online scheduling node is further configured to provide, to the offline scheduling node, a right of use of the first cloud resource on the first host under a condition that it is confirmed that the first cloud resource and the second cloud resource do not have resource conflicts on the first host. In this way, the offline scheduling node can obtain the use right of the first cloud resource on the first host, and can allocate the first cloud resource on the first host to the first instance, so as to facilitate the migration of the first instance to the first cloud resource on the first host, and optimize the resource configuration of the created instance.
In one implementation manner, the management of the cloud resource usage rights in the cloud resource pool managed by the resource scheduling system by the online scheduling node can be realized through a resource information table. The online scheduling node records a resource information table of cloud resources in a cloud resource pool managed by the resource scheduling system, and the resource information table at least indicates the occupation state of the cloud resources. When the occupied state of the cloud resource to be allocated indicated by the resource information table is occupied, the cloud resource is indicated to have resource conflict. Correspondingly, when the online scheduling node receives a request of the offline scheduling node for requesting the use right of the first cloud resource on the first host, the online scheduling node queries the occupancy state of the first cloud resource on the first host in the resource information table, and determines that the first cloud resource on the first host has resource conflict when the occupancy state of the first cloud resource on the first host is occupied, or determines that the first cloud resource on the first host does not have resource conflict when the occupancy state of the first cloud resource on the first host is unoccupied. After receiving the online scheduling request requesting to allocate cloud resources to the second instance, the online scheduling node determines cloud resources to be allocated to the host of the second instance from cloud resources on all hosts whose occupied states are unoccupied and recorded in the resource information table.
And, the resource information table may be maintained by an online scheduling node. In one implementation, the online scheduling node may update the occupancy state of the cloud resource in the resource information table when the occupancy state of the cloud resource in the cloud resource pool changes. For example, the online scheduling node is further configured to mark, in the resource information table, an occupancy state of the first cloud resource on the first host as occupied after providing the offline scheduling node with the usage right of the first cloud resource on the first host.
Because cloud resources in the cloud resource pool managed by the resource scheduling system are uniformly scheduled by the online scheduling node, the offline scheduling node cannot know the occupation state of all cloud resources in the cloud resource pool according to the scheduling condition of the offline scheduling node on the cloud resources on the host. Therefore, the online scheduling node is further configured to send the resource information table to the offline scheduling node.
In addition, after the offline scheduling node determines the cloud resources scheduled to the first instance, when the offline scheduling node needs to determine the cloud resources scheduled to other instances, the occupancy state of the cloud resources scheduled to the first instance may not be updated yet in the resource information table recorded by the offline scheduling node. At this time, in order to avoid the conflict between cloud resources scheduled by the offline scheduling node to other instances and cloud resources scheduled to the first instance, the offline scheduling node is further configured to allocate the first cloud resource on the first host to the first instance after the online scheduling node provides the offline scheduling node with the usage right of the first cloud resource on the first host, and mark, in a resource information table recorded by the offline scheduling node, an occupancy state of the first cloud resource on the first host as occupied, where the resource information table indicates at least an occupancy state of the cloud resource. Therefore, the condition that the offline scheduling node generates resource conflict to cloud resources scheduled by different created examples can be avoided, and further the scheduling efficiency of offline scheduling is guaranteed.
In a second aspect, the present application provides a resource scheduling system, including an online scheduling node and an offline scheduling node. The online scheduling node is used for receiving an online scheduling request for requesting to allocate cloud resources to a second instance, confirming the second cloud resources on a first host to be allocated to the second instance according to the online scheduling request, requesting the offline scheduling node for the use rights of the second cloud resources on the first host, wherein the second instance is an instance to be created, and the offline scheduling node is used for confirming the first cloud resources on the first host to be reallocated to the first instance, and refusing to provide the online scheduling node with the use rights of the second cloud resources on the first host under the condition that the first cloud resources and the second cloud resources are confirmed to have resource conflict on the first host.
In the resource scheduling system provided by the application, the offline scheduling node uniformly manages the use right of cloud resources in the cloud resource pool managed by the resource scheduling system, when the online scheduling node needs to use the cloud resources on the host, the offline scheduling node needs to request the use right of the cloud resources on the host, and when the offline scheduling node refuses to provide the use right of the cloud resources on the host for the online scheduling node, the online scheduling node cannot use the cloud resources on the host. Therefore, the situation that the online scheduling node and the offline scheduling node conflict resources in use of cloud resources on the host can be avoided, and the resource scheduling system can be guaranteed to effectively schedule the cloud resources on the host. In addition, through the use right of cloud resources in the cloud resource pool managed by the offline scheduling node resource scheduling system, no additional third party component is required to be introduced into the resource scheduling system, and the additional overhead caused by the introduction of the third party component can be reduced.
Optionally, the online scheduling node is further configured to reconfirm the third cloud resource to be allocated to the second host of the second instance after the usage right is denied, and request the offline scheduling node for the usage right of the third cloud resource on the second host.
Optionally, the offline scheduling node is further configured to provide, to the online scheduling node, a right to use the second cloud resource on the first host under a condition that it is confirmed that the first cloud resource and the second cloud resource do not have a resource conflict on the first host.
Optionally, the offline scheduling node records a resource information table of cloud resources in a cloud resource pool managed by the resource scheduling system, and the resource information table at least indicates an occupation state of the cloud resources;
Optionally, the offline scheduling node is further configured to mark, in the resource information table, an occupancy state of the second cloud resource on the first host as occupied after providing the online scheduling node with the usage right of the second cloud resource on the first host.
Optionally, the offline scheduling node is further configured to send a resource information table to the online scheduling node.
Optionally, the online scheduling node is further configured to allocate the second cloud resource on the first host to the second instance after the offline scheduling node provides the online scheduling node with the usage right of the second cloud resource on the first host, and mark the occupancy state of the second cloud resource on the first host as occupied in a resource information table recorded by the online scheduling node, where the resource information table at least indicates the occupancy state of the cloud resource.
In a third aspect, the present application provides a resource scheduling method, where the resource scheduling method is applied to the resource scheduling system provided in the first aspect, and the resource scheduling system includes an offline scheduling node and an online scheduling node. The method comprises the steps that an offline scheduling node confirms first cloud resources on a first host computer to be reassigned to a first instance, requests the online scheduling node for the use rights of the first cloud resources on the first host computer, the first instance is a created instance, receives an online scheduling request requesting to assign cloud resources to a second instance, confirms second cloud resources on the first host computer to be assigned to the second instance according to the online scheduling request, and refuses to provide the offline scheduling node with the use rights of the first cloud resources on the first host computer under the condition that the first cloud resources and the second cloud resources are confirmed to have resource conflict on the first host computer.
Optionally, the resource scheduling method further comprises the steps that after the offline scheduling node is refused in use right, the offline scheduling node reconfirms the third cloud resources which are required to be allocated to the second host of the first instance, and requests the online scheduling node for the use right of the third cloud resources on the second host.
Optionally, the resource scheduling method further comprises the step that the online scheduling node provides the offline scheduling node with the use right of the first cloud resource on the first host under the condition that the online scheduling node confirms that the first cloud resource and the second cloud resource do not have resource conflict on the first host.
Optionally, the online scheduling node records a resource information table of cloud resources in a cloud resource pool managed by the resource scheduling method, and the resource information table at least indicates an occupation state of the cloud resources. Correspondingly, the resource scheduling method further comprises the step that after the online scheduling node provides the offline scheduling node with the use right of the first cloud resource on the first host, the occupancy state of the first cloud resource on the first host is marked as occupied in the resource information table.
Optionally, the resource scheduling method further comprises the step that the online scheduling node sends a resource information table to the offline scheduling node.
Optionally, the resource scheduling method further comprises the steps that after the offline scheduling node provides the offline scheduling node with the use right of the first cloud resource on the first host, the offline scheduling node allocates the first cloud resource on the first host to the first instance, and marks the occupation state of the first cloud resource on the first host as occupation in a resource information table recorded by the offline scheduling node, wherein the resource information table at least indicates the occupation state of the cloud resource.
In a fourth aspect, the present application provides a resource scheduling method, where the resource scheduling method is applied to the resource scheduling system provided in the second aspect, and the resource scheduling system includes an online scheduling node and an offline scheduling node. The online scheduling node receives an online scheduling request for requesting to allocate cloud resources to a second instance, confirms the second cloud resources on a first host to be allocated to the second instance according to the online scheduling request, requests the offline scheduling node for the use rights of the second cloud resources on the first host, the second instance is an instance to be created, confirms the first cloud resources on the first host to be reallocated to the first instance, and refuses to provide the online scheduling node with the use rights of the second cloud resources on the first host under the condition that the first cloud resources and the second cloud resources are confirmed to have resource conflict on the first host, wherein the first instance is the created instance.
Optionally, the resource scheduling method further comprises the steps that after the online scheduling node is refused in use right, the third cloud resource which is required to be allocated to the second host of the second instance is reconfirmed, and the offline scheduling node is requested for the use right of the third cloud resource on the second host.
Optionally, the resource scheduling method further comprises the step that the offline scheduling node provides the online scheduling node with the use right of the second cloud resource on the first host under the condition that the first cloud resource and the second cloud resource are confirmed to have no resource conflict on the first host.
Optionally, the offline scheduling node records a resource information table of cloud resources in a cloud resource pool managed by the resource scheduling system, and the resource information table at least indicates an occupation state of the cloud resources. Correspondingly, the resource scheduling method further comprises the step that after the offline scheduling node provides the online scheduling node with the use right of the second cloud resources on the first host, the offline scheduling node marks the occupation state of the second cloud resources on the first host as occupation in the resource information table.
Optionally, the resource scheduling method further comprises the step that the offline scheduling node sends a resource information table to the online scheduling node.
Optionally, the resource scheduling method further comprises the steps that after the online scheduling node provides the online scheduling node with the use right of the second cloud resource on the first host, the online scheduling node allocates the second cloud resource on the first host to the second instance, and the occupancy state of the second cloud resource on the first host is marked as occupied in a resource information table recorded by the online scheduling node, wherein the resource information table at least indicates the occupancy state of the cloud resource.
In a fifth aspect, the present application further provides an online scheduling node. The online scheduling node is used for receiving an online scheduling request for requesting to allocate cloud resources to a second instance, confirming the second cloud resources on a first host computer to be allocated to the second instance according to the online scheduling request, and refusing to provide the offline scheduling node with the use rights of the first cloud resources on the first host computer under the condition that the first cloud resources and the second cloud resources are confirmed to have resource conflict on the first host computer, wherein the second instance is an instance to be created.
Optionally, the online scheduling node is further configured to provide, to the offline scheduling node, a right to use the first cloud resource on the first host, if it is confirmed that the first cloud resource and the second cloud resource do not have a resource conflict on the first host.
Optionally, the online scheduling node records a resource information table of cloud resources in a cloud resource pool managed by the resource scheduling system, and the resource information table at least indicates an occupation state of the cloud resources. Correspondingly, the online scheduling node is further configured to mark, in the resource information table, an occupancy state of the first cloud resource on the first host as occupied after providing the offline scheduling node with the usage right of the first cloud resource on the first host.
And the online scheduling node is also used for sending the resource information table to the offline scheduling node.
In a sixth aspect, the present application further provides an offline scheduling node. The offline scheduling node is used for confirming first cloud resources on a first host computer to be reassigned to a first instance, and requesting the online scheduling node for the use right of the first cloud resources on the first host computer, wherein the first instance is a created instance.
Optionally, the offline scheduling node is further configured to reconfirm the third cloud resource on the second host that needs to be allocated to the first instance after the usage right is denied, and request the usage right of the third cloud resource on the second host from the online scheduling node.
Optionally, the offline scheduling node is further configured to allocate the first cloud resource on the first host to the first instance after the online scheduling node provides the offline scheduling node with the usage right of the first cloud resource on the first host, and mark, in the resource information table recorded by the offline scheduling node, an occupancy state of the first cloud resource on the first host as occupied. The resource information table at least indicates the occupancy state of the cloud resource.
In a seventh aspect, the present application further provides an online scheduling node. The online scheduling node is used for receiving an online scheduling request for requesting to allocate cloud resources to a second instance, confirming the second cloud resources on a first host computer to be allocated to the second instance according to the online scheduling request, and requesting the offline scheduling node for the use rights of the second cloud resources on the first host computer, wherein the second instance is an instance to be created;
optionally, the online scheduling node is further configured to reconfirm the third cloud resource on the second host to be allocated to the second instance after the usage right is denied, and request the offline scheduling node for the usage right of the third cloud resource on the second host.
Optionally, the online scheduling node is further configured to allocate the second cloud resource on the first host to the second instance after the offline scheduling node provides the online scheduling node with the usage right of the second cloud resource on the first host, and mark the occupancy state of the second cloud resource on the first host as occupied in a resource information table recorded by the online scheduling node, where the resource information table at least indicates the occupancy state of the cloud resource.
In an eighth aspect, the present application further provides an offline scheduling node. The offline scheduling node is used for confirming first cloud resources on a first host computer to be redistributed to a first instance, and under the condition that the first cloud resources and second cloud resources are confirmed to have resource conflict on the first host computer, the online scheduling node is refused to provide the use right of the second cloud resources on the first host computer, wherein the first instance is an established instance.
Optionally, the offline scheduling node is further configured to provide, to the online scheduling node, a right to use the second cloud resource on the first host under a condition that it is confirmed that the first cloud resource and the second cloud resource do not have a resource conflict on the first host.
Optionally, the offline scheduling node records a resource information table of cloud resources in a cloud resource pool managed by the resource scheduling system, and the resource information table at least indicates an occupation state of the cloud resources;
Optionally, the offline scheduling node is further configured to mark, in the resource information table, an occupancy state of the second cloud resource on the first host as occupied after providing the online scheduling node with the usage right of the second cloud resource on the first host.
Optionally, the offline scheduling node is further configured to send a resource information table to the online scheduling node.
In a ninth aspect, the present application provides a computer device comprising a processor and a memory, the memory having stored therein a computer program which, when executed by the processor, implements the functionality of the online scheduling node provided in the fifth aspect.
In a tenth aspect, the application provides a computer device comprising a processor and a memory, the memory storing a computer program, the computer device implementing the functionality of the offline scheduling node provided in the sixth aspect when the processor executes the computer program.
In an eleventh aspect, the present application provides a computer device comprising a processor and a memory, the memory storing a computer program, the computer device implementing the functionality of the online scheduling node provided in the seventh aspect when the processor executes the computer program.
In a twelfth aspect, the application provides a computer device comprising a processor and a memory, the memory having stored therein a computer program which, when executed by the processor, implements the functionality of the offline scheduling node provided in the eighth aspect.
In a thirteenth aspect, there is provided a storage medium, which when executed by a processor, implements the functionality of the online scheduling node provided in the fifth aspect.
In a fourteenth aspect, there is provided a storage medium, which when executed by a processor, carries out the functions of the offline scheduling node provided in the sixth aspect.
In a fifteenth aspect, there is provided a storage medium, which when executed by a processor, carries out the functions of the online scheduling node provided in the seventh aspect.
In a sixteenth aspect, there is provided a storage medium, which when executed by a processor, carries out the functions of the offline scheduling node provided in the eighth aspect.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail with reference to the accompanying drawings.
For ease of understanding, the terms involved in the embodiments of the present application are explained first.
Virtual Machine (VM) refers to a complete computer system implemented by software emulation, having complete hardware system functions, and operating in a completely isolated environment.
A host (also known as a physical machine) that is used to carry the physical resources of the virtualization technology. Typically, the hosts used to deploy the virtual machines are typically physical servers.
And the online scheduling (online scheduling) is used for responding to the resource request in the instance creation request of the user, selecting a host (also called a physical machine) for the instance created by the instance creation request, and performing resource allocation according to the selected host to realize real-time scheduling of the resources so as to be capable of creating the instance according to the scheduled resources.
And offline scheduling (offline scheduling) for reselecting the host for the created instance, and performing resource allocation again according to the reselected host, so as to perform instance relocation on the instance by using the reallocated resource, thereby adjusting the allocation state of the resource in the resource pool and achieving the purpose of optimizing the resource allocation. For example, when a performance hot spot occurs on a resource that has been issued to an instance, a resource fragmentation rate is higher, energy consumption is higher, or resource health is lower, rescheduling the resource to the instance, i.e., offline scheduling the resource of the instance, may be considered.
In a first aspect of the present embodiment, the present embodiment provides a resource scheduling system. As shown in fig. 1, the resource scheduling system includes an offline scheduling node 01 and an online scheduling node 02. The offline scheduling node 01 and the online scheduling node 02 establish a communication connection. The offline scheduling node 01 is configured to confirm that the first cloud resource needs to be reallocated to the first host of the first instance, and request, to the online scheduling node 02, a usage right of the first cloud resource on the first host. The online scheduling node 02 is configured to receive an online scheduling request for requesting to allocate cloud resources to a second instance, confirm, according to the online scheduling request, the second cloud resources on a first host that need to be allocated to the second instance, and reject to provide, to the offline scheduling node 01, a usage right of the first cloud resources on the first host when confirming that there is a resource conflict between the first cloud resources and the second cloud resources on the first host.
Wherein the first instance is a created instance and the second instance is an instance to be created. Therefore, the offline scheduling node 01 is configured to confirm, for the created instance of the allocated cloud resource, that the cloud resource on the host that needs to be reallocated to the created instance, that is, the offline scheduling node 01 is configured to reallocate the cloud resource on the host to the created instance, and performs offline scheduling on the cloud resource on the host that is used by the created instance. The online scheduling node 02 is configured to confirm cloud resources on a host computer to be allocated to the instance to be created according to the online scheduling request, that is, the online scheduling node 02 performs online scheduling on cloud resources on the host computer to be used by the instance to be created in the process of creating the instance, so as to create the instance to be created according to cloud resources on the online scheduled host computer.
Since the offline scheduling node 01 determines that cloud resources on the host computer of the first instance need to be reallocated among cloud resources on the host computer that is not occupied by the created instance, that is, the first cloud resources on the first host computer determined by the offline scheduling node 01 are cloud resources that are not occupied by the created instance. But the cloud resource that is not occupied by the created instance may be a cloud resource that the online scheduling node 02 needs to allocate to the instance to be created. In addition, when there is a resource conflict in the use of cloud resources on the host by the online scheduling node 02 and the offline scheduling node 01, if the cloud resources allocated to the created instance by the offline scheduling node 01 preempt the cloud resources allocated to the instance to be created by the online scheduling node 02, the cloud resources are rescheduled or the creation of the instance to be created fails, the creation efficiency of the instance to be created is affected, and the user experience of the cloud platform is poor.
Therefore, in the embodiment of the present application, in order to avoid that the offline scheduling of the resources of the created instance affects the creation process of the instance to be created, when the offline scheduling node 01 determines that the first cloud resource on the first host needs to be reallocated to the first instance, it needs to determine whether there is a conflict between the first cloud resource on the first host and the cloud resource that the online scheduling node 02 needs to allocate to the instance to be created.
In the resource scheduling system provided by the embodiment of the application, the online scheduling node 02 uniformly manages the use right of the cloud resources in the cloud resource pool managed by the resource scheduling system, when the offline scheduling node 01 needs to use the cloud resources on the host, the online scheduling node 02 needs to request the use right of the cloud resources on the host, and when the online scheduling node 02 refuses to provide the offline scheduling node 01 with the use right of the cloud resources on the host, the offline scheduling node 01 cannot use the cloud resources on the host. In this way, the situation that the online scheduling node 02 and the offline scheduling node 01 have resource conflict in the use of cloud resources on the host can be avoided, the resource scheduling system can be used for effectively scheduling the cloud resources on the host, the creation efficiency of an instance to be created is guaranteed, and the user experience of the cloud platform is effectively improved.
The resource scheduling system can be deployed on a cloud infrastructure service platform with online scheduling capability and offline scheduling capability. The cloud infrastructure service platform can realize effective scheduling of cloud resources in the cloud infrastructure service platform through the resource scheduling system, so that the probability of rescheduling resources in the cloud infrastructure service platform due to resource scheduling conflict can be reduced, the time consumed by instance creation and instance relocation is shortened, and the success probability of instance creation and instance relocation is improved.
Alternatively, both online scheduling node 02 and offline scheduling node 01 may be implemented using virtual machines, containers, or physical servers, etc. For example, the online scheduling node 02 and the offline scheduling node 01 may each be implemented by one server or a server cluster composed of a plurality of servers. For another example, the online scheduling unit and the offline scheduling unit may each be software running on a virtual machine.
In one implementation, the online scheduling node 02 is further configured to provide the offline scheduling node 01 with the usage rights of the first cloud resource on the first host in case it is confirmed that the first cloud resource and the second cloud resource do not have resource conflicts on the first host. The first cloud resource and the second cloud resource do not have resource conflict on the first host, which means that the instance to be created does not need to use the first cloud resource on the first host, and at this time, the offline scheduling node can allocate the first cloud resource on the first host to the first instance, so as to facilitate the migration of the first instance to the first cloud resource on the first host, and optimize the resource configuration of the created instance.
Optionally, the offline scheduling node 01 is further configured to reconfirm the third cloud resource on the second host that needs to be allocated to the first instance after the usage right of the first cloud resource on the first host is rejected, and request the usage right of the third cloud resource on the second host from the online scheduling node 02. That is, after the offline scheduling node 01 applies for the usage rights of the cloud resources on the host machine to the online scheduling node 02, if the online scheduling node 02 refuses to provide the offline scheduling node 01 with the cloud resources on the host machine requested by the offline scheduling node 01, the offline scheduling node 01 may redetermine the cloud resources on the host machine to be allocated to the first instance, and request the online scheduling node 02 for the usage rights of the cloud resources on the host machine again until the application stopping condition is reached. Alternatively, the application stopping condition may be determined according to the application requirement, which is not specifically limited in the embodiment of the present application. For example, the application stop condition may indicate that, after the offline scheduling node 01 repeatedly applies for cloud resources on the host for the same instance for a preset number of failures, the online scheduling node 02 stops applying for cloud resources on the host allocated to the instance. Or the application stopping condition may obtain, for the offline scheduling node 01, a right to use the cloud resource on the host requested by the offline scheduling node 01.
In one implementation manner, the management of the cloud resource usage rights in the cloud resource pool managed by the resource scheduling system by the online scheduling node 02 may be implemented through a resource information table. The resource information table is at least recorded with the occupation state of cloud resources in the cloud resource pool. When the occupied state of the cloud resource to be allocated indicated by the resource information table is occupied, the cloud resource is indicated to have resource conflict. Correspondingly, when the online scheduling node 02 receives a request of the offline scheduling node 01 for requesting the use right of the first cloud resource on the first host, the online scheduling node 02 queries the occupancy state of the first cloud resource on the first host in the resource information table, and determines that the first cloud resource on the first host has resource conflict when the occupancy state of the first cloud resource on the first host is occupied, or determines that the first cloud resource on the first host does not have resource conflict when the occupancy state of the first cloud resource on the first host is unoccupied. After receiving the online scheduling request requesting to allocate cloud resources to the second instance, the online scheduling node 02 determines cloud resources to be allocated to the host of the second instance from cloud resources on all hosts whose occupied states are unoccupied and recorded in the resource information table.
And, the resource information table may be maintained by the online scheduling node 02. In one implementation, the online scheduling node 02 may update the occupancy state of the cloud resource in the resource information table when the occupancy state of the cloud resource in the cloud resource pool changes. For example, after determining the cloud resources on the host allocated to the instance to be created, the online scheduling node 02 may mark the occupancy state of the cloud resources on the host as occupied, and after providing the offline scheduling node 01 with the usage rights of the cloud resources on the host, the online scheduling node 02 marks the occupancy state of the cloud resources on the host as occupied in the resource information table.
Further, as cloud resources in the cloud resource pool managed by the resource scheduling system are uniformly scheduled by the online scheduling node 02, the offline scheduling node 01 cannot know the occupation state of all cloud resources in the cloud resource pool according to the scheduling condition of the offline scheduling node 01 on the cloud resources on the host. Therefore, the online scheduling node 02 may also send the resource information table to the offline scheduling node 01, so that the offline scheduling node 01 knows the occupancy state of all cloud resources in the cloud resource pool managed by the resource scheduling system according to the resource information table.
The implementation manner of sending the resource information table to the offline scheduling node 01 by the online scheduling node 02 may be determined according to the application requirement, which is not specifically limited in the embodiment of the present application. For example, the online scheduling node 02 may transmit the full amount information of the resource information table to the offline scheduling node 01 every time. Or the online scheduling node 02 can also send the full-quantity information of the resource information table to the offline scheduling node 01 for the first time, and send the incremental information of the resource information table relative to the last sending process to the offline scheduling node 01 in each subsequent sending process. Moreover, the time when the online scheduling node 02 sends the resource information table to the offline scheduling node 01 may also be determined according to the application requirement, which is not specifically limited in the embodiment of the present application. For example, the online scheduling node 02 may send the resource information table to the offline scheduling node 01 each time information in the resource information table changes. Or the online scheduling node 02 may periodically transmit the resource information table to the offline scheduling node 01. Or the online scheduling node 02 may send the resource information table to the offline scheduling node 01 when receiving the resource information table acquisition request sent by the offline scheduling node 01.
Alternatively, since the offline scheduling node 01 determines, among cloud resources on unoccupied hosts, cloud resources on hosts that need to be allocated to created instances, the resource information table recorded in the offline scheduling node 01 may also include only cloud resources on all unoccupied hosts. Accordingly, the online dispatching node 02 may send only cloud resources on unoccupied hosts to the offline dispatching node 01, so that the offline dispatching node 01 updates cloud resources on unoccupied hosts recorded by the offline dispatching node 01.
In addition, after the offline scheduling node 01 determines the cloud resources scheduled to the first instance, when the offline scheduling node 01 needs to determine the cloud resources scheduled to other instances, the occupancy state of the cloud resources scheduled to the first instance may not be updated yet in the resource information table recorded by the offline scheduling node 01. At this time, in order to avoid the conflict between the cloud resources scheduled to other instances by the offline scheduling node 01 and the cloud resources scheduled to the first instance, the offline scheduling node 01 may update the occupancy state of the cloud resources scheduled to the first instance to be occupied in the resource information table recorded by the offline scheduling node 01 after determining the cloud resources scheduled to the first instance. For example, after the online scheduling node 02 provides the offline scheduling node 01 with the usage right of the cloud resource scheduled to the first instance, if the offline scheduling node 01 allocates the cloud resource to the first instance, the offline scheduling node 01 may mark, in the resource information table recorded by the offline scheduling node 01, the occupancy state of the cloud resource allocated to the first instance as occupied. In this way, the offline scheduling node 01 can avoid the situation that resource conflict occurs to cloud resources scheduled by different created instances, and further ensures the scheduling efficiency of offline scheduling.
Note that, since the resource information table describes the occupancy state of the cloud resource on the host, that is, describes the correspondence between the cloud resource on the host and the occupancy state of the cloud resource, in the embodiment of the present application, the name is referred to as a resource information table, but the name does not limit the data representation form of the correspondence to a table form, as long as the data representation form of the correspondence can represent the correspondence described in the resource information table.
In summary, in the resource scheduling system provided by the embodiment of the present application, the online scheduling node uniformly manages the usage rights of cloud resources in the cloud resource pool managed by the resource scheduling system, when the offline scheduling node needs to use the cloud resources on the host, the online scheduling node needs to request the usage rights of the cloud resources on the host, and when the online scheduling node refuses to provide the offline scheduling node with the usage rights of the cloud resources on the host, the offline scheduling node cannot use the cloud resources on the host. In this way, the situation that the online scheduling node and the offline scheduling node have resource conflict in the use of cloud resources on the host can be avoided, the resource scheduling system can be used for effectively scheduling the cloud resources on the host, the creation efficiency of an instance to be created is guaranteed, and the user experience of the cloud platform is effectively improved. In addition, the use right of cloud resources in the cloud resource pool managed by the online node resource scheduling system is not required to be introduced into the resource scheduling system, and the additional expense caused by introducing the third party component can be reduced.
In a second aspect of the embodiment of the present application, the embodiment of the present application further provides a resource scheduling method. The resource scheduling system provided by the first aspect of the embodiment of the application can use the resource scheduling method to manage cloud resources in the cloud resource pool managed by the resource scheduling system. The implementation procedure of the resource scheduling method is described below. Fig. 2 is a flowchart of a resource scheduling method according to the present embodiment. As shown in fig. 2, the resource scheduling method may include the steps of:
step 201, the offline scheduling node confirms a first cloud resource to be reallocated to a first host of a first instance.
The offline scheduling node can determine whether cloud resources of the first instance need to be reallocated according to the allocation situation of the cloud resources in the cloud resource pool managed by the resource scheduling system. When cloud resources needing to be reallocated to the first instance are determined, first cloud resources on a first host needing to be reallocated to the first instance are determined. Optionally, the offline scheduling node may obtain information for measuring resource allocation conditions, such as performance hot spots, resource fragmentation rate, energy consumption, resource health, and the like, of cloud resources in the cloud resource pool managed by the resource scheduling system, and determine that the cloud resources need to be reallocated to the first instance when the information for measuring resource allocation conditions indicates that the resource allocation needs to be improved.
After determining that resources need to be reassigned to the first instance, the offline scheduling node may calculate a relocation benefit of relocation the first instance to one or more unoccupied cloud resources in the resource assignment system, and determine resources that need to be reassigned to a host of the first instance according to the relocation benefit. For example, after determining that resources need to be reallocated to the first instance, the offline scheduling node calculates a relocation benefit of migrating the first instance to an unoccupied cloud resource, and when the relocation benefit is greater than a benefit threshold, the offline scheduling node may determine that the resources needing to be reallocated to the first instance are the unoccupied cloud resource. Wherein, the benefit of the relocation is used to reflect the benefit of relocation.
It should be noted that, when performing offline scheduling on a created instance, an offline scheduling node typically performs batch scheduling on a plurality of created instances. Thus, after determining that the plurality of created instances need to be scheduled offline, a preset resource allocation algorithm (e.g., a heuristic algorithm) may be used to allocate resources for the plurality of created instances. And in the process of carrying out resource allocation on the plurality of created instances, an instance relocation sequence can be generated, and relocation benefits of relocation of each created instance are calculated according to information indicated by the instance relocation sequence, and when the relocation benefits of any created instance are larger than a relocation threshold value, it is determined that the created instance can be relocated according to the indication of the instance relocation sequence. Wherein the instance relocation sequence indicates a relocation order of the plurality of created instances and resources allocated to each created instance before and after relocation.
Optionally, the implementation manner of calculating the relocation benefit of each created instance may include respectively obtaining the allocation balance degree of cloud resources in the resource pool managed by the resource allocation system before and after relocation, and determining the relocation benefit according to the allocation balance degree of cloud resources on the host after relocation and the allocation balance degree of cloud resources on the host before relocation. In one implementation, the relocation benefit G may be equal to the difference between the cloud resource allocation equalization level θ1 on the host after relocation and the cloud resource allocation equalization level θ2 on the host before relocation, i.e. g=θ1- θ2.
In one implementation, the degree of balance of cloud resources in the resource pool managed by the resource allocation system at a certain moment can be calculated according to the resource allocation condition of the cloud resources in the resource pool managed by the resource allocation system at the certain moment. The calculation process comprises the steps of obtaining an allocated proportion vector which represents the allocated proportion of various types of cloud resources in a cloud resource in a resource pool at the moment, obtaining all 1 vectors which are identical to the allocated proportion vector in dimension and have the modulus of each vector dimension of 1, and then calculating cosine included angles between the allocated proportion vector and the all 1 vectors by using a cosine formula, wherein the cosine included angles are the allocation equilibrium degree of the cloud resources in the resource pool at the moment.
The realization process of obtaining the allocated proportion vector representing the allocated proportion of the cloud resources of various types in the cloud resources in the resource pool at the moment comprises the steps of obtaining the allocated proportion of the cloud resources of various types in the cloud resources in the resource pool at the moment, and then taking the allocated proportion of the cloud resources of various types at the moment as a module of vector dimensions used for representing the cloud resources of corresponding types in the allocated proportion vector so as to obtain the allocated proportion vector. Alternatively, the allocated proportion of any type of cloud resource at that time may be calculated by first calculating the ratio of the total amount of the cloud resource that can be issued for that type of cloud resource at that time to the total amount of the cloud resource for that type of cloud resource, and then determining the difference of 1 and the ratio as the allocated proportion of the cloud resource for that type of cloud resource at that time.
Step 202, an offline scheduling node requests the online scheduling node for the use right of the first cloud resource on the first host.
Wherein the first instance is a created instance.
After the offline scheduling node confirms the first cloud resources on the first host computer to be reassigned to the first instance, the online scheduling node can apply the use rights of the first cloud resources on the first host computer to the online scheduling node so as to obtain the use rights of the first cloud resources on the first host computer and assign the first cloud resources on the first host computer to the first instance.
It should be noted that, if an instance relocation sequence is generated in the process of allocating resources to the multiple created instances, since the instance relocation sequence indicates the relocation sequence of the multiple created instances, when applying the usage rights of the first cloud resources on the first host to the online scheduling node, the offline scheduling node may sequentially apply, according to the sequence specified by the instance relocation instance, the online scheduling node for the cloud resources corresponding to the hosts to be allocated to the corresponding instances. Or the offline scheduling node can sequentially apply cloud resources which are required to be allocated to the host computers of the corresponding examples to the online scheduling node according to the sequence of the movement benefits of the plurality of examples in the example movement sequence from large to small, so that the examples with larger benefits can be preferentially moved under the condition of limited resources, and the optimal configuration of the resources can be maximally realized.
Step 203, the online scheduling node receives an online scheduling request for requesting to allocate cloud resources to the second instance.
Wherein the second instance is an instance to be created.
When the user needs to create the second instance in the cloud platform, an instance creation request is sent to the cloud platform to request the creation of the second instance in the cloud platform. Since an instance needs to rely on cloud resource creation, the instance creation request also requests that cloud resources be allocated to the second instance in order to create the second instance from the allocated cloud resources. And after the cloud platform receives the instance creation request, sending an online scheduling request to an online scheduling node to request the online scheduling node to schedule cloud resources for the second instance.
Step 204, the online dispatching node confirms the second cloud resource to be distributed to the first host of the second instance according to the online dispatching request.
The instance creation request carries performance parameters of the second instance to be created so as to indicate the performance which needs to be met by the second instance to be created, and the specification of cloud resources required for creating the second instance can be determined according to the performance parameters. When the cloud platform sends an online dispatching request to an online dispatching node, the specification is sent to the online dispatching node. The online scheduling node can select cloud resources meeting the specification from cloud resources in a cloud resource pool managed by the resource scheduling system according to the specification, so as to obtain cloud resources to be allocated to a second instance to be created, namely, obtain second cloud resources on a first host of the second instance to be allocated.
In one implementation, the management of the cloud resource usage rights on the host by the online scheduling node may be implemented through a resource information table. The resource information table at least records the occupation state of cloud resources on the host. When the occupied state of the cloud resource to be allocated indicated by the resource information table is occupied, the cloud resource is indicated to have resource conflict. Correspondingly, when the online scheduling node receives a request of the offline scheduling node for requesting the use right of the first cloud resource on the first host, the online scheduling node queries the occupancy state of the first cloud resource on the first host in the resource information table, and determines that the first cloud resource on the first host has resource conflict when the occupancy state of the first cloud resource on the first host is occupied, or determines that the first cloud resource on the first host does not have resource conflict when the occupancy state of the first cloud resource on the first host is unoccupied. After receiving the online scheduling request requesting to allocate cloud resources to the second instance, the online scheduling node determines cloud resources to be allocated to the host of the second instance from cloud resources on all hosts whose occupied states are unoccupied and recorded in the resource information table.
And, the resource information table may be maintained by an online scheduling node. In one implementation, the online scheduling node may update the occupancy state of the cloud resources on the host in the resource information table when the occupancy state of the cloud resources on its management host changes. Therefore, after determining the second cloud resource to be allocated to the first host of the second instance, the online scheduling node can mark the occupancy state of the second cloud resource on the first host as occupied so as to ensure the accuracy of the information recorded in the resource information table and ensure the effective scheduling of the cloud resource.
Further, as cloud resources in the cloud resource pool managed by the resource scheduling system are uniformly scheduled by the online scheduling node, the offline scheduling node cannot know the occupation state of all cloud resources in the cloud resource pool managed by the resource scheduling system according to the scheduling condition of the offline scheduling node on the cloud resources on the host. Therefore, the online scheduling node can also send the resource information table to the offline scheduling node, so that the offline scheduling node can know the occupation state of all cloud resources in the cloud resource pool managed by the resource scheduling system according to the resource information table.
The implementation manner of sending the resource information table to the offline scheduling node by the online scheduling node can be determined according to the application requirement, and the embodiment of the application is not particularly limited. For example, the online scheduling node may send the full amount information of the resource information table to the offline scheduling node each time. Or the online scheduling node can also send the full information of the resource information table to the offline scheduling node for the first time, and in the subsequent transmission process, the incremental information of the resource information table relative to the last transmission process is sent to the offline scheduling node. Moreover, the time for the online scheduling node to send the resource information table to the offline scheduling node can be determined according to the application requirement, and the embodiment of the application does not limit the time specifically. For example, an online scheduling node may send a resource information table to the offline scheduling node each time information in the resource information table changes. Or the online scheduling node may periodically send the resource information table to the offline scheduling node. Or the online scheduling node may send the resource information table to the offline scheduling node when receiving the resource information table acquisition request sent by the offline scheduling node.
Optionally, because the offline scheduling node determines that cloud resources on the host computer need to be allocated to the created instance from cloud resources on unoccupied host computers, the resource information table recorded in the offline scheduling node may only include cloud resources on all unoccupied host computers. Accordingly, the online dispatching node may send only cloud resources on unoccupied hosts to the offline dispatching node, so that the offline dispatching node updates cloud resources on unoccupied hosts recorded by the offline dispatching node.
Note that, since the resource information table describes the occupancy state of the cloud resource on the host, that is, describes the correspondence between the cloud resource on the host and the occupancy state of the cloud resource, in the embodiment of the present application, the name is referred to as a resource information table, but the name does not limit the data representation form of the correspondence to a table form, as long as the data representation form of the correspondence can represent the correspondence described in the resource information table.
Step 205, the online dispatching node confirms whether resource conflict exists between the first cloud resource and the second cloud resource on the first host.
After the online scheduling node receives a request of requesting the offline scheduling node for the use right of the first cloud resource on the first host, the online scheduling node can judge whether the first cloud resource on the first host conflicts with the second cloud resource on the first host which needs to be allocated to the second instance by the online scheduling node, and decide whether to provide the offline scheduling node with the use right of the first cloud resource on the first host according to whether the first cloud resource and the second cloud resource on the first host conflict, so that the second cloud resource on the first host can be successfully allocated to the second instance. Wherein, when there is a conflict between the first cloud resource on the first host and the second cloud resource on the first host, step 206 is performed. Step 208 is performed when there is no conflict between the first cloud resource on the first host and the second cloud resource on the first host.
The online scheduling node records a resource information table, the resource information table at least indicates the occupation state of cloud resources in a cloud resource pool managed by the resource scheduling system, and when the online scheduling node determines that second cloud resources on the first host need to be allocated to the second instance, the occupation state of the second cloud resources on the first host is modified to be occupied. And if there is a resource conflict between the first cloud resource on the first host and the second cloud resource on the first host, when the occupation state of the second cloud resource on the first host is modified to be occupied, the first cloud resource on the first host is also marked as occupied. Therefore, the online scheduling node can query the occupancy state of the first cloud resource on the first host in the resource information table to determine whether a resource conflict exists between the first cloud resource on the first host and the second cloud resource on the first host. And when the occupation state of the first cloud resource on the first host is unoccupied, determining that the first cloud resource on the first host and the second cloud resource on the first host have resource conflict, and when the occupation state of the first cloud resource on the first host is unoccupied, determining that the first cloud resource on the first host and the second cloud resource on the first host do not have resource conflict.
In step 206, the online scheduling node refuses to provide the offline scheduling node with the usage right of the first cloud resource on the first host when confirming that the first cloud resource and the second cloud resource have resource conflict on the first host.
When the first cloud resource and the second cloud resource have resource conflict on the first host, if the offline scheduling node is provided with the use right of the first cloud resource, the offline scheduling node and the online scheduling node contend for the cloud resource, and if the offline scheduling node contends for the cloud resource and can cause the online scheduling node to schedule failure, the creation process of the second instance can be affected. Therefore, in order to ensure the creation efficiency of the second instance, the online scheduling node may refuse to provide the offline scheduling node with the usage right of the first cloud resource on the first host to prioritize the use of the cloud resource for the second instance, if it is confirmed that the first cloud resource and the second cloud resource have resource conflicts on the first host.
Step 207, after the offline scheduling node is refused, reconfirming the third cloud resources on the second host computer to be allocated to the first instance, and requesting the online scheduling node for the usage rights of the third cloud resources on the second host computer.
After the offline scheduling node applies for the use right of the cloud resource on the host computer to the online scheduling node, if the online scheduling node refuses to provide the offline scheduling node with the cloud resource on the host computer requested by the offline scheduling node, the offline scheduling node can redetermine the cloud resource on the host computer to be allocated to the first instance, and request the online scheduling node for the use right of the cloud resource on the host computer again until the application stopping condition is reached. Alternatively, the application stopping condition may be determined according to the application requirement, which is not specifically limited in the embodiment of the present application. For example, the application stop condition may indicate that, after the offline scheduling node repeatedly applies for cloud resources on the host for the same instance for a preset number of failures, the online scheduling node stops applying for cloud resources on the host allocated to the instance. Or the application stopping condition may obtain, for the offline scheduling node, a right of use of the cloud resource on the host requested by the offline scheduling node. The implementation process of step 207 is referred to as the implementation process of step 201, and will not be described herein.
Step 208, the online scheduling node provides the offline scheduling node with the usage right of the first cloud resource on the first host under the condition that the first cloud resource and the second cloud resource are confirmed to have no resource conflict on the first host.
When the first cloud resource and the second cloud resource do not have resource conflict on the first host, the second instance is not required to use the first cloud resource on the first host, the offline scheduling node uses the first cloud resource and cannot influence the creation of the second instance, and then the online scheduling node can provide the offline scheduling node with the use right of the first cloud resource on the first host.
Illustratively, as shown in fig. 3, the cloud resources in the cloud resource pool managed by the resource scheduling system include cloud resources on hosts PM1 to PM4, and black filling in fig. 3 indicates that the cloud resources are occupied, and white filling indicates that the cloud resources are unoccupied. After receiving the online scheduling request for requesting to create the second instance, the online scheduling node confirms that the cloud resource to be allocated to the second instance is the cloud resource on the host PM1 according to the online scheduling request. When the offline scheduling node has the defragmentation requirement, the cloud resource to be allocated to the first instance is confirmed to be the cloud resource on the host PM2, and after the cloud resource is confirmed, the offline scheduling node applies the online scheduling node for the use right of the cloud resource on the host PM 2. After receiving the request of the offline scheduling node, the online scheduling node determines that the cloud resources on the host PM2 and the cloud resources on the host PM1 have no resource conflict, and allocates the use right for providing the cloud resources on the host PM2 to the offline scheduling node.
In addition, in order to ensure the accuracy of the information recorded in the resource information table, after the online scheduling node provides the offline scheduling node with the use right of the first cloud resource on the first host, the occupancy state of the first cloud resource on the first host may be marked as occupied in the resource information table.
Step 209, the offline scheduling node allocates a first cloud resource on the first host to the first instance.
After the offline scheduling node obtains the use right of the first cloud resource on the first host, the first cloud resource on the first host can be allocated to the first instance, so that the first instance can be conveniently moved to the first cloud resource on the first host.
And after the offline scheduling node determines the cloud resources scheduled to the first instance, when the offline scheduling node needs to determine the cloud resources scheduled to other instances, the occupancy state of the cloud resources scheduled to the first instance may not be updated yet in the resource information table recorded by the offline scheduling node. At this time, in order to avoid the conflict between the cloud resources scheduled by the offline scheduling node to other instances and the cloud resources scheduled to the first instance, the offline scheduling node may update the occupancy state of the cloud resources scheduled to the first instance to occupancy in the resource information table recorded by the offline scheduling node after determining the cloud resources scheduled to the first instance. For example, after the online scheduling node provides the offline scheduling node with the usage right of the cloud resource scheduled to the first instance, if the offline scheduling node allocates the cloud resource to the first instance, the offline scheduling node may mark, in the resource information table recorded by the offline scheduling node, an occupancy state of the cloud resource allocated to the first instance as occupied. Therefore, the condition that the offline scheduling node generates resource conflict to cloud resources scheduled by different created examples can be avoided, and further the scheduling efficiency of offline scheduling is guaranteed.
Optionally, in order to ensure orderly execution of resource scheduling, the online scheduling node may set an effective duration of the cloud resource usage right, and when the cloud resource is not used within the effective duration, the online scheduling node may reallocate the cloud resource. The effective duration may be set according to the application requirements, for example, the effective duration may be 10 minutes.
If an instance relocation sequence is generated in the process of allocating resources to the multiple created instances, because the instance relocation sequence indicates the relocation sequence of the multiple created instances, the multiple instances to be relocated related to the relocation sequence can be relocated in turn according to the sequence indicated by the relocation sequence or according to the sequence from big to small in relocation benefit corresponding to the multiple instances in the instance relocation sequence, and if cloud resources needing to be allocated to a certain instance to be relocated by an offline scheduling node and cloud resources needing to be allocated to the instance to be created by an online scheduling node conflict with each other, the multiple instances to be relocated are abandoned to be relocated according to the sequence.
And, the relocation operation of the instance to be relocated can be executed according to the state of the instance to be relocated. After the offline scheduling node generates the relocation sequence, the state of each to-be-relocated instance in the relocation sequence can be modified into a preparation (preparation) state, when the use right of the cloud resources to be allocated to the to-be-relocated instance is acquired, the state of the to-be-relocated instance is modified into a STANDBY (STANDBY) state, and when the online scheduling node refuses to provide the use right of the cloud resources to be allocated to the to-be-relocated instance to the offline scheduling node, the state of the to-be-relocated instance is modified into a SKIP (SKIP) state. When the relocation operation is executed on the instance to be relocated, the instance to be relocated with the complete state can be relocated, and the relocation of the instance to be relocated with the skipped state is abandoned. In addition, in the relocation process, the identification number of the instance relocated to the reallocated resource can be reset, for example, the identification number of the instance to be relocated is modified to be the sum of the identification number of the instance to be relocated and the random number, after relocation is completed, the instance before relocation is deleted, and then the identification number of the instance after relocation is modified to be the identification number of the instance before relocation, so as to complete the update of the instance in the system.
In summary, in the resource management method provided by the embodiment of the present application, the online scheduling node uniformly manages the usage rights of cloud resources in the cloud resource pool managed by the resource scheduling system, when the offline scheduling node needs to use the cloud resources on the host, the online scheduling node needs to request the usage rights of the cloud resources on the host, and when the online scheduling node refuses to provide the offline scheduling node with the usage rights of the cloud resources on the host, the offline scheduling node cannot use the cloud resources on the host. In this way, the situation that the online scheduling node and the offline scheduling node have resource conflict in the use of cloud resources on the host can be avoided, the resource scheduling system can be used for effectively scheduling the cloud resources on the host, the creation efficiency of an instance to be created is guaranteed, and the user experience of the cloud platform is effectively improved. In addition, the use right of cloud resources in the cloud resource pool managed by the online node resource scheduling system is not required to be introduced into the resource scheduling system, and the additional expense caused by introducing the third party component can be reduced.
It should be noted that, the resource management method provided by the present application is not limited to be used in the resource scheduling scenario of the instance, but may be used in other hybrid scheduling systems requiring the use of a unified scheduling unit as a resource decision module, which is not specifically limited by the embodiment of the present application.
It should be further noted that, the sequence of the steps of the resource scheduling method provided in the embodiment of the present application may be appropriately adjusted, and the steps may also be correspondingly increased or decreased according to the situation, so any method that is easily conceivable to be changed by those skilled in the art within the technical scope of the present disclosure should be covered within the protection scope of the present disclosure, and therefore will not be described in detail.
In a third aspect of the embodiment of the present application, the embodiment of the present application further provides an online scheduling node. The online scheduling node is used for receiving an online scheduling request for requesting to allocate cloud resources to a second instance, confirming the second cloud resources on a first host computer to be allocated to the second instance according to the online scheduling request, and refusing to provide the offline scheduling node with the use rights of the first cloud resources on the first host computer under the condition that the first cloud resources and the second cloud resources are confirmed to have resource conflict on the first host computer, wherein the second instance is an instance to be created.
Optionally, the online scheduling node is further configured to provide, to the offline scheduling node, a right to use the first cloud resource on the first host, if it is confirmed that the first cloud resource and the second cloud resource do not have a resource conflict on the first host.
Optionally, the online scheduling node records a resource information table of cloud resources in a cloud resource pool managed by the resource scheduling system, and the resource information table at least indicates an occupation state of the cloud resources. Correspondingly, the online scheduling node is further configured to mark, in the resource information table, an occupancy state of the first cloud resource on the first host as occupied after providing the offline scheduling node with the usage right of the first cloud resource on the first host.
And the online scheduling node is also used for sending the resource information table to the offline scheduling node.
In summary, the online scheduling node provided by the embodiment of the application can uniformly manage the use right of the cloud resources in the cloud resource pool managed by the resource scheduling system, and when the offline scheduling node needs to use the cloud resources on the host, the online scheduling node needs to request the use right of the cloud resources on the host. And when the online scheduling node refuses to provide the offline scheduling node with the use right of the cloud resource on the host, the offline scheduling node cannot use the cloud resource on the host. Therefore, the situation that the online scheduling node and the offline scheduling node conflict resources in use of cloud resources on the host can be avoided, and the resource scheduling system can be guaranteed to effectively schedule the cloud resources on the host.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the online scheduling node described above may refer to the working process of the online scheduling node in the resource scheduling system provided in the first aspect and the resource scheduling method provided in the second aspect, which are not described herein again.
In a fourth aspect of the embodiment of the present application, the embodiment of the present application further provides an offline scheduling node. The offline scheduling node is used for confirming first cloud resources on a first host computer to be reassigned to a first instance, and requesting the online scheduling node for the use right of the first cloud resources on the first host computer, wherein the first instance is a created instance.
Optionally, the offline scheduling node is further configured to reconfirm the third cloud resource on the second host that needs to be allocated to the first instance after the usage right is denied, and request the usage right of the third cloud resource on the second host from the online scheduling node.
Optionally, the offline scheduling node is further configured to allocate the first cloud resource on the first host to the first instance after the online scheduling node provides the offline scheduling node with the usage right of the first cloud resource on the first host, and mark, in the resource information table recorded by the offline scheduling node, an occupancy state of the first cloud resource on the first host as occupied. The resource information table at least indicates the occupancy state of the cloud resource.
In summary, when the offline scheduling node provided by the embodiment of the present application needs to use the cloud resources on the host, the offline scheduling node needs to request the online scheduling node for the usage rights of the cloud resources on the host. And when the online scheduling node refuses to provide the offline scheduling node with the use right of the cloud resource on the host, the offline scheduling node cannot use the cloud resource on the host. Therefore, the situation that the online scheduling node and the offline scheduling node conflict resources in use of cloud resources on the host can be avoided, and the resource scheduling system can be guaranteed to effectively schedule the cloud resources on the host.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the offline scheduling node described above may refer to the working process of the offline scheduling node in the resource scheduling system provided in the first aspect and the resource scheduling method provided in the second aspect correspondingly, which are not described herein again.
In a fifth aspect of the embodiment of the present application, the embodiment of the present application further provides a resource scheduling system. As shown in fig. 1, the resource scheduling system comprises an online scheduling node 02 and an offline scheduling node 01. The offline scheduling node 01 and the online scheduling node 02 establish a communication connection. The online scheduling node 02 is configured to receive an online scheduling request requesting to allocate cloud resources to a second instance, confirm, according to the online scheduling request, the second cloud resources on a first host that need to be allocated to the second instance, and request, to the offline scheduling node 01, a right of use of the second cloud resources on the first host, where the second instance is an instance to be created. The offline scheduling node 01 is configured to confirm that a first cloud resource needs to be reallocated to a first host of a first instance, and refuse to provide, to the online scheduling node 02, a usage right of a second cloud resource on the first host when confirming that the first cloud resource and the second cloud resource have a resource conflict on the first host, where the first instance is a created instance.
In the resource scheduling system provided by the application, the offline scheduling node 01 uniformly manages the use right of cloud resources in the cloud resource pool managed by the resource scheduling system, when the online scheduling node 02 needs to use cloud resources on a host, the offline scheduling node 01 needs to request the use right of the cloud resources on the host, and when the offline scheduling node 01 refuses to provide the use right of the cloud resources on the host to the online scheduling node 02, the online scheduling node 02 cannot use the cloud resources on the host. In this way, the situation that the online scheduling node 02 and the offline scheduling node 01 have resource conflict in the use of cloud resources on the host can be avoided, and the resource scheduling system can be guaranteed to effectively schedule the cloud resources on the host. In addition, through the use right of cloud resources in the cloud resource pool managed by the offline scheduling node 01 resource scheduling system, no additional third party component is required to be introduced into the resource scheduling system, and the additional overhead caused by the introduction of the third party component can be reduced.
Optionally, the online dispatching node 02 is further configured to reconfirm the third cloud resource on the second host to be allocated to the second instance after the usage right is denied, and request the offline dispatching node 01 for the usage right of the third cloud resource on the second host.
Optionally, the offline scheduling node 01 is further configured to provide, to the online scheduling node 02, a right to use the second cloud resource on the first host, if it is confirmed that the first cloud resource and the second cloud resource do not have a resource conflict on the first host.
Optionally, the offline scheduling node 01 records a resource information table of cloud resources in a cloud resource pool managed by the resource scheduling system, where the resource information table at least indicates an occupancy state of the cloud resources.
Optionally, the offline scheduling node 01 is further configured to mark, in the resource information table, an occupancy state of the second cloud resource on the first host as occupied after providing the online scheduling node 02 with the usage right of the second cloud resource on the first host.
Optionally, the offline scheduling node 01 is further configured to send a resource information table to the online scheduling node 02.
Optionally, the online scheduling node 02 is further configured to allocate the second cloud resource on the first host to the second instance after the offline scheduling node 01 provides the usage right of the second cloud resource on the first host to the online scheduling node 02, and mark, in a resource information table recorded by the online scheduling node 02, an occupied state of the second cloud resource on the first host as occupied, where the resource information table at least indicates the occupied state of the cloud resource.
As described above, in the resource scheduling system according to the fifth aspect, the offline scheduling node uniformly manages scheduling of cloud resources in the cloud resource pool managed by the resource scheduling system. The principle of the offline scheduling node for implementing unified management in the resource scheduling system is basically the same as the principle of the online scheduling node for implementing unified management in the resource scheduling system provided by the first aspect and the resource scheduling method provided by the second aspect, and the principle of the online scheduling node for being managed in the resource scheduling system is basically the same as the principle of the offline scheduling node for being managed in the resource scheduling system provided by the first aspect and the resource scheduling method provided by the second aspect. In the resource scheduling system provided in the fifth aspect, the specific working process of the offline scheduling node may be referred to correspondingly in the resource scheduling system provided in the first aspect and the working process of the online scheduling node in the resource scheduling method provided in the second aspect, and the specific working process of the online scheduling node may be referred to correspondingly in the resource scheduling system provided in the first aspect and the working process of the offline scheduling node in the resource scheduling method provided in the second aspect, which are not described herein again.
In a sixth aspect of the embodiment of the present application, the embodiment of the present application further provides a resource scheduling method. The resource scheduling system provided by the fifth aspect of the embodiment of the present application can use the resource scheduling method to manage cloud resources in the cloud resource pool managed by the resource scheduling system. The implementation procedure of the resource scheduling method is described below. Fig. 4 is a flowchart of a resource scheduling method provided in this embodiment. As shown in fig. 4, the resource scheduling method may include the steps of:
Step 401, the online scheduling node receives an online scheduling request for requesting to allocate cloud resources to the second instance.
Wherein the second instance is an instance to be created. The implementation process of this step 401 is referred to as the implementation process of step 203, and will not be described herein.
Step 402, the online dispatching node confirms the second cloud resource to be distributed to the first host of the second instance according to the online dispatching request.
The implementation process of step 402 refers to the implementation process of step 204, and will not be described herein.
Step 403, the online dispatching node requests the offline dispatching node for the use right of the second cloud resource on the first host.
The implementation process of step 403 refers to the implementation process of step 202, which is not described herein.
Step 404, the offline scheduling node confirms the first cloud resource to be reallocated to the first host of the first instance.
Wherein the first instance is a created instance. The implementation process of step 404 refers to the implementation process of step 201, and will not be described herein.
Step 405, the offline scheduling node confirms whether resource conflict exists between the first cloud resource and the second cloud resource on the first host.
Wherein, when there is a conflict between the first cloud resource on the first host and the second cloud resource on the first host, step 406 is performed. Step 408 is performed when there is no conflict between the first cloud resource on the first host and the second cloud resource on the first host. The implementation process of step 405 refers to the implementation process of step 205, which is not described herein.
In one implementation, the offline scheduling node may manage the cloud resource usage rights on the host through a resource information table. The resource information table at least records the occupation state of cloud resources on the host. The specific implementation manner of the resource information table and the implementation manner of the offline scheduling node for managing cloud resources according to the resource information table may correspond to the corresponding descriptions in the resource scheduling system provided in the first aspect and the resource scheduling method provided in the second aspect, which are not repeated herein.
In addition, as cloud resources in the cloud resource pool managed by the resource scheduling system are uniformly scheduled by the offline scheduling node, the online scheduling node cannot know the occupation state of all cloud resources in the cloud resource pool managed by the resource scheduling system according to the scheduling condition of the online scheduling node on the cloud resources on the host. Therefore, the resource scheduling method further comprises the step that the offline scheduling node sends a resource information table to the online scheduling node. Moreover, the implementation manner of sending the resource information table to the online scheduling node by the offline scheduling node may refer to the corresponding description in the resource scheduling method provided in the foregoing second aspect, which is not described herein again.
In step 406, the offline scheduling node refuses to provide the online scheduling node with the usage right of the second cloud resource on the first host when confirming that the first cloud resource and the second cloud resource have resource conflict on the first host.
The implementation process of step 406 refers to the implementation process of step 206, and will not be described herein.
Step 407, after the usage right is refused, the online scheduling node reconfirms the third cloud resource on the second host computer to be allocated to the second instance, and requests the offline scheduling node for the usage right of the third cloud resource on the second host computer.
The implementation process of step 407 refers to the implementation process of step 207, and will not be described herein.
In step 408, the offline scheduling node provides the online scheduling node with the usage right of the second cloud resource on the first host under the condition that it is confirmed that the first cloud resource and the second cloud resource do not have resource conflict on the first host.
The implementation process of step 408 refers to the implementation process of step 208, and will not be described herein.
Optionally, the offline scheduling node records a resource information table of cloud resources in a cloud resource pool managed by the resource scheduling system, and the resource information table at least indicates an occupation state of the cloud resources. Correspondingly, the resource scheduling method further comprises the step that after the offline scheduling node provides the online scheduling node with the use right of the second cloud resources on the first host, the offline scheduling node marks the occupation state of the second cloud resources on the first host as occupation in the resource information table.
Step 409, the online dispatching node allocates a second cloud resource on the first host to the second instance.
After the online scheduling node obtains the usage rights of the second cloud resources on the first host, the second cloud resources on the first host may be allocated to the second instance so as to create the second instance on the second cloud resources on the first host.
Optionally, after the online dispatching node allocates the second cloud resource on the first host to the second instance, the occupancy state of the second cloud resource on the first host may be marked as occupied in a resource information table recorded by the online dispatching node, where the resource information table indicates at least the occupancy state of the cloud resource.
In summary, in the resource scheduling method provided by the present application, the offline scheduling node uniformly manages the usage rights of cloud resources in the cloud resource pool managed by the resource scheduling system, when the online scheduling node needs to use the cloud resources on the host, the offline scheduling node needs to request the usage rights of the cloud resources on the host, and when the offline scheduling node refuses to provide the usage rights of the cloud resources on the host to the online scheduling node, the online scheduling node cannot use the cloud resources on the host. Therefore, the situation that the online scheduling node and the offline scheduling node conflict resources in use of cloud resources on the host can be avoided, and the resource scheduling system can be guaranteed to effectively schedule the cloud resources on the host. In addition, through the use right of cloud resources in the cloud resource pool managed by the offline scheduling node resource scheduling system, no additional third party component is required to be introduced into the resource scheduling system, and the additional overhead caused by the introduction of the third party component can be reduced.
It should be noted that, the sequence of the steps of the resource scheduling method provided by the embodiment of the application can be properly adjusted, and the steps can be correspondingly increased or decreased according to the situation. Any method that can be easily conceived by those skilled in the art within the technical scope of the present disclosure should be covered in the protection scope of the present application, and thus will not be repeated.
In a seventh aspect of the embodiment of the present application, the embodiment of the present application further provides an online scheduling node. The online scheduling node is used for receiving an online scheduling request for requesting to allocate cloud resources to a second instance, confirming the second cloud resources on a first host computer to be allocated to the second instance according to the online scheduling request, and requesting the offline scheduling node for the use rights of the second cloud resources on the first host computer, wherein the second instance is an instance to be created.
Optionally, the online scheduling node is further configured to reconfirm the third cloud resource on the second host to be allocated to the second instance after the usage right is denied, and request the offline scheduling node for the usage right of the third cloud resource on the second host.
Optionally, the online scheduling node is further configured to allocate the second cloud resource on the first host to the first instance after the offline scheduling node provides the online scheduling node with the usage right of the second cloud resource on the first host, and mark the occupancy state of the second cloud resource on the first host as occupied in a resource information table recorded by the online scheduling node, where the resource information table at least indicates the occupancy state of the cloud resource.
In summary, when the online scheduling node provided by the embodiment of the present application needs to use the cloud resources on the host, the online scheduling node needs to request the offline scheduling node for the usage rights of the cloud resources on the host. And when the offline scheduling node refuses to provide the online scheduling node with the use right of the cloud resource on the host, the online scheduling node cannot use the cloud resource on the host. Therefore, the situation that the online scheduling node and the offline scheduling node conflict resources in use of cloud resources on the host can be avoided, and the resource scheduling system can be guaranteed to effectively schedule the cloud resources on the host.
From the above, the principle that the online scheduling node provided in the seventh aspect is managed in the resource scheduling system is substantially the same as the principle that the offline scheduling node is managed in the resource scheduling system provided in the first aspect and the resource scheduling method provided in the second aspect. It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the online scheduling node provided in the seventh aspect may refer to the working process of the offline scheduling node in the resource scheduling system provided in the first aspect and the resource scheduling method provided in the second aspect, which are not described herein again.
In an eighth aspect of the embodiment of the present application, the embodiment of the present application further provides an offline scheduling node. The offline scheduling node is used for confirming first cloud resources on a first host computer to be redistributed to a first instance, and under the condition that the first cloud resources and second cloud resources are confirmed to have resource conflict on the first host computer, the online scheduling node is refused to provide the use right of the second cloud resources on the first host computer, wherein the first instance is an established instance.
Optionally, the offline scheduling node is further configured to provide, to the online scheduling node, a right to use the second cloud resource on the first host under a condition that it is confirmed that the first cloud resource and the second cloud resource do not have a resource conflict on the first host.
Optionally, the offline scheduling node records a resource information table of cloud resources in a cloud resource pool managed by the resource scheduling system, and the resource information table at least indicates an occupation state of the cloud resources.
Optionally, the offline scheduling node is further configured to mark, in the resource information table, an occupancy state of the second cloud resource on the first host as occupied after providing the online scheduling node with the usage right of the second cloud resource on the first host.
Optionally, the offline scheduling node is further configured to send a resource information table to the online scheduling node.
In summary, the offline scheduling node provided by the embodiment of the present application can uniformly manage the usage rights of cloud resources in the cloud resource pool managed by the resource scheduling system, and when the online scheduling node needs to use the cloud resources on the host, the offline scheduling node needs to request the usage rights of the cloud resources on the host. And when the offline scheduling node refuses to provide the online scheduling node with the use right of the cloud resource on the host, the online scheduling node cannot use the cloud resource on the host. Therefore, the situation that the online scheduling node and the offline scheduling node conflict resources in use of cloud resources on the host can be avoided, and the resource scheduling system can be guaranteed to effectively schedule the cloud resources on the host.
From the above, the principle of implementing unified management of the offline scheduling node in the resource scheduling system according to the eighth aspect is basically the same as the principle of implementing unified management of the online scheduling node in the resource scheduling system according to the first aspect and the online scheduling node in the resource scheduling method according to the second aspect. It will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the offline scheduling node provided in the eighth aspect may refer to the working process of the online scheduling node in the resource scheduling system provided in the first aspect and the resource scheduling method provided in the second aspect, which are not described herein again.
In a ninth aspect of the embodiment of the present application, the embodiment of the present application further provides a computer device. The online scheduling node provided in the third aspect of the embodiment of the present application may be deployed on the computer device. Fig. 5 exemplarily provides one possible architecture diagram of a computer device. As shown in fig. 5, the computer device 50 may include a processor 501, a memory 502, a communication interface 503, and a bus 504. In the computer device, the number of processors 501 may be one or more, only one of which processors 501 is illustrated in fig. 5. Alternatively, the processor 501 may be a central processing unit (Central Processing Unit, CPU). If the computer device has multiple processors 501, the multiple processors 501 may be of different types or may be the same. Optionally, multiple processors of the computer device may also be integrated as a multi-core processor.
Memory 502 stores computer instructions and data, and memory 502 may store computer instructions and data necessary to implement the functionality of the online scheduling node provided by the third aspect of the embodiment of the application. The Memory 502 may be any one or any combination of nonvolatile Memory (e.g., read-Only Memory (ROM)), solid state disk (Solid STATE DISK, SSD), hard disk (HARD DISK DRIVE, HDD), optical disk, etc., volatile Memory.
The communication interface 503 may be any one or any combination of a network interface (e.g., ethernet interface), a wireless network card, etc. having network access functionality.
The communication interface 503 is for the computer device to communicate data with other nodes or other computer devices.
Fig. 5 also schematically depicts a bus 504. Bus 504 may connect processor 501 with memory 502, communication interface 503. Thus, through bus 504, processor 501 may access memory 502 and may also utilize communication interface 503 for data interaction with other nodes or other computer devices.
In the present application, the online scheduling node provided in the third aspect of the embodiment of the present application may be implemented by a computer device executing computer instructions in the memory 502. For example, the computer device executing the computer instructions in memory 502 may perform the steps of receiving, by the online scheduling node, an online scheduling request requesting allocation of cloud resources to the second instance, confirming, based on the online scheduling request, a second cloud resource on the first host that needs to be allocated to the second instance, and refusing to provide, to the offline scheduling node, usage rights for the first cloud resource on the first host if it is confirmed that the first cloud resource conflicts with the second cloud resource on the first host. And, the implementation of the computer device to perform this step by executing the computer instructions in the memory 502 may be referred to correspondingly in the above embodiments.
In a tenth aspect of the embodiment of the present application, the embodiment of the present application further provides a computer device. The offline scheduling node provided in the fourth aspect of the embodiment of the present application may be deployed on the computer device. Fig. 6 exemplarily provides one possible architecture diagram of a computer device. As shown in fig. 6, the computer device 60 may include a processor 601, a memory 602, a communication interface 603, and a bus 604. In the computer device, the number of processors 601 may be one or more, only one of which processors 601 is illustrated in fig. 6. Alternatively, the processor 601 may be a central processing unit (Central Processing Unit, CPU). If the computer device has multiple processors 601, the types of the multiple processors 601 may be different or may be the same. Optionally, multiple processors of the computer device may also be integrated as a multi-core processor.
The memory 602 stores computer instructions and data, and the memory 602 may store computer instructions and data necessary to implement the functionality of the offline scheduling node provided by the fourth aspect of the embodiment of the present application. The Memory 602 may be any one or any combination of nonvolatile Memory (e.g., read-Only Memory (ROM)), solid state disk (Solid STATE DISK, SSD), hard disk (HARD DISK DRIVE, HDD), optical disk, etc., volatile Memory.
The communication interface 603 may be any one or any combination of a network interface (e.g., ethernet interface), a wireless network card, etc. having network access functionality.
The communication interface 603 is for the computer device to communicate data with other nodes or other computer devices.
Fig. 6 also schematically depicts a bus 604. A bus 604 may connect the processor 601 with the memory 602, the communication interface 603. Thus, through bus 604, processor 601 may access memory 602 and may also interact with other nodes or other computer devices using communication interface 603.
In the present application, the computer device executing the computer instructions in the memory 602 may implement the offline scheduling node provided in the fourth aspect of the embodiment of the present application. For example, the computer device executing the computer instructions in memory 602 may perform the steps of the offline scheduling node identifying a first cloud resource on a first host that needs to be reallocated to a first instance and requesting access to the first cloud resource on the first host from the online scheduling node. And, the implementation of the computer device to perform this step by executing the computer instructions in the memory 602 may be referred to correspondingly in the above embodiments.
In an eleventh aspect of the embodiment of the present application, the embodiment of the present application further provides a computer device. The online scheduling node provided in the seventh aspect of the embodiment of the application may be deployed on the computer device. Fig. 7 provides an exemplary illustration of one possible architecture for a computer device. As shown in fig. 7, the computer device 70 may include a processor 701, a memory 702, a communication interface 703, and a bus 704. In this computer device, the number of processors 701 may be one or more, only one of which processors 701 is illustrated in fig. 7. Alternatively, the processor 701 may be a central processing unit (Central Processing Unit, CPU). If the computer device has a plurality of processors 701, the types of the plurality of processors 701 may be different or may be the same. Optionally, multiple processors of the computer device may also be integrated as a multi-core processor.
The memory 702 stores computer instructions and data, and the memory 702 may store computer instructions and data required to implement the functionality of the online scheduling node provided by the seventh aspect of the embodiment of the application. The Memory 702 may be any one or any combination of nonvolatile Memory (e.g., read-Only Memory (ROM)), solid state disk (Solid STATE DISK, SSD), hard disk (HARD DISK DRIVE, HDD), optical disk, etc., volatile Memory.
The communication interface 703 may be any one or any combination of a network interface (e.g., ethernet interface), a wireless network card, etc. having network access functionality.
The communication interface 703 is used for data communication by the computer device with other nodes or other computer devices.
Fig. 7 also schematically depicts a bus 704. A bus 704 may connect the processor 701 with the memory 702 and the communication interface 703. Thus, through bus 704, processor 701 may access memory 702 and may also interact with other nodes or other computer devices using communications interface 703.
In the present application, the online scheduling node provided in the seventh aspect of the embodiment of the present application may be implemented by a computer device executing computer instructions in the memory 702. For example, a computer device executing computer instructions in memory 702 may perform the steps of an online scheduling node receiving an online scheduling request requesting allocation of cloud resources to a second instance, validating the second cloud resources on a first host to be allocated to the second instance according to the online scheduling request, and requesting usage rights of the second cloud resources on the first host from an offline scheduling node. And, the implementation of the computer device to perform this step by executing the computer instructions in the memory 702 may be referred to correspondingly in the above embodiments.
In a twelfth aspect of the embodiment of the present application, the embodiment of the present application further provides a computer device. The offline scheduling node provided in the eighth aspect of the embodiment of the present application may be deployed on the computer device. Fig. 8 provides an exemplary architecture diagram of one possible computer device. As shown in fig. 8, the computer device 80 may include a processor 801, a memory 802, a communication interface 803, and a bus 804. In this computer device, the number of processors 801 may be one or more, only one of which processors 801 is illustrated in fig. 8. Alternatively, the processor 801 may be a central processing unit (Central Processing Unit, CPU). If the computer device has multiple processors 801, the types of the multiple processors 801 may be different or may be the same. Optionally, multiple processors of the computer device may also be integrated as a multi-core processor.
Memory 802 stores computer instructions and data, and memory 802 may store computer instructions and data necessary to implement the functionality of an offline scheduling node provided in the eighth aspect of the embodiment of the present application. The Memory 802 may be any one or any combination of nonvolatile Memory (e.g., read-Only Memory (ROM)), solid state disk (Solid STATE DISK, SSD), hard disk (HARD DISK DRIVE, HDD), optical disk, etc., volatile Memory.
The communication interface 803 may be any one or any combination of a network interface (e.g., ethernet interface), a wireless network card, etc. having network access functionality.
The communication interface 803 is for the computer device to communicate data with other nodes or other computer devices.
Fig. 8 also schematically depicts a bus 804. Bus 804 may connect processor 801 with memory 802 and communication interface 803. Thus, through bus 804, processor 801 may access memory 802 and may also interact with other nodes or other computer devices using communication interface 803.
In the present application, the offline scheduling node provided in the eighth aspect of the embodiment of the present application may be implemented by a computer device executing computer instructions in the memory 802. For example, the computer device executing the computer instructions in the memory 802 may perform the steps of the offline scheduling node confirming that the first cloud resource needs to be reallocated to the first host of the first instance, and refusing to provide the online scheduling node with the right to use the second cloud resource on the first host if it is confirmed that the first cloud resource and the second cloud resource have a resource conflict on the first host. And, the implementation of the computer device to perform this step by executing the computer instructions in the memory 802 may be referred to correspondingly in the above embodiments.
In a thirteenth aspect of the embodiments of the present application, there is further provided a storage medium, which is a non-volatile computer readable storage medium, which when executed by a processor, implements the functionality of the online scheduling node as provided in the fifth aspect of the embodiments of the present application.
In a fourteenth aspect of the embodiments of the present application, there is also provided a storage medium, which is a non-volatile computer readable storage medium, that when executed by a processor, implements the functionality of the offline scheduling node as provided in the sixth aspect of the embodiments of the present application.
In a fifteenth aspect of the present embodiment, there is further provided a storage medium, which is a non-volatile computer readable storage medium, that when executed by a processor, implements the functionality of the online scheduling node as provided in the seventh aspect of the present embodiment.
In a sixteenth aspect of the present embodiment, there is further provided a storage medium, which is a non-volatile computer readable storage medium, which when executed by a processor, implements the functionality of the offline scheduling node as provided in the eighth aspect of the present embodiment.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, where the program may be stored in a computer readable storage medium, and the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
In embodiments of the present application, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. The term "at least one" means one or more, the term "plurality" means two or more, unless expressly defined otherwise.
The term "and/or" in the present application is merely an association relation describing the association object, and indicates that three kinds of relations may exist, for example, a and/or B may indicate that a exists alone, while a and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship.
The foregoing description of the preferred embodiments of the present application is not intended to limit the application, but is intended to cover any modifications, equivalents, alternatives, and improvements within the spirit and principles of the application.