IP Library Granted Patent US 12,210,540
Granted Patent B2
US 12,210,540 · App. 17/552,628 · Granted Jan 28, 2025

Systems and methods of database connection and management of requests

Inventors: Venkatesan Chandrasekaran (San Francisco, CA); Valliappan Annamalai Natarajan (San Francisco, CA); Sidarth Srinivas Conjeevaram (New Haven, CT); Vijayanth Devadhar (Fremont, CA); Zeyu Zheng (San Francisco, CA)
Assignee: Salesforce, Inc.
G06F16/2471G06F11/3409G06F16/256G06F16/27
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 12,210,540
App. No.
17/552,628
Granted
Jan 28, 2025
Kind
B2
Abstract

Systems and methods are provided for receiving a request at a database system that includes a primary node and one or more standby nodes. When the request is determined to be a read-only request and the previous transaction has been replicated to the standby node, the request may be transmitted to one of the one or more standby nodes to perform the read-only operation to retrieve data of the request and transmitting the retrieved data. When the request is determined to be a read-only request and the previous transaction has not been replicated to the standby node, the read-only operation is performed to retrieve data of the request from the primary node and transmitting the retrieved data.

Claims (58)

1. A method comprising:

receiving a request at a database system having one or more physical storage devices, wherein the database system includes a primary node and a plurality of standby nodes that are read-only;

determining, at the database system, whether a previous transaction of a previously received request that is related to the received request has been committed to the primary node, and determining whether the previous transaction has been replicated by committing the previous transaction to at least some of the plurality of standby nodes by storing the previous transaction in the one or more physical storage devices of the database system;

determining, at the database system, whether the request is a read-only request for data stored in the one or more physical storage devices of the database system and whether diversion of the request to one of the plurality of standby nodes is enabled by default, or whether the request includes a write operation;

when the request is determined to be a read-only request and the previous transaction has been replicated, distributing the request determined to be a read-only request among the standby nodes that have replicated the previous transaction to load balance each of the plurality of standby nodes and transmitting the retrieved data from a standby node to which the request was distributed;

when the request is determined to be a read-only request and the previous transaction has not been replicated, performing the read-only operation to retrieve data of the request from the primary node and transmitting the retrieved data; and

when the request is determined to be a read-only request and diversion of the request to one of the plurality of standby nodes is enabled by default, determining at the database system whether the request is a type of request that is part of a request blacklist of the database system which prevents use of at least one of the plurality of standby nodes transmitting the request to the primary node to be processed, and transmitting the request to the primary node to be processed when the request is part of the request blacklist.

2. The method of claim 1 , further comprising:

when the request is determined to include a write operation, performing the write operation at the primary node of the database system.

3. The method of claim 1 , further comprising:

when the request is not part of the request blacklist, determining whether a tenant identifier is known and is part of a tenant blacklist of the database system;

when the tenant identifier is known and is part of a tenant blacklist, transmitting the request to the primary node to be processed.

4. The method of claim 3 , further comprising:

when the tenant identifier is known, determining whether the tenant identifier is part of a tenant request blacklist;

when the tenant identifier is known and in the tenant request blacklist, transmitting the request to the primary node to be processed; and

when the tenant identifier is known and is not in the tenant request blacklist, transmitting the request to one of the plurality of standby nodes to be processed.

5. The method of claim 1 , further comprising:

when the diversion of the request to one of the plurality of standby nodes is not enabled by default, determining at the database system whether the request is a type of request that is part of a request whitelist of the database system which configures the use of the plurality of standby nodes; and

when the request is part of the request whitelist, transmitting the request to one of the plurality of standby nodes to be processed.

6. The method of claim 5 , further comprising:

when the request is not part of the request whitelist, determining whether a tenant identifier is known and is part of a tenant whitelist of the database system; and

when the tenant identifier is known and is part of a tenant whitelist, transmitting the request to one of the plurality of standby nodes to be processed.

7. The method of claim 6 , further comprising:

when the tenant identifier is known, determining whether the tenant identifier is part of a tenant request whitelist;

when the tenant identifier is known and in the tenant request whitelist, transmitting the request to one of the plurality of standby nodes to be processed; and

when the tenant identifier is known and not in the tenant request whitelist, transmitting the request to the primary node to be processed.

8. The method of claim 1 , further comprising:

adding the new standby node based on at least one selected from the group consisting of: when at least one of the number of requests is greater than or equal to a first predetermined number of requests, when the execution time is greater than or equal to a first predetermined execution time, and the response time is greater than or equal to a first predetermined response time; and

removing the standby node of the one or more standby nodes based on at least one selected from the group consisting of: when at least one of the number of requests is less than a second predetermined number of requests, when the execution time is less than a second predetermined execution time, and the response time is less than a first predetermined response time.

9. A system comprising:

a database system comprising one or more physical storage devices, wherein the database system includes a primary node and a plurality of standby nodes that are read-only, and wherein the database system:

receives a request;

determines whether a previous transaction of a previously received request that is related to the received request has been committed to the primary node, and determining whether the previous transaction has been replicated by committing the previous transaction to at least some of the plurality of standby nodes by storing the previous transaction in the one or more physical storage devices of the database system;

determines whether the request is a read-only request for data stored in the one or more physical storage devices of the database system and whether diversion of the request to one of the plurality of standby nodes is enabled by default, or whether the request includes a write operation;

distributes the request determined to be a read-only request among the standby nodes that have replicated the previous transaction to load balance the plurality of standby nodes and transmits the retrieved data from a standby node to which the request was distributed when the request is determined to be a read-only request and the previous transaction has been replicated to the standby node;

performs the read-only operation to retrieve data of the request from the primary node and transmitting the retrieved data when the request is determined to be a read-only request and the previous transaction has not been replicated; and

