Home / Companies / GitHub / Blog / Post Details
Content Deep Dive

Stretching Spokes

Blog post from GitHub

Post Details
Company
Date Published
Author
Michael Haggerty
Word Count
1,419
Language
English
Hacker News Points
-
Summary

GitHub's Spokes system enhances the distribution of Git repositories across widely separated datacenters, replacing the older DRBD filesystem block-level replication with a more flexible Git application-level replication approach. Spokes ensures data integrity by maintaining multiple replica copies, utilizing strategies such as the three-phase commit protocol to handle high-latency challenges and optimize both read and write operations across distant replicas. These advancements enable GitHub to sustain high update rates for its nearly 70 million repositories, even when faced with complex workflows and internal bookkeeping tasks. By incrementally computing checksums to verify synchronization and prioritizing user-initiated updates, Spokes enhances the efficiency and reliability of reference updates. This system not only improves disaster resilience but also accelerates Git read operations for users by directing them to the nearest synchronized replica. The implementation of Spokes in both GitHub.com and GitHub Enterprise provides significant benefits, including improved speed, robustness, and the ability to handle geo-replication, thereby enhancing user experience and operational flexibility.