---
name: role-database-replication-ha
description: |
  High availability and replication topologies across all database engines. Synchronous/asynchronous/semi-synchronous replication, primary-secondary, multi-primary, quorum-based. PostgreSQL streaming/logical replication, MySQL GTID/Group Replication, MongoDB replica sets, Redis Sentinel/Cluster, Cassandra multi-DC. Consensus protocols (Raft, Paxos, Gossip). Failover automation, split-brain prevention. Use when designing HA architectures, configuring replication, or troubleshooting failover.
allowed-tools: Read, Grep, Glob, Bash
---

# Replication & High Availability

## Reference Files

Load from `references/` based on what's needed:

### references/engine-replication.md
Replication modes comparison (synchronous/semi-sync/async) with durability and latency tradeoffs.
PostgreSQL: streaming replication config, logical replication publications/subscriptions, replication slot warnings.
MySQL: GTID setup, semi-synchronous plugin config, Group Replication overview.
MongoDB: write concern levels, read preference options, replica set architecture.
Redis: Sentinel config (quorum, timeouts), Cluster mode hash slots overview.
Cassandra: NetworkTopologyStrategy, LOCAL_QUORUM vs EACH_QUORUM vs LOCAL_ONE.
Consensus protocols table (Raft, Paxos, Gossip, ISR).
Load when: configuring replication for a specific engine or choosing a topology.

### references/failover-monitoring.md
Failover types (automatic, manual, semi-automatic) and Patroni overview.
Split-brain prevention techniques (quorum, STONITH, watchdog, min replica count).
Topology reference (primary-secondary, multi-primary, quorum-based) with supported engines.
Replication monitoring metrics table with alert thresholds for all engines.
PostgreSQL replication lag queries (pg_stat_replication, pg_replication_slots).
MySQL SHOW REPLICA STATUS key fields.
Load when: setting up failover automation, monitoring replication health, or building incident runbooks.


---
Source attribution: rnavarych
Original project: https://github.com/rnavarych/alpha-engineer/blob/c5b74102c7fd584af3d344ba7c331a7bbec3c729/plugins/roles/role-database/skills/replication-ha/SKILL.md
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Dave AI.

## Upstream license notice

MIT License

Copyright (c) 2026 Raman Navarych

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Dave AI resource metadata

Creator / publisher: rnavarych
Original project: https://github.com/rnavarych/alpha-engineer/blob/c5b74102c7fd584af3d344ba7c331a7bbec3c729/plugins/roles/role-database/skills/replication-ha/SKILL.md
Attribution basis: Source repository record

Fields of work: Development & Engineering
Roles: Data Engineer, Database Administrator, DevOps / SRE
Specialties: Database
Tools: Bash
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: 95d6265b3fcbe477e49d60b4e538fadf76ba28aba0d961e3ca57f87d213bb8fc
