# US 2024/0176668 A1 · Container orchestration using time-based load distribution

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

- Number: US 2024/0176668 A1
- Document ID: US20240176668A1
- Status: Published application
- Kind: A1
- Application number: 18/070,083
- Filed: 2022-11-28
- Published: 2024-05-30
- Earliest claimed: 2022-11-28
- Assignees: Sap SE
- Applicants: Sap SE
- Inventors: Jannick Stephan Fahlbusch; Joachim Goennheimer
- Web page: https://patentgrep.com/patent/US20240176668A1

## CPC

- G06F 9/5005: {to service a request}
- G06F 9/5038: {considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration (scheduling strategies G06F9/4881 and subgroups)}
- G06F 9/5072: {Grid computing}
- G06F 9/5077: {Logical partitioning of resources; Management or configuration of virtualized resources (specific details on emulation or internal functioning of virtual machines G06F9/455)}
- G06F 2209/5014: Reservation
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

In some embodiments, a computer system may, run a plurality of instances of an operator in parallel in a container orchestration system of a cloud environment, with each one of the plurality of instances of the operator watching the cloud environment for changes in a state of a resource. A first instance of the operator may detect a first change in the state of the resource, with the resource comprising one or more configuration requirements. In response to the detecting of the first change, the first instance of the operator may acquire a lease granting the first instance an exclusive right to the resource for a period of time, and then perform a reconciliation function within the period of time using the lease to change a state of a cloud component of the cloud environment to match the one or more configuration requirements of the resource.

## Claims

### Claim 1

A computer-implemented method performed by a computer system comprising a memory and at least one hardware processor, the computer-implemented method comprising:
running a plurality of instances of an operator in parallel in a container orchestration system of a cloud environment, each one of the plurality of instances of the operator watching the cloud environment for changes in a state of a resource;
detecting, by a first instance of a plurality of instances of an operator, a first change in the state of the resource, the resource comprising one or more configuration requirements;
in response to the detecting of the first change in the state of the resource, acquiring, by the first instance of the operator, a first lease for the resource from a lease lock component, the first lease granting the first instance of the operator an exclusive right to the resource for a first limited period of time that ends at a first expiration point in time; and
performing, by the first instance of the operator, a reconciliation function within the first limited period of time using the first lease to change a state of a cloud component of the cloud environment to match the one or more configuration requirements of the resource.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, wherein the first change in the state of the resource comprises a creation of the resource, a deletion of the resource, or a modification of the resource.

### Claim 3 (depends on 1)

The computer-implemented method of claim 1, wherein the cloud component comprises an in-memory database.

### Claim 4 (depends on 1)

The computer-implemented method of claim 1, wherein the lease lock component comprises a key-value database.

### Claim 5 (depends on 1)

The computer-implemented method of claim 1, further comprising:
storing, by the first instance of the operator, the first lease in a first cache memory of the first instance of the operator;
detecting, by the first instance the operator, a second change in the state of the resource; and
in response to the detecting of the second change in the state of the resource:
determining, by the first instance of the operator, that the first lease stored in the first cache memory of the first instance of the operator has not expired based on the first expiration point in time; and
based on the determining that the first lease has not expired, performing, by the first instance of the operator, the reconciliation function within the first limited period of time using the first lease stored in the first cache memory to change the state of the cloud component of the cloud environment based on the second change in the state of the resource.

### Claim 6 (depends on 1)

The computer-implemented method of claim 1, further comprising:
updating the lease lock component to include lease information of the first lease, the lease information comprising an identification of the resource, an identification of the first instance of the operator, and an indication of the first expiration point in time;
detecting, by a second instance of the plurality of instances of the operator, the first change in the state of the resource;
in response to the detecting of the first change in the state of the resource by the second instance of the operator, sending, by the second instance of the operator to the lease lock component, a first request for a second lease for the exclusive right to the resource during the first limited period of time;
sending, by the lease lock component, a denial of the first request for the second lease to the second instance of the operator, the denial comprising the lease information of the first lease; and
in response to receiving the denial of the first request:
storing, by the second instance of the operator, the lease information of the first lease in a second cache memory of the second instance of the operator; and
deferring, by the second instance of the operator, an attempt to acquire the second lease for the resource and an attempt to perform the reconciliation function to change the state of the cloud component of the cloud environment until after the first expiration point in time.

### Claim 7 (depends on 6)

The computer-implemented method of claim 6, wherein the deferring comprises:
determining, by the second instance of the operator, that the first lease has expired based on the lease information of the first lease stored in the second cache memory of the second instance of the operator; and
in response to the determining that the first lease has expired:
acquiring, by the second instance of the operator, the second lease for the resource from the lease lock component, the second lease granting the second instance of the operator the exclusive right to the resource for a second limited period of time; and
performing, by the second instance of the operator, the reconciliation function within the second limited period of time using the second lease to change the state of the cloud component of the cloud environment to match the one or more configuration requirements of the resource.

### Claim 8 (depends on 6)

The computer-implemented method of claim 6, further comprising:
detecting, by the second instance the operator, a second change in the state of the resource; and
in response to the detecting of the second change in the state of the resource:
determining, by the second instance of the operator, that the first lease stored in the second cache memory of the second instance of the operator has not expired based on the first expiration point in time; and
based on the determining that the first lease has not expired, deferring, by the second instance of the operator, an attempt to acquire the second lease for the resource and an attempt to perform the reconciliation function to change the state of the cloud component of the cloud environment until after the first expiration point in time.

