# US 2021/0240537 A1 · Serverless function colocation with storage pools

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

- Number: US 2021/0240537 A1
- Document ID: US20210240537A1
- Status: Published application
- Kind: A1
- Application number: 16/778,855
- Filed: 2020-01-31
- Published: 2021-08-05
- Earliest claimed: 2020-01-31
- Assignees: Red Hat, Inc.
- Applicants: Red Hat, Inc.
- Inventors: Huamin Chen; Noah Michael Watkins
- Web page: https://patentgrep.com/patent/US20210240537A1

## CPC

- G06F 9/5027: {the resource being a machine, e.g. CPUs, Servers, Terminals}
- G06F 9/5044: {considering hardware capabilities}
- G06F 9/5016: {the resource being the memory}
- G06F 9/542: {Event management; Broadcasting; Multicasting; Notifications}
- G06F 9/546: {Message passing systems or structures, e.g. queues}
- G06F 2209/5011: Pool
- G06F 2209/502: Proximity
- G06F 2209/503: Resource availability
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Methods and systems are provided for assigning nodes to execute functions in a serverless computing environment. In one embodiment, a method is provided that includes receiving a function for execution in a serverless computing environment and identifying a storage pool needed during execution of the function. The serverless computing environment may include nodes for executing functions and a first set of nodes may be identified that implement the storage pool. Colocation measures may be determined between the first set of nodes and a second set of nodes. Available computing resources may be determined for the second set of nodes, such as available processing cores and available memory. The second set of nodes may be ranked according to the colocation measures and the available computing resources and a first node may be selected based on the ranking. The first node may be assigned to execute the function.

## Claims

### Claim 1

A method comprising:
receiving a request to execute a function in a serverless computing environment;
identifying a storage pool for use during execution of the function;
identifying a first plurality of nodes of the serverless computing environment implementing the storage pool;
determining colocation measures between the first plurality of nodes and a second plurality of nodes of the serverless computing environment;
determining an amount of available computing resources for at least a subset of the second plurality of nodes, the amount of available computing resources including at least one of a quantity of available processing cores and a capacity of available memory;
ranking the subset of the second plurality of nodes according to (i) the colocation measures and (ii) the available computing resources of the subset of the second plurality of nodes;
selecting, based on the ranking, a first node from among the subset of the second plurality of nodes; and
assigning the first node to execute the function.

### Claim 2 (depends on 1)

The method of claim 1, wherein the storage pool is one of a plurality of storage pools implemented by a storage provisioning system of the serverless computing environment, the storage provisioning system being configured to assign nodes of the serverless computing environment to implement the plurality of storage pools.

### Claim 3 (depends on 2)

The method of claim 2, wherein identifying the first plurality of nodes further comprises:
transmitting an identifier of the storage pool to the storage provisioning system; and
receiving identifiers of the first plurality of nodes from the storage provisioning system.

### Claim 4 (depends on 1)

The method of claim 1, wherein determining the colocation measures includes at least one of (i) determining a first colocation measure for nodes located in a common server, (ii) determining a second colocation measure for nodes located in a common server rack, (iii) determining a third colocation measure for nodes located in a common data center, and (iv) determining a fourth colocation measure for nodes located in different data centers, and wherein the first colocation measure is less than the second colocation measure, the second colocation measure is less than the third colocation measure, and the third colocation measure is less than the fourth colocation measure.

### Claim 5 (depends on 1)

The method of claim 1, wherein ranking at least the subset of the second plurality of nodes further comprises removing nodes of the subset of the second plurality of nodes that have colocation measures greater than a predetermined value.

### Claim 6 (depends on 5)

The method of claim 5, wherein the predetermined value is a first value and wherein ranking at least the subset of the second plurality of nodes further comprises, prior to removing nodes:
determining that all nodes of the subset of the second plurality of nodes have colocation measures greater than or equal to the first value; and
increasing the predetermined value from the first value to a second value greater than the first value.

### Claim 7 (depends on 1)

The method of claim 1, wherein the request specifies a resource constraint of the function, and wherein ranking at least the subset of the second plurality of nodes includes removing nodes of the subset of the second plurality of nodes with available computing resources lower than the resource constraint.

### Claim 8 (depends on 7)

