# US 10,872,074 B2 · Distributed availability groups of databases for data centers

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

- Number: US 10,872,074 B2
- Document ID: US10872074B2
- Status: Granted
- Kind: B2
- Application number: 15/282,220
- Filed: 2016-09-30
- Published: 2018-04-05
- Granted: 2020-12-22
- Earliest claimed: 2016-09-30
- Assignees: Microsoft Technology Licensing, LLC
- Applicants: Microsoft Technology Licensing, LLC
- Inventors: Girish Mittur Venkataramanappa; Zhengguo Sun; Varun Kunjbihari Tibrewal; Steven John Lindell; Sameer Arun Verkhedkar; Sandeep Lingam; Colin Neville
- Web page: https://patentgrep.com/patent/US10872074B2

## CPC

- G06F 16/2365: {Ensuring data consistency and integrity}
- G06F 11/1451: {by selection of backup contents}
- G06F 11/1464: {for networked environments}
- G06F 11/1469: {Backup restoration techniques}
- G06F 11/1471: involving logging of persistent data for recovery
- G06F 11/1474: in transactions (updating of structured data in databases G06F16/23)
- G06F 11/2028: {eliminating a faulty processor or activating a spare}
- G06F 11/2033: {switching over of hardware resources}
- G06F 11/2035: {without idle spare hardware}
- G06F 11/2041: {with more than one idle spare processing component}
- G06F 11/2048: {where the redundant components share neither address space nor persistent storage}
- G06F 11/2097: {maintaining the standby controller/processing unit updated (initialisation or re-synchronisation thereof G06F11/1658 and subgroups)}
- G06F 16/183: {Provision of network file services by network file servers, e.g. by using NFS, CIFS (network file access protocols H04L67/1097)}
- G06F 16/1844: {Management specifically adapted to replicated file systems}
- G06F 16/2358: {Change logging, detection, and notification (replication G06F16/27)}
- G06F 16/2379: {Updates performed during online database operations; commit processing}
- G06F 16/27: Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
- G06F 16/273: {Asynchronous replication or reconciliation}
- G06F 16/275: {Synchronous replication}
- G06F 2201/80: Database-specific techniques
- G06F 2201/805: Real-time
- G06F 2201/82: Solving problems relating to consistency
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A Distributed Availability Group (DAG) spans two AGs, each spanning one or more replica nodes and functioning as primary or secondary AG. A primary AG is replicated to the secondary AG synchronously or asynchronously. A failover in the DAG results in the AGs swapping their roles. Multiple DAGs can be linked together as a chain, which provides many useful features including disaster recovery across geographical regions, massive read scale (numerous readable secondary nodes), online migration of databases (across different operating systems and computing environments). The systems using DAGs can replicate databases across multiple independent high availability (HA) failover clusters using complex replication topologies and allow for manual failover and failback. The systems allow chaining of multiple AGs to provision a treelike structure of replicas and numerous secondary replicas without impacting performance. The systems automatically seed new database replicas that to facilitate building a complex topology of DAGs.

## Claims

### Claim 1

A system comprising:
a processor and memory; and
an application executed by the processor and the memory to:
configure a primary availability group to perform read and write operations for an online transaction processing system using a relational database on the primary availability group, the primary availability group comprising a first cluster of servers;
cause a first log stream associated with the relational database to be sent from the primary availability group to a secondary availability group to create a replicated relational database on the secondary availability group, the secondary availability group comprising a second cluster of servers, the secondary availability group being configured to perform read-only operations for the online transaction processing system using the replicated relational database on the secondary availability group;
cause the secondary availability group to send the first log stream to an additional secondary availability group to create an additional replicated relational database on the additional secondary availability group, the additional secondary availability group being configured to perform additional read-only operations for the online transaction processing system using the additional replicated relational database;
automatically cause a second log stream associated with the relational database on the primary availability group to be sent from the primary availability group to the secondary availability group after the primary availability group generates a new log file following a write operation to the relational database on the primary availability group, the secondary availability group being configured to replicate the relational database using the second log stream and to perform read operations for the online transaction processing system using the replicated relational database; and
select, in response to a failure of the primary availability group, one of the secondary availability group and the additional secondary availability group to take over for the primary availability group and transition from performing the read-only operations for the online transaction processing system to performing the read and write operations for the online transaction processing system, the read and write operations being performed using either the replicated relational database on the secondary availability group or the additional replicated relational database on the additional secondary availability group.

### Claim 2 (depends on 1)

The system of claim 1, wherein the application is further configured to cause the first log stream to be sent directly to the secondary availability group along with a corresponding data stream without saving a copy of the first log stream or the corresponding data stream on the primary availability group.

### Claim 3 (depends on 1)

The system of claim 1 wherein the application is further configured to acknowledge the write operation to the relational database on the primary availability group as being successful after the primary availability group sends the second log stream associated with the relational database on the primary availability group to the secondary availability group following the write operation and after the secondary availability group replicates the relational database using the second log stream.

### Claim 4 (depends on 1)

The system of claim 1 wherein the primary availability group and the secondary availability group execute different operating systems.

### Claim 5 (depends on 1)

The system of claim 1 wherein the primary availability group and the secondary availability group execute different versions of an operating system.

### Claim 6 (depends on 1)

The system of claim 1 wherein one of the primary availability group and the secondary availability group is located in a cloud-based computing environment.

### Claim 7 (depends on 1)

