5. Real Cases: How Tech Stacks Evolve
Now that we understand the theory, let's look at real cases to see how tech stacks evolve in actual projects.
5.1 GitHub: From Ruby to Multi-Language Coexistence
2008: GitHub launched, entirely built with Ruby on Rails.
Why Rails?
- Founders were active members of the Ruby community
- Rapid development, suitable for startups
- "Convention over configuration" reduces decision fatigue
Early 2010s: Problems emerged
- User base exploded; Rails became a performance bottleneck
- Ruby's GIL (Global Interpreter Lock) limited multi-threaded performance
- Every deployment required restarting the entire application, causing long downtime
Solution: Incremental refactoring
GitHub adopted the Strangler Fig Pattern:
- Identify bottlenecks: Find the slowest functional modules (e.g., code search, notification system)
- Gradual replacement: Rewrite high-performance services in Go
- API gateway: Frontend calls the new service first, falling back to the old service on failure
- Monitor and validate: Ensure new service stability before fully decommissioning old code
2015: GitHub used Go to rewrite the code search feature — query speed improved 10x.
2018: The notification system migrated from Rails to Go — latency dropped from 2 seconds to 100 milliseconds.
Today's GitHub tech stack:
- Main site: Still Rails, but core features have been split into microservices
- High-performance services: Go (search, notifications, Git operations)
- Frontend: React + TypeScript
- Infrastructure: Kubernetes + MySQL + Redis
Key insight:
Tech stack evolution is not a revolution — it's incremental improvement. Choosing the wrong language isn't fatal, but refusing to improve is.
5.2 Twitter: From Ruby to Java
2006: Twitter launched, built with Ruby on Rails.
Problems emerged:
- Rapid user growth, frequent outages (the famous "Fail Whale" era)
- Rails couldn't handle high concurrency; every tweet required a database query
- Response times grew from 200ms to 5 seconds
Evolution process:
- 2008: Introduced Scala (JVM language) for message queue processing
- 2010: Core search functionality migrated to Java (Lucene)
- 2011: Entire tweet stream processing migrated to Java
- 2017: Fully migrated to microservices architecture with multi-language coexistence
Today's Twitter tech stack:
- Frontend: React + JavaScript
- Backend services: Java, Scala, Go, Python mixed
- Message queue: Kafka (Scala/Java)
- Storage: HDFS, Cassandra, Redis
Key insight:
Don't tear everything down and rebuild — migrate incrementally. It took Twitter 5 years to complete its tech stack transformation.