IP Library › Granted Patent US 11,698,886
Granted Patent B2
US 11,698,886 · App. 17/936,169 · Granted Jul 11, 2023

Cluster instance balancing of a database system across zones

Inventors: Johan Harjono (San Francisco, CA); Daniel Geoffrey Karp (San Carlos, CA); Rares Radut (Kitchener, CA); Samir Rehmtulla (San Mateo, CA); Arthur Kelvin Shi (San Francisco, CA); Thanakul Wattanawong (Berkeley, CA)
Assignee: Snowflake Inc.
G06F16/1824G06F16/285
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,698,886
App. No.
17/936,169
Granted
Jul 11, 2023
Kind
B2
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 (74)

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.

2. 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.

3. 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.

4. 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.

5. 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.

6. 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.

7. 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.

8. 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.

9. 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.

10. 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.

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.

12. 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.

13. 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.

14. 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.

15. 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.

16. 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.

17. 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.

18. The method of claim 17 , further comprising:

identifying the particular type of cluster instance to include in the particular zone from the multiple zones.

19. 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.

20. 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.

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.

22. 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.

23. 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.

24. 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.

25. 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.

26. 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.

27. 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.

28. 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.

29. 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.

30. 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.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 28, 2022
From: HARJONO, JOHAN; KARP, DANIEL GEOFFREY; RADUT, RARES; REHMTULLA, SAMIR; SHI, ARTHUR KELVIN; WATTANAWONG, THANAKUL
To: SNOWFLAKE INC.
Reel/Frame 061244/0255 →
Continuity (4)
Continuation 17806852 · Jun 14, 2022
Continuation 17461169 · Aug 30, 2021
Provisional Application 63260425 · Aug 19, 2021
Related Publication 20230069578A1 · Mar 2, 2023