The system of claim 1, wherein the application is further configured to acknowledge the write operation to the relational database on the primary availability group as being successful only after a majority of a plurality of secondary availability groups complete replicating the relational database following the write operation.

### Claim 8 (depends on 1)

The system of claim 1, wherein the application is further configured to acknowledge the write operation to the relational database on the primary availability group as being successful only after a plurality of secondary availability groups complete replicating the relational database following the write operation.

### Claim 9 (depends on 8)

The system of claim 8, wherein each secondary availability group is configured to indicate replication of the relational database on the secondary availability group as being complete only after the relational database has been replicated on all of the plurality of secondary availability groups following the write operation.

### Claim 10 (depends on 1)

The system of claim 1, wherein:
the primary availability group is located in a first time zone;
the secondary availability group is located in a second time zone that is different from the first time zone;
the secondary availability group is configured to perform the read operations for the online transaction processing system during a first time period of a day during which the primary availability group is configured to perform the read and write operations for the online transaction processing system; and
the secondary availability group is configured to take over and perform the read and write operations for the online transaction processing system during a second time period of the day during which the primary availability group is configured to perform the read operations for the online transaction processing system.

### Claim 11

A method comprising:
performing read and write operations for an online transaction processing system using a relational database on a primary availability group;
sending a first log stream from the primary availability group directly to a secondary availability group that is configured to perform read-only operations for the online transaction processing system using a replica of the relational database generated on the secondary availability group using the first log stream received from the primary availability group, the first log stream being sent to the secondary availability group following a write operation to the relational database;
causing the secondary availability group to send the first log stream to an additional secondary availability group to create an additional replicated relational database on the additional secondary availability group, the additional secondary availability group being configured to perform additional read-only operations for the online transaction processing system using the additional replicated relational database;
acknowledging the write operation to the relational database on the primary availability group as being successful in response to receiving an indication that the secondary availability group and the additional secondary availability group successfully completed replication of the relational database after receiving the first log stream from the primary availability group;
automatically sending a second log stream associated with the relational database on the primary availability group to the secondary availability group after the primary availability group generates a new log file following an additional write operation to the relational database on the primary availability group, the secondary availability group being configured to replicate the relational database using the second log stream and to perform the read operations for the online transaction processing system using the additional replicated relational database; and
causing one of the secondary availability group and the additional secondary availability group to transition, in response to a failure of the primary availability group, from performing the read-only operations for the online transaction processing system to performing the read and write operations for the online transaction processing system using the replica of the relational database.

### Claim 12 (depends on 11)

The method of claim 11 wherein the primary availability group and the secondary availability group execute different operating systems and are located in different geographical locations.

### Claim 13 (depends on 11)

The method of claim 11, further comprising causing the first log stream to be sent directly to the secondary availability group along with a corresponding data stream without saving a copy of the first log stream or the corresponding data stream on the primary availability group.

### Claim 14 (depends on 11)

The method of claim 11, further comprising acknowledging the write operation to the relational database on the primary availability group as being successful only after a plurality of secondary availability groups complete replicating the relational database following the write operation.

### Claim 15

A system comprising:
a processor and memory; and
an application executed by the processor and the memory to:
perform read and write operations for an online transaction processing system using a relational database on a primary availability group;
send a first log stream from the primary availability group directly to a secondary availability group that is configured to perform read-only operations for the online transaction processing system using a replica of the relational database generated on the secondary availability group using the first log stream received from the primary availability group, the first log stream being sent to the secondary availability group following a write operation to the relational database;
cause the secondary availability group to send the first log stream to an additional secondary availability group to create an additional replicated relational database on the additional secondary availability group, the additional secondary availability group being configured to perform additional read-only operations for the online transaction processing system using the additional replicated relational database;
acknowledge the write operation to the relational database on the primary availability group as being successful in response to receiving an indication that the secondary availability group and the additional secondary availability group successfully completed replication of the relational database after receiving the first log stream from the primary availability group;
automatically send a second log stream associated with the relational database on the primary availability group to the secondary availability group after the primary availability group generates a new log file following an additional write operation to the relational database on the primary availability group, the secondary availability group being configured to replicate the relational database using the second log stream and to perform the read operations for the online transaction processing system using the additional replicated relational database; and
cause one of the secondary availability group and the additional secondary availability group to transition, in response to a failure of the primary availability group, from performing the read-only operations for the online transaction processing system to performing the read and write operations for the online transaction processing system using the replica of the relational database.

### Claim 16 (depends on 15)

The system of claim 15 wherein the primary availability group and the secondary availability group execute different operating systems and are located in different geographical locations.

### Claim 17 (depends on 15)

The system of claim 15, wherein the application is further configured to cause the first log stream to be sent directly to the secondary availability group along with a corresponding data stream without saving a copy of the first log stream or the corresponding data stream on the primary availability group.

### Claim 18 (depends on 15)

The system of claim 15, wherein the application is further configured to cause the write operation to be acknowledged to the relational database on the primary availability group as being successful only after a plurality of secondary availability groups complete replicating the relational database following the write operation.

### Claim 19 (depends on 15)

The system of claim 15, wherein:
the primary availability group is located in a first time zone;
the secondary availability group is located in a second time zone that is different from the first time zone;
the secondary availability group is configured to perform the read operations for the online transaction processing system during a first time period of a day during which the primary availability group is configured to perform the read and write operations for the online transaction processing system; and
the secondary availability group is configured to take over and perform the read and write operations for the online transaction processing system during a second time period of the day during which the primary availability group is configured to perform the read operations for the online transaction processing system.
