IP Library › Granted Patent US 10,884,887
Granted Patent B2
US 10,884,887 · App. 16/190,019 · Granted Jan 5, 2021

Workload shifting in a database system using hint-based routing

Inventors: Chul Won Lee (Seoul, KR); Yong Wook Jeong (Seoul, KR); Min Ji Yoon (Seoul, KR); Ian McHardy (Walldorf, DE); Abhishek Singhi (Walldorf, DE); Jeff Albion (Walldorf, DE); Rich Jones (Walldorf, DE)
Assignee: SAP SE
G06F11/2092G06F9/4856G06F16/27G06F16/90H04L67/1097G06F2201/85
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 10,884,887
App. No.
16/190,019
Granted
Jan 5, 2021
Kind
B2
Abstract

Systems, techniques, and articles are described herein for workload shifting in a database system. A computer system is configured to provide a database system and includes one or more processors, a primary database system implemented by the one or more processors, and a secondary database system implemented by the one or more processors. The secondary database system is configured as a hot-standby system for the primary database system and is capable of providing at least a minimum amount of essential functionality of the primary database system during a disruption. The primary database system is configured by programming instructions, executable on the computer system, to cause the one or more processors to determine from a query request from a client application directed to the primary database system that workload from a query may be shifted to the secondary database system and instruct the client application to execute the query.

Claims (60)

1. A computer system comprising:

one or more processors;

a primary database system implemented by the one or more processors; and

a secondary database system implemented by the one or more processors, the secondary database system configured as a hot-standby system for the primary database system that is capable of providing at least a minimum amount of essential functionality of the primary database system during a disruption to the primary database system;

wherein the primary database system is configured by programming instructions, executable on the computer system, to cause the one or more processors to:

determine from a query request from a client application directed to the primary database system that workload from a query may be shifted to the secondary database system;

determine that a routing hint in the query request indicates a preference for the query to be executed at the secondary database system; and

instruct, based on the routing hint, the client application to direct the secondary database system to execute the query.

2. The computer system according to claim 1 , wherein the programming instructions to cause the one or more processors to determine from a query request from a client application directed to the primary database system that workload from a query may be shifted to the secondary database system comprises programming instructions to cause the one or more processors to:

determine that the query does not involve writing data.

3. The computer system according to claim 1 , wherein the programming instructions to cause the one or more processors to instruct the client application to direct the secondary database system to execute the query comprises programming instructions to cause the one or more processors to provide the identity of the second database system to the client application.

4. The computer system according to claim 1 , wherein the secondary database system is configured by programming instructions, executable on the computer system, to cause the one or more processors to:

retrieve, responsive to receipt of the query from the client application, a replication delay parameter from the query, the replication delay parameter indicating the maximum acceptable replication delay for data responsive to the query,

retrieve the actual data lag for data responsive to the query,

compare the actual data lag with the replication delay parameter, and

provide the data responsive to query to the client application when the actual data lag does not exceed the replication delay parameter.

5. The computer system according to claim 4 , wherein the secondary database system is further configured by programming instructions, executable on the computer system, to cause the one or more processors to:

provide an indication to the client application to route the query to the primary database system when the actual data lag exceeds the replication delay parameter.

6. The computer system according to claim 4 , wherein the secondary database system is further configured by programming instructions, executable on the computer system, to cause the one or more processors to:

provide the data responsive to query and a fallback indication to the client application when the actual data lag exceeds the replication delay parameter.

7. The computer system according to claim 4 , wherein the secondary database system is further configured by programming instructions, executable on the computer system, to cause the one or more processors to:

provide a fallback indication and not provide the data responsive to the query to the client application when the actual data lag exceeds the replication delay parameter.

8. A computer-implemented method in a computer system comprising a primary database system and a secondary database system, the secondary database system configured as a backup system for the primary database system that is capable of providing at least a minimum amount of essential functionality of the primary database system during a disruption to the primary database system, the method comprising:

