# US 2023/0069578 A1 · Cluster instance balancing of a database system across zones

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

- Number: US 2023/0069578 A1
- Document ID: US20230069578A1
- Status: Published application
- Kind: A1
- Application number: 17/936,169
- Filed: 2022-09-28
- Published: 2023-03-02
- Earliest claimed: 2021-08-19
- Assignees: Snowflake Inc.
- Applicants: Snowflake Inc.
- Inventors: Johan Harjono; Daniel Geoffrey Karp; Rares Radut; Samir Rehmtulla; Arthur Kelvin Shi; Thanakul WATTANAWONG
- Web page: https://patentgrep.com/patent/US20230069578A1

## CPC

- G06F 16/1824: {implemented using Network-attached Storage [NAS] architecture (distributed or networked storage systems G06F3/067; protocols for distributed storage of data in a network H04L67/1097)}
- G06F 16/256: {in federated or virtual databases}
- 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 16/285: {Clustering or classification}
- H04L 47/826: {Involving periods of time}
- H04L 67/1031: Controlling of the operation of servers by a load balancer, e.g. adding or removing servers that serve requests
- G06F 2209/505: Clust
- H04L 41/0897: by horizontal or vertical scaling of resources, or by migrating entities, e.g. virtual resources or entities
- H04L 41/5019: Ensuring fulfilment of SLA
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

The subject technology selects a particular zone among multiple zones based on a target skew to meet a global balancing of cluster instances. The subject technology deploys a particular type of cluster instance to the particular zone. The subject technology, for each zone from the multiple zones, determines a respective number of cluster instances. The subject technology identifies a second particular type of cluster instance to remove based on a total number of the second particular type of cluster instance in the multiple zones and a second total number of the particular type of cluster instance in the multiple zones. The subject technology removes the second particular type of cluster instance from a second particular zone to meet the global balancing of cluster instances in the multiple zones.

## Claims

### Claim 1

A network-based database system comprising:
at least one hardware processor; and
a memory storing instructions that cause the at least one hardware processor to perform operations comprising:
selecting a particular zone among multiple zones based on a target skew to meet a global balancing of cluster instances;
deploying a particular type of cluster instance to the particular zone;
for each zone from the multiple zones, determining a respective number of cluster instances;
identifying a second particular type of cluster instance to remove based on a total number of the second particular type of cluster instance in the multiple zones and a second total number of the particular type of cluster instance in the multiple zones; and
removing the second particular type of cluster instance from a second particular zone to meet the global balancing of cluster instances in the multiple zones.

### Claim 2 (depends on 1)

The system of claim 1, wherein the second particular zone includes a particular number of cluster instances that is greater than each number of instances from each of the multiple zones.

### Claim 3 (depends on 1)

The system of claim 1, wherein a difference between a first number of instances from a most loaded zone and a second number of cluster instances from the particular zone is below a third number associated with the target skew.

### Claim 4 (depends on 1)

The system of claim 1, wherein the operations further comprise:
determining that a first particular total number of the particular type of cluster instance is less than a second particular total number of the second particular type of cluster instance in the multiple zones.

### Claim 5 (depends on 1)

The system of claim 1, wherein the operations further comprise:
determining an availability zone skew among the multiple zones; and
based on the availability zone skew, determining the target skew to meet the global balancing of cluster instances.

### Claim 6 (depends on 5)

The system of claim 5, wherein the availability zone skew is based on a difference between a number of instances in a most loaded zone and a second number of instances in a least loaded zone among the multiple zones.

### Claim 7 (depends on 5)

The system of claim 5, wherein the operations further comprise:
prior to determining the availability zone skew among the multiple zones: determining, after a period of time elapses over a periodic segment of time, an imbalance of cluster instances deployed in multiple zones based on a threshold value, the cluster instances including different types of clusters associated with compute service manager instances.

### Claim 8 (depends on 7)

The system of claim 7, wherein the operations further comprise:
identifying the particular type of cluster instance to include in the particular zone from the multiple zones.

### Claim 9 (depends on 8)

The system of claim 8, wherein the operations further comprise:
adding the particular type of cluster instance to the particular zone to meet the global balancing of cluster instances in the multiple zones; and
determining, after a second period of time elapses over the periodic segment of time, that a number of cluster instances deployed in the multiple zones is below the threshold value indicating a current balance of cluster instances in the multiple zones.

### Claim 10 (depends on 1)

The system of claim 1, wherein the operations further comprise:
identifying a first zone that includes a highest number of cluster instances based on the respective number of cluster instances from each zone; and
identifying a second zone that includes a lowest number of cluster instances based on the respective number of cluster instances from each zone.

### Claim 11

A method comprising:
selecting a particular zone among multiple zones based on a target skew to meet a global balancing of cluster instances;
deploying a particular type of cluster instance to the particular zone;
for each zone from the multiple zones, determining a respective number of cluster instances;
identifying a second particular type of cluster instance to remove based on a total number of the second particular type of cluster instance in the multiple zones and a second total number of the particular type of cluster instance in the multiple zones; and
removing the second particular type of cluster instance from a second particular zone to meet the global balancing of cluster instances in the multiple zones.

