# US 2017/0251064 A1 · Method and device for scheduling resources

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2017/0251064 A1
- Document ID: US20170251064A1
- Status: Published application
- Kind: A1
- Application number: 15/443,920
- Filed: 2017-02-27
- Published: 2017-08-31
- Earliest claimed: 2016-02-29
- Assignees: Alibaba Group Holding Limited
- Applicants: Alibaba Group Holding Limited
- Inventors: Yu Xie; Huining Yan
- Web page: https://patentgrep.com/patent/US20170251064A1

## CPC

- H04L 67/148: Migration or transfer of sessions
- G06F 9/5088: {involving task migration}
- H04L 47/726: Reserving resources in multiple paths to be used simultaneously (by balancing the load H04L47/125)
- H04L 47/822: {Collecting or measuring resource availability data}
- H04L 47/826: {Involving periods of time}
- H04L 67/1008: based on parameters of servers, e.g. available memory or workload (monitoring of computer activity G06F11/30)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Disclosure method that includes traversing a user instance distribution of user instances of a user on hosts in a cluster to detect whether a trigger condition for user scheduling of adjustment of the user instance distribution is satisfied; migrating the user instance to be migrated out from the one or more hosts from which the user instances are to be migrated out to the one or more second hosts to which the one or more user instances are to be migrated in if the trigger condition for user scheduling is satisfied. The implementations of the present disclosure may schedule resources based on user instance distributions of users on hosts and achieve a balanced distribution of user instances. The implementations further avoid placing user instances of all users into a small number of hosts, increase the ability to prevent risks, and enhance the user experience.

## Claims

### Claim 1

A method for scheduling resources, the method comprising:
traversing a user instance distribution of user instances of a user on one or more hosts in a cluster;
detecting whether a trigger condition for user scheduling of adjustment of the user instance distribution is satisfied;
determining one or more first hosts from which one or more user instances are to be migrated out in response to determining that the trigger condition for user scheduling is satisfied, each of the one or more first hosts comprising at least one user instance to be migrated out; and
migrating the one or more user instances from the one or more first hosts to one or more second hosts to which the one or more user instances are to be migrated in.

### Claim 2 (depends on 1)

The method of claim 1, wherein the trigger condition for user scheduling comprises that the user instance distribution includes at least one user instance that is higher than a corresponding threshold information of user instance.

### Claim 3 (depends on 1)

The method of claim 1, wherein the trigger condition for user scheduling comprises that the user instance distribution includes at least one user instance of which deviation value is greater than a corresponding warning threshold information of user instance.

### Claim 4 (depends on 1)

The method of claim 1, wherein the trigger condition for user scheduling comprises that the user instance distribution includes at least one user instance that is greater than an upper limit of user instance equalization.

### Claim 5 (depends on 1)

The method of claim 1, wherein the migrating the one or more user instances from the one or more first hosts to the one or more second hosts comprises:
migrating, based on a priority descending order, the one or more user instances from the one or more first hosts to the one or more second hosts.

### Claim 6 (depends on 5)

The method of claim 5, further comprising:
determining the priority descending order based on at least one of:
quantity information of the one or more user instances to be migrated out;
equilibrium information among the user instances; and
resource consumption for the user instances.

### Claim 7 (depends on 1)

The method of claim 1, wherein the one or more second hosts comprise an idle host or a host that has capacity for a respective user instance to be migrated in and corresponds to the respective user instance.

### Claim 8 (depends on 1)

The method of claim 1, wherein the migrating the one or more user instances from the one or more first hosts to the one or more second hosts comprises:
migrating the one or more user instances from the one or more first hosts to the one or more second hosts based on a condition that a host resource consumption is not greater than a corresponding equilibrium expected threshold of resource consumption after the one or more second hosts accept the one or more user instance.

### Claim 9 (depends on 1)

The method of claim 1, further comprising:
detecting whether a deviation value of host resource is greater than a warning information of resource balance in response to determining that the trigger condition for user scheduling is not satisfied;
determining the one or more first hosts in response to determining that the deviation value of the host resource is greater than the warning information of resource balance; and
migrating the one or more user instances from the one or more first hosts to the one or more second hosts.