The method of claim 7, wherein selecting the first node includes selecting the first node of the subset of the second plurality of nodes with the lowest colocation measure and with available computing resources greater than or equal to the resource constraint.

### Claim 9 (depends on 8)

The method of claim 8, wherein at least two nodes of the second plurality of nodes have the lowest colocation measure and available computing resources greater than or equal to the resource constraint, and wherein the first node is selected as the node of the at least two nodes with the largest amount of available computing resources.

### Claim 10 (depends on 7)

The method of claim 7, further comprising, prior to determining the colocation measures:
determining an amount of available computing resources for at least a subset of the first plurality of nodes; and
determining that none of the subset of the first plurality of nodes have computing resources that are available sufficient to fulfill the resource constraint,
wherein the colocation measures are determined in response to determining that none of the subset of the first plurality of nodes have computing resources that are available sufficient to fulfill the resource constraint.

### Claim 11 (depends on 1)

The method of claim 1, wherein the storage pool is identified based on metadata associated with at least one of the request and the function.

### Claim 12

A system comprising:
a processor; and
a memory storing instructions which, when executed by the processor, cause the processor to:
receive a request to execute a function in a serverless computing environment;
identify a storage pool for use during execution of the function;
identify a first plurality of nodes of the serverless computing environment implementing the storage pool;
determine an amount of available computing resources for at least a subset of the first plurality of nodes, the amount of available computing resources including at least one of a quantity of available processing cores and a capacity of available memory;
identify a resource constraint for the function;
determine that a first node of the subset of the first plurality of nodes has available computing resources greater than or equal to the resource constraint; and
assign the first node to execute the function.

### Claim 13 (depends on 12)

The system of claim 12, wherein the storage pool is one of a plurality of storage pools, wherein each of the plurality of storage pools is implemented by a subset of nodes of the serverless computing environment, the nodes of the serverless computing environment including the first plurality of nodes.

### Claim 14 (depends on 13)

The system of claim 13, wherein the subset of nodes implementing each of the plurality of storage pools is assigned by a storage provisioning system and wherein identifying the first plurality of nodes comprises:
transmitting an identifier of the storage pool to the storage provisioning system; and
receiving identifiers of the first plurality of nodes.

### Claim 15 (depends on 12)

The system of claim 12, wherein the memory stores further instructions which, when executed by the processor, cause the processor to:
determine that all of the subset of the first plurality of nodes have available computing resources less than the resource constraint;
determine colocation measures between the first plurality of nodes and a second plurality of nodes of the serverless computing environment;
identify at least a subset of the second plurality of nodes with colocation measures less than a predetermined threshold;
determine an amount of available computing resources for at least a subset of the second plurality of nodes;
determine that a second node of the subset of the second plurality of nodes has available computing resources greater than or equal to the resource constraint; and
assign the second node to execute the function.

### Claim 16 (depends on 15)

The system of claim 15, wherein each of the at least the subset of the second plurality of nodes are located in at least one of the same server as at least one of the first plurality of nodes and server rack as at least one of the first plurality of nodes.

### Claim 17 (depends on 12)

The system of claim 12, wherein the request includes the resource constraint for the function.

### Claim 18 (depends on 12)

The system of claim 12, wherein determining that the first node of the subset of the first plurality of nodes has available computing resources greater than or equal to the resource constraint comprises determining that at least two nodes of the first plurality of nodes have available computing resources greater than or equal to the resource constraint, and wherein the first node has the largest amount of available computing resources among the at least two nodes.

### Claim 19 (depends on 12)

The system of claim 12, wherein the storage pool is identified based on metadata associated with at least one of the request and the function.

### Claim 20

A non-transitory, computer-readable medium storing instructions which, when executed by a processor, cause the processor to:
receive a request to execute a function in a serverless computing environment;
identify a storage pool for use during execution of the function;
identify a first plurality of nodes of the serverless computing environment implementing the storage pool;
determine an amount of available computing resources for at least a subset of the first plurality of nodes, the amount of available computing resources including at least one of a quantity of available processing cores and a capacity of available memory;
identify a resource constraint for the function;
determine that a first node of the subset of the first plurality of nodes has available computing resources greater than or equal to the resource constraint; and
assign the first node to execute the function.
