# Overview of Hybrid Replication

Hybrid replication leverages standard, asynchronous MariaDB Replication to copy data from a synchronous MariaDB Galera Cluster to an external server or another cluster. This configuration establishes a one-way data flow, where the entire Galera Cluster serves as the source (primary) for one or more asynchronous replicas. This advanced setup combines the strengths of both replication methods: synchronous replication ensures high availability within the primary site, while asynchronous replication caters to specific use cases, allowing for flexible data distribution.

## Common Use Cases

Implementing a hybrid replication setup is a powerful technique for solving several common business needs:

| Use Case                     | Description                                                                                                                                             |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Disaster Recovery (DR)       | Galera Cluster provides high availability and automatic failover. Use asynchronous replication for a distant replica, promoting it during site outages. |
| Feeding Analytics/BI Systems | Replicate from OLTP Galera Cluster to a data warehouse or analytics server to run heavy queries without affecting production performance.               |
| Upgrades and Migrations      | Use an asynchronous replica to test new MariaDB versions or migrate to new hardware with minimal downtime.                                              |

## Key Challenges and Considerations

Before implementing a hybrid setup, it is critical to understand the technical challenges:

| Challenge           | Description                                                                                                                                    |
| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| GTID Management     | Galera Cluster and MariaDB Replication use different GTID formats and implementations, requiring careful configuration to avoid conflicts.     |
| Replication Lag     | The external replica experiences the usual latencies of asynchronous replication, causing it to lag behind the real-time state of the cluster. |
| Failover Complexity | Failover within Galera Cluster is automatic, but failing over to the asynchronous DR replica is manual and requires careful planning.          |

<sub>*This page is licensed: CC BY-SA / Gnu FDL*</sub>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/galera-cluster/high-availability/using-mariadb-replication-with-mariadb-galera-cluster/overview-of-hybrid-replication.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
