GitHub: Spokes 3-Way Git Replication & Freno MySQL Throttling
The infrastructure behind 100M+ developers: Spokes three-way Git repository replication, Vitess horizontal database sharding, and Freno cooperative MySQL replica throttling.
GitHub stores petabytes of Git repositories and relational metadata. Spokes maintains three real-time replicas of every Git repository across physically isolated hosts with quorum-based consistency, while Freno continuously monitors replication lag to throttle background schema changes.
Spokes: 3-Way Fault-Tolerant Git Replication
Hundreds of millions of Git pushes and billions of daily API requestsGuaranteeing zero data loss and read availability for millions of Git push and pull operations across server failures.
Custom Spokes architecture replicates Git bare repositories across 3 servers. Two servers must agree via voting before a Git update reference is committed.
Synchronous voting latency on push vs mathematical durability guarantee.
Explain why Git replication is harder than block storage replication: Git references (refs) must update atomically with packfiles.
HTTP Methods, Status Codes, & Headers
Master the RESTful grammar of the web: Idempotency semantics, safe vs unsafe methods, status classes (2xx, 3xx, 4xx, 5xx), and caching/security headers.
Load Balancers: What, Why, & Single Point of Failure
Learn the foundational role of load balancers: Eliminating single points of failure, horizontal traffic distribution, health checking, and active-passive failover.
Zero-Downtime Schema Migrations at Scale (gh-ost / pt-online-schema-change)
Alter massive tables without locking: The Expand/Contract pattern, shadow tables, binlog streaming, and preventing metadata locks.
Cache-Aside (Lazy Loading)
Master the most popular caching pattern: Application-orchestrated read-through, lazy population, TTL expiration, and cache invalidation.
Webhooks vs Polling vs Message Queues
Select inter-system communication mechanisms: Push webhooks across SaaS boundaries, HTTP short/long polling, internal VPC message queues, HMAC-SHA256 signatures, and ingestion buffering.
GraphQL Fundamentals & Query Language
Solve over-fetching and under-fetching: Schema Definition Language (SDL), Queries, Mutations, Subscriptions, and client-specified data fetching.
JWT Deep Dive: Structure, Signing, & Critical Pitfalls
Master JSON Web Tokens: Base64URL anatomy, symmetric HS256 vs asymmetric RS256/ES256, JWKS key rotation, the "alg: none" vulnerability, RSA-to-HMAC key confusion attacks, and JWS vs JWE differences.
Design-Level Defenses: SQL Injection, XSS, & CSRF
Architect invulnerable web systems: Parameterized prepared statements against SQL Injection, Content Security Policy (CSP) & HttpOnly cookies against XSS, and SameSite cookie attributes with Synchronizer Tokens against CSRF.
GitHub Engineering Blog • 2016
GitHub Engineering Blog • 2017
Ready to Practice GitHub-Style Systems?
Start with foundational networking, compute, and storage, and build up to complex distributed consensus.