determines whether the request is a type of request that is part of a request blacklist of the database system which prevents use of at least one of the plurality of standby nodes transmitting the request to the primary node to be processed when the request is determined to be a read-only request and diversion of the request to one of the plurality of standby nodes is enabled by default, and transmits the request to the primary node to be processed when the request is part of the request blacklist.

10. The system of claim 9 , wherein the database system performs the write operation at the primary node when the request is determined to include a write operation.

11. The system of claim 9 , wherein the database system:

determines whether a tenant identifier is known and is part of a tenant blacklist of the database system when the request is not part of the request blacklist; and

transmits the request to the primary node to be processed when the tenant identifier is known and is part of a tenant blacklist.

12. The system of claim 11 , wherein the database system:

determines whether the tenant identifier is part of a tenant request blacklist when the tenant identifier is known;

transmits the request to the primary node to be processed when the tenant identifier is known and in the tenant request blacklist; and

transmits the request to one of the plurality of standby nodes to be processed when the tenant identifier is known and not in the tenant request blacklist.

13. The system of claim 9 , wherein the database system:

determines at the database system whether the request is a type of request that is part of a request whitelist of the database system which configures the use of the plurality of standby nodes when the diversion of the request to one of the plurality of standby nodes is not enabled by default; and

transmits the request to one of the plurality of standby nodes to be processed when the request is part of the request whitelist.

14. The system of claim 13 , wherein the database system:

determines whether a tenant identifier is known and is part of a tenant whitelist of the database system when the request is not part of the request whitelist; and

transmits the request to one of the plurality of standby nodes to be processed when the tenant identifier is known and is part of a tenant whitelist.

15. The system of claim 14 , wherein the database system:

determines whether the tenant identifier is part of a tenant request whitelist;

transmits the request to one of the plurality of standby nodes to be processed when the tenant identifier is known and in the tenant request whitelist; and

transmits the request to the primary node to be processed when the tenant identifier is known and not in the tenant request whitelist.

16. The system of claim 9 , wherein the database system:

adds the new standby node based on at least one selected from the group consisting of: when at least one of the number of requests is greater than or equal to a first predetermined number of requests, when the execution time is greater than or equal to a first predetermined execution time, and the response time is greater than or equal to a first predetermined response time; and

removes the standby node of the one or more standby nodes based at least one selected from the group consisting of: when at least one of the number of requests is less than a second predetermined number of requests, when the execution time is less than a second predetermined execution time, and the response time is less than a first predetermined response time.

Assignments (2)
CHANGE OF NAME Recorded Nov 21, 2024
From: SALESFORCE.COM, INC.
To: SALESFORCE, INC.
Reel/Frame 069407/0744 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 16, 2021
From: CHANDRASEKARAN, VENKATESAN; DEVADHAR, VIJAYANTH; CONJEEVARAM, SIDARTH SRINIVAS; ZHENG, ZEYU; NATARAJAN, VALLIAPPAN ANNAMALAI
To: SALESFORCE.COM, INC.
Reel/Frame 058405/0876 →
Continuity (1)
Related Publication 20230195738A1 · Jun 22, 2023
References Cited (36)
US 7627726B2 · Chandrasekaran · 2009 [cited by applicant]
US 7987210B1 · Wei · 2011 [cited by applicant]
US 7987470B1 · Wei · 2011 [cited by applicant]
US 8150887B1 · Wei · 2012 [cited by applicant]
US 8171006B1 · Wei · 2012 [cited by applicant]
US 8171054B1 · Wei · 2012 [cited by applicant]
US 8244778B1 · Wei · 2012 [cited by applicant]
US 8255426B1 · Wei · 2012 [cited by applicant]
US 8275808B2 · Wei · 2012 [cited by applicant]
US 8375015B2 · Wei · 2013 [cited by applicant]
US 8560572B2 · Wei · 2013 [cited by applicant]
US 8595265B2 · Wei · 2013 [cited by applicant]
US 8656410B1 · Wei · 2014 [cited by applicant]
US 8694546B2 · Wei · 2014 [cited by applicant]
US 8930336B2 · Wei · 2015 [cited by applicant]
US 8949282B1 · Wei · 2015 [cited by applicant]
US 9009731B2 · Wei · 2015 [cited by applicant]
US 9547689B2 · Chandrasekaran · 2017 [cited by applicant]
US 9760623B2 · Wei · 2017 [cited by applicant]
US 10078618B2 · Chandrasekaran · 2018 [cited by applicant]
US 10652246B2 · Chandrasekaran · 2020 [cited by applicant]
US 10693709B2 · Chainani · 2020 [cited by applicant]
US 10726053B2 · Wei · 2020 [cited by applicant]
US 11151150B2 · Obembe · 2021 [cited by applicant]
US 11165857B2 · Obembe · 2021 [cited by applicant]
US 20050071391A1 · Fuerderer · 2005 [cited by examiner]
US 20120239697A1 · Ram · 2012 [cited by examiner]
US 20120290714A1 · Cohen · 2012 [cited by examiner]
US 20130060815A1 · Saeki · 2013 [cited by examiner]
US 20170147527A1 · Chandrasekaran · 2017 [cited by applicant]
US 20190306008A1 · Chainani · 2019 [cited by applicant]
US 20200137084A1 · Roy · 2020 [cited by examiner]
US 20200342008A1 · Wei · 2020 [cited by applicant]
US 20210089910A1 · Zheng · 2021 [cited by applicant]
US 20210126964A1 · Obembe · 2021 [cited by applicant]
Seonmyeong Bak; Multi-level Load Balancing with an Integrated Runtime Approach; IEEE; pp. 31-40 (Year: 2018). [cited by examiner]