Home >Backend Development >Golang >Does ByteDance need to use Go language?
ByteDance needs to use go language. ByteDance has fully embraced the Go language, and there are tens of thousands of microservices within the company written using Golang. The reason is that ByteDance pays more attention to efficiency, while the Go language is easy to get started, has low learning difficulty, high development efficiency, and better performance; in addition, the two artifacts of Goroutine and Channel can very well solve the problems of concurrent and asynchronous programming.
The operating environment of this tutorial: Windows 7 system, GO version 1.18, Dell G3 computer.
With the advent of the cloud computing era, Go has become more and more widely used and has become the preferred programming language. Moreover, salaries are also rising.
Because the Go language has the characteristics of simple syntax and high performance, it is used by major domestic and foreign companies such as Google, Tencent, Byte, etc. In particular, Byte fully embraces Go. The reason was initially due to performance issues. Replace Python with Go, which is easy to learn, has high performance, and is easy to deploy. In general, the characteristics of Go language are as follows:
Simple syntax and gentle learning curve
High performance and high concurrency
Rich standard library
Complete tool chain
Static link
Quick compilation
Cross-platform
Garbage collection
A simple example Example
You can start a web service with two simple lines of code
package main import ( "net/http" ) func main() { http.Handle("/", http.FileServer(http.Dir("."))) http.ListenAndServe("localhost:8080", nil) }
Which companies use Go language
Which companies are using the Go language, and in what scenarios is it mainly used?
Bytedance has fully embraced the Go language. There are tens of thousands of microservices within the company written using Golang, and GO was also open sourced not long ago. RPC framework KiteX.
Bytedance pays more attention to efficiency, is easy to get started, and has low learning difficulty. In addition, the two artifacts Goroutine and Channel can very well solve the problems of concurrent and asynchronous programming. It must be said that the Go language is a new generation of programming language.
According to Lagou’s recruitment data, Tencent, Baidu, Meituan, Didi, Sangfor, Ping An, OPPO, Zhihu, Qunar, 360, Kingsoft, Weibo , Bilibili, Qiniu, PingCAP and other companies also use Go language in Daxing. Foreign companies such as Google and Facebook are also using the Go language extensively.
From a business perspective, language has flourished in cloud computing, microservices, big data, blockchain, Internet of Things and other fields. Then in the fields of cloud computing and microservices, Docker, Kubernetes, Istio, etcd, and prometheus already have a very high market share. Almost all cloud-native components are implemented in Go.
Why ByteDance fully embraces the GO language
Initially used Python, because Performance issues were changed to Go
C which is not suitable for online web business
Early team has non-Java background
Good performance
Simple deployment and low learning cost
Promotion of internal RPC and HTTP frameworks
We know that ByteDance has fully embraced the Go language. At the beginning, the company’s back-end business was mainly web back-end. The early team had a non-Java background, and C was not suitable for online web business, so the initial service They are all in python. Starting around 2014, as the business volume grew, python encountered some performance problems.
Some teams initially tried to use Go and found that it was easy to get started, the development efficiency was high, and the performance was relatively good. The development and deployment of go language is very simple, and it also solves the headache of dependency library version problem caused by python before. After some businesses tasted the benefits, they began to vigorously promote it at the company level, and the company's internal golang-based rpc and http framework was born.
With the promotion of the framework, more and more python services are rewritten using golang. So far, golang has become the programming language with the highest internal usage.
【Related recommendations:
Go video tutorialThe above is the detailed content of Does ByteDance need to use Go language?. For more information, please follow other related articles on the PHP Chinese website!