receiving by the primary database system a query request from a client application in advance of receiving a query,

determining by the primary database system that a routing hint in the query request indicates a preference for the query to be executed at the secondary database system;

determining that execution of the query does not involve writing data;

determining by the primary database system to instruct the client application to route the query to the secondary database system based on the routing hint; and

instructing, by the primary database system, the client application to route the query to the secondary database system.

9. The method according to claim 8 , wherein instructing the client application to route the query to the secondary database system comprises providing the identity of the secondary database system to the client application.

10. The method according to claim 8 , further comprising:

receiving the query from the client application requesting data retrieval at the secondary database system while in a hot-standby mode of operation.

11. The method according to claim 10 , further comprising:

retrieving, by the secondary database system, a replication delay parameter from the query, the replication delay parameter indicating the maximum acceptable replication delay for data responsive to the query;

retrieving, by the secondary database system, the actual data lag for the data responsive to the query;

comparing, by the secondary database system, the actual data lag with the replication delay parameter; and

providing, by the secondary database system, the data responsive to the query when the actual data lag does not exceed the replication delay parameter.

12. The method according to claim 11 , further comprising:

providing an indication, by the secondary database system, to the client application to route the query to the primary database system when the actual data lag exceeds the replication delay parameter.

13. The method according to claim 11 , further comprising:

providing, by the secondary database system, the data responsive to the query and a fallback indication to the client application when the actual data lag exceeds the replication delay parameter.

14. The method according to claim 11 , further comprising:

providing, by the secondary database system, a fallback indication to the client application when the actual data lag exceeds the replication delay parameter.

15. A non-transitory computer readable storage medium embodying programming instruction for performing a method, the method comprising:

receiving by a primary database system comprising a primary database a query request from a client application in advance of receiving a query,

determining by the primary database system that a routing hint in the query request indicates a preference for the query to be executed at a secondary database system comprising a secondary database, the secondary database system configured as a backup system for the primary database system that is capable of providing at least a minimum amount of essential functionality of the primary database system during a disruption to the primary database system, wherein the primary database and the secondary database are separate and independent of one another;

determining that execution of the query does not involve writing data;

determining by the primary database system to instruct the client application to route the query to the secondary database system based on the routing hint; and

instructing, by the primary database system, the client application to route the query to the secondary database system.

16. The non-transitory computer readable storage medium according to claim 15 , wherein instructing the client application to route the query to the secondary database system comprises providing the identity of the secondary database system to the client application.

17. The non-transitory computer readable storage medium according to claim 15 , wherein the method further comprises:

receiving the query from the client application requesting data retrieval at the secondary database system while in a hot-standby mode of operation.

18. The non-transitory computer readable storage medium according to claim 15 , wherein the method further comprises:

retrieving, by the secondary database system, a replication delay parameter from the query, the replication delay parameter indicating the maximum acceptable replication delay for data responsive to the query;

retrieving, by the secondary database system, the actual data lag for the data responsive to the query;

comparing, by the secondary database system, the actual data lag with the replication delay parameter; and

providing, by the secondary database system, the data responsive to the query when the actual data lag does not exceed the replication delay parameter.

19. The non-transitory computer readable storage medium according to claim 18 , wherein the method further comprises:

providing an indication, by the secondary database system, to the client application to route the query to the primary database system when the actual data lag exceeds the replication delay parameter.

20. The non-transitory computer readable storage medium according to claim 18 , wherein the method further comprises:

providing, by the secondary database system, the data responsive to the query and a fallback indication to the client application when the actual data lag exceeds the replication delay parameter.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 13, 2018
From: LEE, CHUL WON; JEONG, YONG WOOK; YOON, MIN JI; MCHARDY, IAN; SINGHI, ABHISHEK; ALBION, JEFF; JONES, RICH
To: SAP SE
Reel/Frame 047512/0535 →
Continuity (2)
Continuation 15362238 · Nov 28, 2016
Related Publication 20190079841A1 · Mar 14, 2019