Hi everyone! I am Hu Ge, and today we will discuss an interesting topic: why Alibaba sticks to Java while ByteDance and Douyin are enthusiastically using Go and Rust.
Why is that? 🤔 Let’s start with some technical and “historical baggage” and also discuss the “language distribution” within large companies.
Alibaba’s attachment to Java can be traced back to the early days of Taobao. At that time, Taobao’s tech stack was still PHP because PHP is quick for development and easy to get started. However, as the user base surged, PHP clearly couldn’t handle the high concurrency and massive transaction pressure, especially in sensitive transaction data situations.
Ultimately, Taobao decided to switch its tech stack to Java, even seeking help from Sun (the old owner of Java). After all, for a trading platform that requires stability, security, and high concurrency, system performance and fault tolerance are the lifeblood of the business, and code quality cannot be neglected.
Since that “switch”, Alibaba has been tightly bound to Java for simple reasons: first, technical baggage; second, business nature; third, developer ecosystem.
Java has relatively high development efficiency and reliable performance, which can well meet Alibaba’s high concurrency needs in various transaction scenarios. Every year during Double 11, those massive concurrent “bloodbaths” are a spectacle for many, but Alibaba’s tech team has long been seasoned Java veterans, withstanding the flood of hundreds of billions of orders. To make them give up Java and adapt to the development logic of a new language? The cost is not trivial.
ByteDance’s New Favorites: Go & Rust
On the other hand, emerging companies like ByteDance appeared in a relatively different environment. ByteDance’s core business—video recommendation—is quite different from Taobao’s high-concurrency trading scenarios.
If Douyin recommends the wrong video? At most, users will just swipe away, nothing serious; but if Alibaba has a payment amount discrepancy, users might explode on the spot! This is the difference in technical preferences brought about by the different scenarios. ByteDance’s preference for Go and Rust is because these languages are more suitable for new businesses, such as high-concurrency services and underlying system optimizations.
ByteDance’s business has no historical baggage, and the infrastructure can be flexibly chosen. When ByteDance started building its business, Go was just rising in the tech ecosystem. This language has the efficiency close to C++ while offering greater simplicity than Java, making it very suitable for server-side development in the internet.
Go is naturally suitable for the “cloud computing + microservices” model, where applications are very flexible and adaptable, while Rust’s security and efficient memory management capabilities make it a powerful tool for developing underlying modules.
The technical style of domestic internet companies is closely related to their “regional origins”.
For example, Alibaba is based in Hangzhou, and the team is relatively closed, so Java became their “core language”.
In contrast, ByteDance and Meituan are located in Beijing, influenced by Tencent and Baidu’s technical radiation, which made C++ and PHP the mainstream choices.
ByteDance inherits this tradition of favoring C-like languages while choosing the more efficient and clear Go for server-side development, with Rust chosen based on the need for updates in the underlying architecture.
This “regional technical characteristic” also leads to different talent preferences for each company.
Alibaba prefers Java developers, while ByteDance favors engineers with backgrounds in PHP, Go, and C++. The result is that different companies form “technical barriers” in language selection, which greatly impacts their subsequent language updates and adjustments.
“Migration Costs” vs “Migration Benefits”
From a technical selection perspective, when a company decides whether to switch languages, it must consider not only development efficiency but also the entire team’s learning costs, codebase migration costs, and the code quality and stability accumulated on the original technology base.
In this regard, Java’s attractiveness to Alibaba is irreplaceable: first, much of Alibaba’s underlying code and core modules are written in Java, which is stable and mature; second, Alibaba has accumulated a large number of Java developers and technical resources over the years, which is Alibaba’s core technical asset.
Go is great, simple and clear, with high performance, but it lacks the object-oriented programming features of Java. Rust, although excellent at the system level, has a significant impact on developers’ learning costs and code migration. For Alibaba, which has years of business and technical accumulation, hastily switching to Go or Rust may not yield significant benefits and could instead pose business risks due to instability.
In fact, whether it is Java, Go, or Rust, none of them are the absolute “optimal choice”; different languages are suitable for different scenarios. Alibaba needs to handle complex trading systems, and Java’s stability and performance optimizations make it perform excellently in such scenarios.
Java combines a powerful ecosystem and rich development frameworks (like Spring), solidifying its position in large internet companies. On the other hand, ByteDance gains significant advantages in data-intensive and high-concurrency scenarios with Go and Rust.
Go’s outstanding concurrency handling capabilities are particularly suitable for ByteDance’s recommendation system. Rust has even secured the “throne” of underlying development, excelling in system-level security and memory management. For instance, using Rust for efficient communication in Feishu’s communication layer is an excellent choice.
However, even though we see Alibaba mainly using Java, while ByteDance leans towards Go and Rust, in reality, these large companies are “jack-of-all-trades”. They all use multiple programming languages to support different modules.
Alibaba’s big data field relies on Hadoop, while Rust has also been introduced in cloud-native technology and middleware development, and PHP is still used in some businesses. Similarly, ByteDance’s tech stack also includes languages like Java and C++.
To summarize: there is no “optimal” technology language, only the “most suitable”.
The preference for programming languages in each company is determined by history, region, and business scenarios. From Alibaba’s perspective, the continued dominance of Java is not only because it is stable, but also due to the high “sunk costs” of technical accumulation within this architecture system. Emerging companies like ByteDance, with fewer historical burdens, naturally dare to try lighter and faster Go and Rust.
If a new language that combines efficiency, stability, and convenience emerges in the future, it may trigger a new technological revolution. But until then, Java remains Alibaba’s undisputed “number one programming language”.
For those interested in programming and the workplace, you can contact me on WeChat:golang404, and I will add you to the “programmer group chat”.
🔥 Hu Ge’s Private Collection Hot Recommendations 🔥
As an experienced coder, Hu Ge has compiled the most comprehensive“GO Backend Development Resource Collection”.
The resources include “IDEA Video Tutorials”, “The Most Comprehensive GO Interview Question Bank”, “The Most Comprehensive Project Practical Source Code and Videos”, and “Graduation Design System Source Code”, totaling up to650GB.All of it isavailable for free! It comprehensively meets the learning needs of programmers at various stages!