### Claim 12 (depends on 11)

The method of claim 11, wherein the second particular zone includes a particular number of cluster instances that is greater than each number of instances from each of the multiple zones.

### Claim 13 (depends on 11)

The method of claim 11, wherein a difference between a first number of instances from a most loaded zone and a second number of cluster instances from the particular zone is below a third number associated with the target skew.

### Claim 14 (depends on 11)

The method of claim 11, further comprising:
determining that a first particular total number of the particular type of cluster instance is less than a second particular total number of the second particular type of cluster instance in the multiple zones.

### Claim 15 (depends on 11)

The method of claim 11, further comprising:
determining an availability zone skew among the multiple zones; and
based on the availability zone skew, determining the target skew to meet the global balancing of cluster instances.

### Claim 16 (depends on 15)

The method of claim 15, wherein the availability zone skew is based on a difference between a number of instances in a most loaded zone and a second number of instances in a least loaded zone among the multiple zones.

### Claim 17 (depends on 15)

The method of claim 15, further comprising:
prior to determining the availability zone skew among the multiple zones:
determining, after a period of time elapses over a periodic segment of time, an imbalance of cluster instances deployed in multiple zones based on a threshold value, the cluster instances including different types of clusters associated with compute service manager instances.

### Claim 18 (depends on 17)

The method of claim 17, further comprising:
identifying the particular type of cluster instance to include in the particular zone from the multiple zones.

### Claim 19 (depends on 18)

The method of claim 18, further comprising:
adding the particular type of cluster instance to the particular zone to meet the global balancing of cluster instances in the multiple zones; and
determining, after a second period of time elapses over the periodic segment of time, that a number of cluster instances deployed in the multiple zones is below the threshold value indicating a current balance of cluster instances in the multiple zones.

### Claim 20 (depends on 11)

The method of claim 11, further comprising:
identifying a first zone that includes a highest number of cluster instances based on the respective number of cluster instances from each zone; and
identifying a second zone that includes a lowest number of cluster instances based on the respective number of cluster instances from each zone.

### Claim 21

A non-transitory computer-storage medium comprising instructions that, when executed by one or more processors of a machine, configure the machine to perform operations comprising:
selecting a particular zone among multiple zones based on a target skew to meet a global balancing of cluster instances;
deploying a particular type of cluster instance to the particular zone;
for each zone from the multiple zones, determining a respective number of cluster instances;
identifying a second particular type of cluster instance to remove based on a total number of the second particular type of cluster instance in the multiple zones and a second total number of the particular type of cluster instance in the multiple zones; and
removing the second particular type of cluster instance from a second particular zone to meet the global balancing of cluster instances in the multiple zones.

### Claim 22 (depends on 21)

The non-transitory computer-storage medium of claim 21, wherein the second particular zone includes a particular number of cluster instances that is greater than each number of instances from each of the multiple zones.

### Claim 23 (depends on 21)

The non-transitory computer-storage medium of claim 21, wherein a difference between a first number of instances from a most loaded zone and a second number of cluster instances from the particular zone is below a third number associated with the target skew.

### Claim 24 (depends on 21)

The non-transitory computer-storage medium of claim 21, wherein the operations further comprise:
determining that a first particular total number of the particular type of cluster instance is less than a second particular total number of the second particular type of cluster instance in the multiple zones.

### Claim 25 (depends on 21)

The non-transitory computer-storage medium of claim 21, wherein the operations further comprise:
determining an availability zone skew among the multiple zones; and
based on the availability zone skew, determining the target skew to meet the global balancing of cluster instances.

### Claim 26 (depends on 25)

The non-transitory computer-storage medium of claim 25, wherein the availability zone skew is based on a difference between a number of instances in a most loaded zone and a second number of instances in a least loaded zone among the multiple zones.

### Claim 27 (depends on 25)

The non-transitory computer-storage medium of claim 25, wherein the operations further comprise:
prior to determining the availability zone skew among the multiple zones:
determining, after a period of time elapses over a periodic segment of time, an imbalance of cluster instances deployed in multiple zones based on a threshold value, the cluster instances including different types of clusters associated with compute service manager instances.

### Claim 28 (depends on 27)

The non-transitory computer-storage medium of claim 27, wherein the operations further comprise:
identifying the particular type of cluster instance to include in the particular zone from the multiple zones.

### Claim 29 (depends on 28)

The non-transitory computer-storage medium of claim 28, wherein the operations further comprise:
adding the particular type of cluster instance to the particular zone to meet the global balancing of cluster instances in the multiple zones; and
determining, after a second period of time elapses over the periodic segment of time, that a number of cluster instances deployed in the multiple zones is below the threshold value indicating a current balance of cluster instances in the multiple zones.

### Claim 30 (depends on 21)

The non-transitory computer-storage medium of claim 21, wherein the operations further comprise:
identifying a first zone that includes a highest number of cluster instances based on the respective number of cluster instances from each zone; and
identifying a second zone that includes a lowest number of cluster instances based on the respective number of cluster instances from each zone.
