Decentralized resource scheduling
Disclosed are various embodiments for distributed resource scheduling. An eviction request from a first host is received. The eviction request comprises data regarding a virtual machine to be migrated from the first host. The eviction request is then broadcast to a plurality of hosts. A plurality of responses are received from the plurality of hosts, each response comprising a score representing an ability of a respective one of the plurality of hosts to act as a new host for the virtual machine. A second host is selected from the plurality of hosts to act as the new host for the virtual machine based at least in part on the score in each of the plurality of responses. Then, a response is sent to the first host, the response containing an identifier of the second host.
1 . A system, comprising:
a computing device comprising a processor and a memory; and
machine-readable instructions stored in the memory that, when executed by the processor, cause the computing device to at least:
receive an eviction request from a first host of a plurality of hosts, the eviction request comprising data regarding a virtual machine executed on the first host;
broadcast the eviction request to the plurality of hosts;
receive at least one first response to the eviction request, the at least one first response received from at least one of the plurality of hosts to act as a new host for the virtual machine;
select a second host from the at least one of the plurality of hosts to act as the new host for the virtual machine;
send a second response to the first host, the second response identifying the second host; and
initiate migration of the virtual machine from the first host to the second host.
2 . The system of claim 1 , wherein the machine-readable instructions further cause the computing device to determine whether any of the plurality of hosts are available as the new host for the virtual machine based at least in part on the at least one first response.
3 . The system of claim 1 , wherein the at least one first response comprises a score representing an ability of a respective one of the plurality of hosts to act as the new host for the virtual machine, and the second host is selected based at least in part on the score.
4 . The system of claim 1 , wherein the eviction request is stored in a request queue stored in the memory of the computing device.
5 . The system of claim 1 , wherein the data regarding the virtual machine comprises an amount of memory allocated to the virtual machine.
6 . The system of claim 1 , wherein the data regarding the virtual machine comprises a central processor utilization (CPU) metric.
7 . The system of claim 1 , wherein:
the eviction request is generated in response to a resource utilization of the first host exceeding a predefined eviction threshold; and
initiating migration of the virtual machine comprises instructing a hypervisor executing on the first host to transfer a memory state of the virtual machine from the first host to the second host over a network.
8 . A method, comprising:
receiving an eviction request from a first host of a plurality of hosts, the eviction request comprising data regarding a virtual machine executed on the first host;
broadcasting the eviction request to the plurality of hosts;
receiving at least one first response to the eviction request, the at least one first response received from at least one of the plurality of hosts to act as a new host for the virtual machine;
selecting a second host from the at least one of the plurality of hosts to act as the new host for the virtual machine;
sending a second response to the first host, the second response identifying the second host; and
initiating migration of the virtual machine from the first host to the second host.
9 . The method of claim 8 , further comprising determining whether any of the plurality of hosts are available as the new host for the virtual machine based at least in part on the at least one first response.
10 . The method of claim 8 , wherein the at least one first response comprises a score representing an ability of a respective one of the plurality of hosts to act as the new host for the virtual machine, and selecting the second host is based at least in part on the score.
11 . The method of claim 8 , wherein the eviction request is stored in a request queue.
12 . The method of claim 8 , wherein the data regarding the virtual machine comprises an amount of memory allocated to the virtual machine.
13 . The method of claim 8 , wherein the data regarding the virtual machine comprises a central processor utilization (CPU) metric.
14 . The method of claim 8 , wherein:
the eviction request is generated in response to a resource utilization of the first host exceeding a predefined eviction threshold; and
initiating migration of the virtual machine comprises instructing a hypervisor executing on the first host to transfer a memory state of the virtual machine from the first host to the second host over a network.
15 . A non-transitory, computer readable medium that comprises machine-readable instructions that, when executed by a processor of a computing device, cause the computing device to at least:
receive an eviction request from a first host of a plurality of hosts, the eviction request comprising data regarding a virtual machine executed on the first host;
broadcast the eviction request to the plurality of hosts;
receive at least one first response to the eviction request, the at least one first response received from at least one of the plurality of hosts to act as a new host for the virtual machine;
select a second host from the at least one of the plurality of hosts to act as the new host for the virtual machine;
send a second response to the first host, the second response identifying the second host; and
initiate migration of the virtual machine from the first host to the second host.
16 . The non-transitory, computer readable medium of claim 15 , wherein the machine-readable instructions further cause the computing device to determine whether any of the plurality of hosts are available as the new host for the virtual machine based at least in part on the at least one first response.
17 . The non-transitory, computer readable medium of claim 15 , wherein the at least one first response comprises a score representing an ability of a respective one of the plurality of hosts to act as the new host for the virtual machine, and the second host is selected based at least in part on the score.
18 . The non-transitory, computer readable medium of claim 15 , wherein the data regarding the virtual machine comprises an amount of memory allocated to the virtual machine.
19 . The non-transitory, computer readable medium of claim 15 , wherein the data regarding the virtual machine comprises a central processor utilization (CPU) metric.
20 . The non-transitory, computer readable medium of claim 15 , wherein:
the eviction request is generated in response to a resource utilization of the first host exceeding a predefined eviction threshold; and
initiating migration of the virtual machine comprises instructing a hypervisor executing on the first host to transfer a memory state of the virtual machine from the first host to the second host over a network.