managing-database-replication

Installation
SKILL.md

Database Replication Manager

Overview

Configure and manage database replication topologies for PostgreSQL (streaming replication, logical replication), MySQL (source-replica, group replication), and MongoDB (replica sets). This skill covers primary-replica setup, read scaling through replica routing, failover automation, replication lag monitoring, and conflict resolution for multi-primary configurations.

Prerequisites

  • Superuser or replication-role credentials on primary and replica servers
  • Network connectivity between all replication nodes (verify with pg_isready or mysqladmin ping)
  • psql, mysql, or mongosh CLI tools installed on all nodes
  • Matching major database versions across all replication nodes
  • Sufficient disk space on replicas (equal to or greater than primary)
  • SSH access to replica servers for initial base backup transfer

Instructions

  1. Choose the replication topology based on requirements:
    • Single primary + read replicas: Best for read-heavy workloads. All writes go to primary; reads distributed across replicas.
    • Multi-primary (active-active): Best for geographic distribution. Requires conflict resolution. Use PostgreSQL logical replication or MySQL Group Replication.
Related skills
Installs
1
GitHub Stars
2.2K
First Seen
Mar 21, 2026