GitHub Engineering rebuilt the search architecture in GitHub Enterprise Server using Elasticsearch's Cross Cluster Replication (CCR) to achieve true high availability.
•The previous HA setup clustered Elasticsearch across primary and replica nodes, causing deadlock states when primary shards migrated to read-only replica nodes
•The new architecture runs independent single-node Elasticsearch clusters per instance, connected via CCR in a native leader/follower pattern
•CCR replicates data at the Lucene segment level after durable persistence, preventing data from ending up on read-only nodes
•A custom bootstrap step attaches followers to pre-existing indexes, then enables auto-follow for indexes created in the future
•Available in GitHub Enterprise Server 3.19.1 via `ghe-config app.elasticsearch.ccr true`; will become the default over the next two years