-
Microservice architecture, as a representative of cloud native implementation practice, has become the first choice of major manufacturers by means of “divide and conquer”, which separates bloated individual applications into micro-services that can fight for themselves.
-
Go, a high performance compiled programming language, with its concise syntax, rich built-in types, and high concurrency, makes it a perfect tool for developers to implement microservices architecture practices.
01 Go microservices are a trend
The mainstream microservices architecture, including Dubbo, has launched the Go version to give play to the high concurrency advantages of Go in microservices.
Let Internet giants such as Tencent and Bytedance migrate their original Python/C/C++ systems to Go, or completely develop new systems using Go.(Currently, more than 80% of the traffic to Toutiao’s back-end services runs on services built by Go. The number of microservices exceeds 100, peak QPS exceeds 7 million, and daily request processing exceeds 300 billion, making it the largest Go application in the industry.)
For one thing, when you’re looking for a job,Because of the imbalance between supply and demand;
Secondly, your technical vision is ahead of time,It will be quick to learn anything else.
Within 24 hours of launch, it was only 1 yuan.
-
No actual combat development experience, master the micro-service related knowledge, but did not really practice;
-
I have only seen the application of microservice components on a piecemeal basis, without understanding the microservice architecture through a complete case study.
-
Don’t know much about Go microservices, most of the practices are Java-based;
-
With no experience in cloud development, most applications are run on local machines.
02 What can you gain?
The first part
This paper introduces the background and concept of cloud native, the composition and development trend of microservices, explains how to use DDD (domain-driven design) to divide microservices, and introduces the next generation of microservices architecture, Service Mesh.
This part of knowledge will help you fully understand the basic concepts of cloud native and microservices, as well as the process and methodology of cloud native application development, and lay a solid theoretical foundation for you to learn the principles and applications of each microservice component.
The second part
This paper mainly introduces the basic knowledge of Go development, including Go grammar and flow control, Go concurrency and Go Web application development, and expounds how to use DDD to divide the business of the freight platform, as well as the actual application of related cases (micro-service deployment, container choreography, continuous integration and automated testing, etc.).
This part is mainly to supplement the basis of Go language development, to help friends who have no knowledge of Go to quickly master the basic essentials of Go development, and to facilitate the following explanation of how to use Go to build micro-service applications.
The third part
It mainly introduces the principles of basic components in microservices architecture and the actual practice of Go business cases, including service registration and discovery, RPC call, gateway, fault tolerance, load balancing, unified authentication and authorization, and distributed link tracing, etc.
We will focus on the implementation principles behind each component and add component capabilities to the case microservice using Go open source or self-implemented. Finally, I’ll show you how to integrate the capabilities provided by these components through the Service Mesh.
The fourth part
This paper mainly shares relevant experience and key points in Go microservice development, including log collection, Go error handling, concurrent traps and system monitoring, etc. Combined with the lecturer’s years of relevant practical experience accumulated in the development of Go micro services, so as to avoid you in the future development of “stepping on the pit”.