US 10,891,308 B2
Automated self-scaling database system for automatically scaling out write operations and method for implementing the same in a multi-tenant, cloud-based computing environment
Bohan Chen, Redwood City, CA (US); and Donald Tam, Hillsborough, CA (US)
Assigned to salesforce.com, inc., San Francisco, CA (US)
Filed by salesforce.com, inc., San Francisco, CA (US)
Filed on Sep. 24, 2018, as Appl. No. 16/139,266.
Prior Publication US 2020/0097593 A1, Mar. 26, 2020
Int. Cl. G06F 16/27 (2019.01); G06F 9/455 (2018.01); G06F 11/14 (2006.01); G06F 16/21 (2019.01)
CPC G06F 16/275 (2019.01) [G06F 9/45558 (2013.01); G06F 11/1451 (2013.01); G06F 16/214 (2019.01); G06F 2009/4557 (2013.01); G06F 2009/45575 (2013.01); G06F 2201/84 (2013.01)] 17 Claims
OG exemplary drawing
 
1. A method for automatically scaling out write operations in an automated self-scaling database system that process read requests and write requests from a plurality of tenants, wherein the automated self-scaling database system comprises an automated self-scaling database module, one or more application servers, a first primary database and a first standby database, the method comprising:
analyzing, at the automated self-scaling database module, telemetry information from the first primary database to determine whether the first primary database has reached a maximum computation and storage capacity such that there is the need for upscaling storage capacity and computation resources of the database system for write operations;
automatically initiating a write scaling process when the automated self-scaling database module determines that upscaling is needed for write operations by:
automatically provisioning, via the automated self-scaling database module, a new primary database;
distributing, via the automated self-scaling database module after the new primary database is active, the plurality of tenants among the first primary database and the new primary database, wherein the first primary database handles read requests and write requests that originate from a first group of the tenants, and the new primary database handles read requests and write requests that originate from a second group of the tenants;
notifying, via the automated self-scaling database module after the new primary database is active, the application servers to enable read-only application mode to temporarily block the write requests that originate from the second group of the tenants on the first primary database, wherein the application servers temporarily block the write requests that originate from the second group of the tenants and apply any changes for the second group of the tenants between the time snapshot was taken and a present time to the new primary database;
determining, at the automated self-scaling database module whether data for the second group of tenants is synchronized between first primary database and the new primary database;
notifying the application servers of a new tenant-database mapping, via the automated self-scaling database module, when the data for the second group of tenants is synchronized between the first primary database and the new primary database; and
notifying the application servers, via the automated self-scaling database module, to route the read requests and write requests from the second group of tenants to the new primary database.