---
title: "How we rebuilt the search architecture for high availability in GitHub Enterprise Server"
description: "GitHub Enterprise Server's HA mode is replacing its single Elasticsearch cluster spanning primary and replica nodes with independent single-node clusters per server, linked by Elasticsearch Cross Cluster Replication (CCR)."
url: "https://swe.quest/articles/how-we-rebuilt-the-search-architecture-for-high-availability-in-github-01873f5db2c5c7f0"
canonical: "https://github.blog/engineering/architecture-optimization/how-we-rebuilt-the-search-architecture-for-high-availability-in-github-enterprise-server/"
source: "GitHub Engineering"
published: "2026-03-03"
difficulty: "medium"
kind: "Case study"
reading_minutes: 5
tags: ["search","replication","system-design","distributed-systems"]
---

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

A post on [GitHub Engineering](https://swe.quest/sources/github.md), published 2026-03-03, 5 min read, Case study. Original: [https://github.blog/engineering/architecture-optimization/how-we-rebuilt-the-search-architecture-for-high-availability-in-github-enterprise-server/](https://github.blog/engineering/architecture-optimization/how-we-rebuilt-the-search-architecture-for-high-availability-in-github-enterprise-server/)

## Summary

GitHub Enterprise Server's HA mode is replacing its single Elasticsearch cluster spanning primary and replica nodes with independent single-node clusters per server, linked by Elasticsearch Cross Cluster Replication (CCR). The old clustered design let Elasticsearch move primary shards onto read-only replicas, which could deadlock upgrades and maintenance: the replica waited for a healthy cluster that couldn't recover until the replica rejoined. CCR copies only data already persisted to Lucene segments and fits the leader/follower model. Because auto-follow only covers new indexes, GitHub added a bootstrap step that attaches followers to existing indexes and built custom workflows for failover, index deletion and upgrades. CCR mode is opt-in from 3.19.1 via \`ghe-config app.elasticsearch.ccr true\` and will become the default over the next two years.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Search](https://swe.quest/tags/search.md) (Backend & APIs)
- [Replication](https://swe.quest/tags/replication.md) (Distributed systems)
- [System design](https://swe.quest/tags/system-design.md) (Architecture & design)
- [Distributed systems](https://swe.quest/tags/distributed-systems.md) (Distributed systems)

## Prerequisites

- Elasticsearch shards and clusters ([easy posts on Search](https://swe.quest/tags/search.md?difficulty=easy))
- leader/follower replication ([easy posts on Replication](https://swe.quest/tags/replication.md?difficulty=easy))
- high-availability failover

## Keywords

GitHub Enterprise Server, Elasticsearch, Cross Cluster Replication, Lucene

## Related posts

- [Managing Elasticsearch Reindex at Scale: Performance, Reliability, and Observability](https://swe.quest/articles/managing-elasticsearch-reindex-at-scale-performance-reliability-and-12c26b4dcf9e376c.md): Palantir · 2026-06-08 · Medium · 14 min read · Search, Schema migrations, Resilience, Observability, System design
  Palantir's Gotham document store rebuilds Elasticsearch indices from its transactional database (the source of truth) rather than using Elasticsearch's \_reindex API, so search keeps serving live traffic throughout.
- [Break Stuff on Purpose](https://swe.quest/articles/break-stuff-on-purpose-87dc2221ffb9f4a6.md): Slack Engineering · 2024-12-10 · Medium · 5 min read · Chaos engineering, Incidents & postmortems, Observability, SRE
  Slack's internal Kibana cluster failed in January 2024 after running out of disk, a consequence of co-locating its Elasticsearch storage on the same hosts as the application.
- [Building Git infrastructure for agent-scale development](https://swe.quest/articles/building-git-infrastructure-for-agent-scale-development-3f8b84d59639a2ff.md): GitHub Engineering · 2026-10-06 · Easy · 8 min read · Version control, Distributed systems, Scaling, Replication, Storage systems
  GitHub is rebuilding its Git storage layer because agent-driven workloads are colliding with the design of Spokes.
- [MySQL High Availability at GitHub](https://swe.quest/articles/mysql-high-availability-at-github-eab0c6a4cc5f7bdc.md): GitHub Engineering · 2018-06-20 · Medium · 15 min read · MySQL, Replication, Load balancing, Consensus, Resilience
  GitHub replaced VIP- and DNS-based MySQL primary discovery with a decoupled pipeline: orchestrator/raft detects failures and promotes a new primary, each orchestrator node writes the new identity to its local Consul KV store, and consul-template reconfigures GLB/HAProxy writer pools reached via anycast.
- [Zero-Copy Migration: How Yelp Moved Its Cassandra Fleet Between Kubernetes Clusters](https://swe.quest/articles/zero-copy-migration-how-yelp-moved-its-cassandra-fleet-between-kubernetes-0d6b3f088cd34645.md): Yelp Engineering · 2026-11-09 · Medium · 12 min read · Kubernetes, Distributed databases, Storage systems, Cloud platforms, Refactoring & migrations
  Yelp moved roughly 1000 Cassandra pods and nearly a petabyte of data from self-managed Kubernetes clusters to Amazon EKS without streaming any data.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