### Claim 9

A system of comprising:
at least one hardware processor; and
a non-transitory computer-readable medium storing executable instructions that, when executed, cause the at least one processor to perform computer operations comprising:
running a plurality of instances of an operator in parallel in a container orchestration system of a cloud environment, each one of the plurality of instances of the operator watching the cloud environment for changes in a state of a resource;
detecting, by a first instance of a plurality of instances of an operator, a first change in the state of the resource, the resource comprising one or more configuration requirements;
in response to the detecting of the first change in the state of the resource, acquiring, by the first instance of the operator, a first lease for the resource from a lease lock component, the first lease granting the first instance of the operator an exclusive right to the resource for a first limited period of time that ends at a first expiration point in time; and
performing, by the first instance of the operator, a reconciliation function within the first limited period of time using the first lease to change a state of a cloud component of the cloud environment to match the one or more configuration requirements of the resource.

### Claim 10 (depends on 9)

The system of claim 9, wherein the first change in the state of the resource comprises a creation of the resource, a deletion of the resource, or a modification of the resource.

### Claim 11 (depends on 9)

The system of claim 9, wherein the cloud component comprises an in-memory database.

### Claim 12 (depends on 9)

The system of claim 9, wherein the lease lock component comprises a key-value database.

### Claim 13 (depends on 9)

The system of claim 9, wherein the computer operations further comprise:
storing, by the first instance of the operator, the first lease in a first cache memory of the first instance of the operator;
detecting, by the first instance the operator, a second change in the state of the resource; and
in response to the detecting of the second change in the state of the resource:
determining, by the first instance of the operator, that the first lease stored in the first cache memory of the first instance of the operator has not expired based on the first expiration point in time; and
based on the determining that the first lease has not expired, performing, by the first instance of the operator, the reconciliation function within the first limited period of time using the first lease stored in the first cache memory to change the state of the cloud component of the cloud environment based on the second change in the state of the resource.

### Claim 14 (depends on 9)

The system of claim 9, wherein the computer operations further comprise:
updating the lease lock component to include lease information of the first lease, the lease information comprising an identification of the resource, an identification of the first instance of the operator, and the first expiration point time;
detecting, by a second instance of the plurality of instances of the operator, the first change in the state of the resource;
in response to the detecting of the first change in the state of the resource by the second instance of the operator, sending, by the second instance of the operator to the lease lock component, a first request for a second lease for the exclusive right to the resource during the first limited period of time;
sending, by the lease lock component, a denial of the first request for the second lease to the second instance of the operator, the denial comprising the lease information of the first lease; and
in response to receiving the denial of the first request:
storing, by the second instance of the operator, the lease information of the first lease in a second cache memory of the second instance of the operator; and
deferring, by the second instance of the operator, an attempt to acquire the second lease for the resource and an attempt to perform the reconciliation function to change the state of the cloud component of the cloud environment until after the first expiration point in time.

### Claim 15 (depends on 14)

The system of claim 14, wherein the deferring comprises:
determining, by the second instance of the operator, that the first lease has expired based on the lease information of the first lease stored in the second cache memory of the second instance of the operator; and
in response to the determining that the first lease has expired:
acquiring, by the second instance of the operator, the second lease for the resource from the lease lock component, the second lease granting the second instance of the operator the exclusive right to the resource for a second limited period of time; and
performing, by the second instance of the operator, the reconciliation function within the second limited period of time using the second lease to change the state of the cloud component of the cloud environment to match the one or more configuration requirements of the resource.

### Claim 16 (depends on 14)

The system of claim 14, wherein the computer operations further comprise:
detecting, by the second instance the operator, a second change in the state of the resource; and
in response to the detecting of the second change in the state of the resource:
determining, by the second instance of the operator, that the first lease stored in the second cache memory of the second instance of the operator has not expired based on the first expiration point in time; and
based on the determining that the first lease has not expired, deferring, by the second instance of the operator, an attempt to acquire the second lease for the resource and an attempt to perform the reconciliation function to change the state of the cloud component of the cloud environment until after the first expiration point in time.

### Claim 17

A non-transitory machine-readable storage medium tangibly embodying a set of instructions that, when executed by at least one hardware processor, causes the at least one processor to perform computer operations comprising:
running a plurality of instances of an operator in parallel in a container orchestration system of a cloud environment, each one of the plurality of instances of the operator watching the cloud environment for changes in a state of a resource;
detecting, by a first instance of a plurality of instances of an operator, a first change in the state of the resource, the resource comprising one or more configuration requirements;
in response to the detecting of the first change in the state of the resource, acquiring, by the first instance of the operator, a first lease for the resource from a lease lock component, the first lease granting the first instance of the operator an exclusive right to the resource for a first limited period of time that ends at a first expiration point in time; and
performing, by the first instance of the operator, a reconciliation function within the first limited period of time using the first lease to change a state of a cloud component of the cloud environment to match the one or more configuration requirements of the resource.

### Claim 18 (depends on 17)

The non-transitory machine-readable storage medium of claim 17, wherein the first change in the state of the resource comprises a creation of the resource, a deletion of the resource, or a modification of the resource.

### Claim 19 (depends on 17)

The non-transitory machine-readable storage medium of claim 17, wherein the cloud component comprises an in-memory database.

### Claim 20 (depends on 17)

The non-transitory machine-readable storage medium of claim 17, wherein the lease lock component comprises a key-value database.