### Claim 10 (depends on 9)

The method of claim 9, wherein the migrating the one or more user instances from the one or more first hosts to the one or more second hosts comprises:
migrating the one or more user instances from the one or more first hosts to the one or more second hosts based on an order of resource consumption for user instances from high to low.

### Claim 11 (depends on 9)

The method of claim 9, wherein the migrating the one or more user instances from the one or more first hosts to the one or more second hosts n comprises:
migrating the one or more user instances from the one or more first hosts to the one or more second hosts when the user instances satisfy an equalization expectation of the user instances after the one or more user instances are migrated to the one or more second hosts.

### Claim 12

An apparatus for scheduling resources, the apparatus comprising:
a traversing module that traverses a user instance distribution of user instances of a user on one or more hosts in a cluster;
a user detection module that detects whether a trigger condition for user scheduling of adjustment of the user instance distribution is satisfied;
a user determination module that determines one or more first hosts from which one or more user instances are to be migrated out in response to determining the trigger condition for user scheduling is satisfied, each of the one or more first hosts comprising at least one user instance to be migrated out; and
a user migration module that migrates the one or more user instances from the one or more first hosts to one or more second hosts to which the one or more user instances are to be migrated in.

### Claim 13 (depends on 12)

The apparatus of claim 12, wherein the trigger condition for user scheduling comprises at least one of:
the user instance distribution includes at least one user instance that is higher than a corresponding threshold information of user instance;
the user instance distribution includes at least one user instance of which deviation value is greater than a corresponding warning threshold information of user instance; and
the user instance distribution includes at least one user instance that is greater than an upper limit of user instance equalization.

### Claim 14 (depends on 12)

The apparatus of claim 12, wherein the user migration module further migrates, based on a priority descending order, the one or more user instances from the one or more first hosts to the one or more second hosts.

### Claim 15 (depends on 14)

The apparatus of claim 14, wherein the apparatus further comprises:
a priority module that determines a priority of the one or more user instance based on at least one of:
quantity information of user instances to be migrated out;
equilibrium information among user instances; and
resource consumption for user instances.

### Claim 16 (depends on 12)

The apparatus of claim 12, wherein the one or more second hosts comprises an idle host or a host that is available for a respective user instance to be migrated in and corresponds to the respective user instance.

### Claim 17 (depends on 12)

The apparatus of claim 12, wherein the user migration module further migrates the one or more user instances from the one or more first hosts to the one or more second hosts when a host resource consumption is not greater than a corresponding equilibrium expected threshold of resource consumption after the one or more second hosts accept the one or more user instances.

### Claim 18 (depends on 12)

The apparatus of claim 12, wherein the apparatus further comprises:
a host detection module that detects whether a deviation value of host resource is greater than warning information of resource balance in response to determining that the trigger condition for user scheduling is not satisfied;
a host determination module that determines the one or more first hosts in response to determining that the deviation value of the host resource is greater than the warning information of resource balance; and
a host migration module that migrates the one or more user instances from the one or more first hosts to the one or more second hosts.

### Claim 19 (depends on 18)

The apparatus of claim 18, wherein the host migration module further migrates the one or more user instances from the one or more first hosts to the one or more second hosts based on an order of resource consumption for user instances from high to low.

### Claim 20

One or more memories stored thereon computer-executable instructions that, when executed by one or more processors, cause the processor to perform acts comprising:
traversing a user instance distribution of user instances of a user on one or more hosts in a cluster;
detecting whether a trigger condition for user scheduling of adjustment of the user instance distribution is satisfied;
determining one or more first hosts from which one or more user instances are to be migrated out in response to determining that the trigger condition for user scheduling is satisfied, each of the one or more first hosts comprising at least one user instance to be migrated out; and
migrating the one or more user instances from the one or more first hosts to one or more second hosts to which the one or more user instances are to be migrated in.
