Understanding Data Replication in High Availability Configurations for GitHub Enterprise Server #190702
AbstractRunning GitHub Enterprise Server in a High Availability (HA) configuration? You need to understand how data replicates between your primary and replica appliances - for capacity planning, troubleshooting, and ensuring clean failovers. The official documentation covers HA setup. This article goes deeper: how replication works under the hood, what affects performance, and what to watch to keep things healthy. Problem StatementGitHub Enterprise Server administrators running HA configurations often ask:
The public docs cover setup and failover, but don't explain replication internals, performance factors, or troubleshooting in depth. How Replication WorksGitHub Enterprise Server uses different replication strategies for different data types. Understanding these distinctions helps you troubleshoot issues and plan capacity. The hub-and-spoke modelReplication follows a hub-and-spoke architecture:
Each node has a unique UUID, shown as Git repository replicationGit repositories replicate through the built-in "spokes" system:
Replication is asynchronous: your push succeeds without waiting for replicas to catch up. Maintenance operations run with a two-hour timeout. If they don't finish, the system retries. Backups pause repository maintenance to ensure a clean state. Route updates happen automatically after configuration changes, but you may need MySQL database replicationMySQL uses binary log (binlog) replication:
You can check MySQL replication lag with Redis replicationRedis uses asynchronous replication:
Since Redis is in-memory, replication is fast. Elasticsearch replicationElasticsearch runs on both primary and replica in HA configurations, maintaining index replication across nodes. The replica keeps a synchronized copy of all search indexes. For more on how GitHub Enterprise Server rebuilt search replication for high availability, see this engineering blog post. Storage and asset replicationFile-based storage (user avatars, release assets, Git LFS objects) replicates with rsync:
Pages replicationGitHub Pages sites replicate through the spokes system, just like Git repositories. Factors Affecting Replication PerformanceNetwork bandwidth and latencySince all replication traffic flows through the VPN between appliances:
Monitor network throughput between your appliances, especially if you see persistent lag. Repository size and activityLarger repos and higher push rates increase replication load:
Maintenance operationsRepository maintenance directly affects replication:
The longer you wait between maintenance runs, the more stale refs accumulate - making the next run take even longer. Resource constraintsCPU, memory, and disk I/O on both primary and replica affect replication:
If Monitoring Replication HealthUsing ghe-repl-statusRun $ ghe-repl-status
OK: mysql replication is in sync
OK: redis replication is in sync
OK: elasticsearch cluster is in sync
OK: git replication is in sync
OK: pages replication is in sync
OK: alambic replication is in sync
OK: git-hooks replication is in sync
OK: consul replication is in syncAdd Checking repository network healthUse # Show summary of repo placement and replica health
ghe-spokesctl status
# Show detailed replica information for a repository
ghe-spokesctl check -v owner/repo
# Check which servers a repository is stored on
ghe-spokesctl routes owner/repo
# Check and fix repository issues
ghe-spokesctl check -v --fix owner/repoWatch for bad checksums - they mean replica data doesn't match the primary. Job queue monitoringCheck job queue backlogs, especially the maintenance queue: ghe-aqueduct-infoLarge backlogs signal system stress and can cause replication delays. The older Key metrics to watchWhen analyzing support bundles or monitoring HA health, check these in order:
HA Configuration PatternsTwo-node high availabilityIn a standard two-node configuration (one primary, one replica):
Geo-replicationWith geo-replication, multiple replicas in different locations receive data from the primary:
Trade-offs:
Best PracticesNetwork design
Capacity planning
Repository management
Backup coordinationBackups pause repository maintenance to ensure a clean state. Schedule backups considering:
Troubleshooting Common IssuesRepositories with bad checksumsSymptom: Common causes:
Resolution:
Repository network route issuesSymptom: Repositories not replicating after configuration changes Common causes:
Resolution: Run Persistent replication lagSymptom: Common causes:
Resolution:
SummaryUnderstanding how data replicates in your HA configuration helps you plan capacity, troubleshoot performance, and ensure clean failovers. Key takeaways:
When you hit replication issues, work through the diagnostics systematically: resource utilization first, then spokes health, then specific repository networks. Most problems stem from resource constraints or network limitations - not bugs in the replication system. Planning a new HA deployment, dealing with persistent lag, or need help troubleshooting? Reach out to GitHub Support with a support bundle. We're happy to help analyze your configuration. |
Replies: 6 comments 1 reply
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
|
✅ Verified by GitHub
Click to openAbstractRunning GitHub Enterprise Server in a High Availability (HA) configuration? You need to understand how data replicates between your primary and replica appliances - for capacity planning, troubleshooting, and ensuring clean failovers. The official documentation covers HA setup. This article goes deeper: how replication works under the hood, what affects performance, and what to watch to keep things healthy. Problem StatementGitHub Enterprise Server administrators running HA configurations often ask:
The public docs cover setup and failover, but don't explain replication internals, performance factors, or troubleshooting in depth. How Replication WorksGitHub Enterprise Server uses different replication strategies for different data types. Understanding these distinctions helps you troubleshoot issues and plan capacity. The hub-and-spoke modelReplication follows a hub-and-spoke architecture:
Each node has a unique UUID, shown as Git repository replicationGit repositories replicate through the built-in "spokes" system:
Replication is asynchronous: your push succeeds without waiting for replicas to catch up. Maintenance operations run with a two-hour timeout. If they don't finish, the system retries. Backups pause repository maintenance to ensure a clean state. Route updates happen automatically after configuration changes, but you may need MySQL database replicationMySQL uses binary log (binlog) replication:
You can check MySQL replication lag with Redis replicationRedis uses asynchronous replication:
Since Redis is in-memory, replication is fast. Elasticsearch replicationElasticsearch runs on both primary and replica in HA configurations, maintaining index replication across nodes. The replica keeps a synchronized copy of all search indexes. For more on how GitHub Enterprise Server rebuilt search replication for high availability, see this engineering blog post. Storage and asset replicationFile-based storage (user avatars, release assets, Git LFS objects) replicates with rsync:
Pages replicationGitHub Pages sites replicate through the spokes system, just like Git repositories. Factors Affecting Replication PerformanceNetwork bandwidth and latencySince all replication traffic flows through the VPN between appliances:
Monitor network throughput between your appliances, especially if you see persistent lag. Repository size and activityLarger repos and higher push rates increase replication load:
Maintenance operationsRepository maintenance directly affects replication:
The longer you wait between maintenance runs, the more stale refs accumulate - making the next run take even longer. Resource constraintsCPU, memory, and disk I/O on both primary and replica affect replication:
If Monitoring Replication HealthUsing ghe-repl-statusRun $ ghe-repl-status
OK: mysql replication is in sync
OK: redis replication is in sync
OK: elasticsearch cluster is in sync
OK: git replication is in sync
OK: pages replication is in sync
OK: alambic replication is in sync
OK: git-hooks replication is in sync
OK: consul replication is in syncAdd Checking repository network healthUse # Show summary of repo placement and replica health
ghe-spokesctl status
# Show detailed replica information for a repository
ghe-spokesctl check -v owner/repo
# Check which servers a repository is stored on
ghe-spokesctl routes owner/repo
# Check and fix repository issues
ghe-spokesctl check -v --fix owner/repoWatch for bad checksums - they mean replica data doesn't match the primary. Job queue monitoringCheck job queue backlogs, especially the maintenance queue: ghe-aqueduct-infoLarge backlogs signal system stress and can cause replication delays. The older Key metrics to watchWhen analyzing support bundles or monitoring HA health, check these in order:
HA Configuration PatternsTwo-node high availabilityIn a standard two-node configuration (one primary, one replica):
Geo-replicationWith geo-replication, multiple replicas in different locations receive data from the primary:
Trade-offs:
Best PracticesNetwork design
Capacity planning
Repository management
Backup coordinationBackups pause repository maintenance to ensure a clean state. Schedule backups considering:
Troubleshooting Common IssuesRepositories with bad checksumsSymptom: Common causes:
Resolution:
Repository network route issuesSymptom: Repositories not replicating after configuration changes Common causes:
Resolution: Run Persistent replication lagSymptom: Common causes:
Resolution:
SummaryUnderstanding how data replicates in your HA configuration helps you plan capacity, troubleshoot performance, and ensure clean failovers. Key takeaways:
When you hit replication issues, work through the diagnostics systematically: resource utilization first, then spokes health, then specific repository networks. Most problems stem from resource constraints or network limitations - not bugs in the replication system. Planning a new HA deployment, dealing with persistent lag, or need help troubleshooting? Reach out to GitHub Support with a support bundle. We're happy to help analyze your configuration. Details |
✅ Verified by GitHub
Click to open
Abstract
Running GitHub Enterprise Server in a High Availability (HA) configuration? You need to understand how data replicates between your primary and replica appliances - for capacity planning, troubleshooting, and ensuring clean failovers. The official documentation covers HA setup. This article goes deeper: how replication works under…