BlogsGitHubHigh Availability Search Architecture for GitHub Enterprise Server

High Availability Search Architecture for GitHub Enterprise Server

High Availability Search Architecture for GitHub Enterprise Server

1
posts
2026

This feature thread tracks the evolution of search architecture for high availability in GitHub Enterprise Server. Initially, HA setups relied on a leader/follower pattern with a clustered Elasticsearch, which led to issues with shard management and potential system lockups. This post details the successful migration to Elasticsearch's Cross Cluster Replication (CCR) feature, enabling independent single-node Elasticsearch clusters on primary and replica servers. This new architecture ensures data durability and simplifies management by leveraging CCR for index data replication between primary and replica nodes, moving away from problematic clustered Elasticsearch setups. Custom workflows for failover, index deletion, and upgrades have been engineered to manage the index lifecycle beyond CCR's document replication.

2026

How we rebuilt the search architecture for high availability in GitHub Enterprise Server

3/3/2026

This post details the migration of GitHub Enterprise Server's high availability search architecture from a clustered Elasticsearch setup to utilizing Elasticsearch's Cross Cluster Replication (CCR). It explains the challenges of the previous leader/follower pattern with clustered Elasticsearch, including shard management issues and potential system lockups due to primary shard movement. The new architecture employs independent single-node Elasticsearch clusters on primary and replica servers, with CCR handling index data replication. The post includes a pseudocode example of the bootstrap workflow for enabling CCR, highlighting the need for custom engineering for failover, index deletion, and upgrades, as Elasticsearch's CCR primarily handles document replication.