laitimes

Topping GitHub again! Alibaba intranet for the first time self-exposed colorful version of microservice responsiveness and K8S manual

"Where things go, so do they go; Where the will goes, so does the courtesy; Where the liturgy is, there is also happiness: where the pleasure is, there is also mourning. ”

Microservices are the current development trend of software development, and more and more systems are built in the form of microservices. The content of this note shared by the head of the group today is very extensive. From distributed systems to microservices architectures, from Spring Boot to SpringCloud components, from Docker to Kubernetes, from domain-driven design to responsive programming and cloud-native development, there are many unique insights from the authors. Engineers working on microservices development can't be better at taking this and distilling it into their own knowledge.

Not BB on dry goods!

Everything starts with principles!

Topping GitHub again! Alibaba intranet for the first time self-exposed colorful version of microservice responsiveness and K8S manual
  • Microservices overview
Topping GitHub again! Alibaba intranet for the first time self-exposed colorful version of microservice responsiveness and K8S manual
This chapter allows us to understand what microservices are, the background of the emergence and development of microservices architecture, the relationship between microservices and cloud-native architecture in the era of cloud computing, the main features of microservice architecture, and the intrinsic relationship between microservice architecture and UNIX design philosophy.
  • Prerequisites for adoption of microservices
Topping GitHub again! Alibaba intranet for the first time self-exposed colorful version of microservice responsiveness and K8S manual
There is no "silver bullet" in the software world, and there is no ideal software model to provide comprehensive solutions. Every company or enterprise needs to combine its own situation and scenario to choose whether to adopt a microservices architecture. If you're building or retrofitting your system based on a microservices architecture, be aware of whether the technical ideas and software methodologies you use conflict with the microservices architecture. In short, in software engineering, in addition to technical factors, organizational structure, R&D process, etc. will have an important impact on the success of microservice architecture.
  • Microservices builds
Topping GitHub again! Alibaba intranet for the first time self-exposed colorful version of microservice responsiveness and K8S manual
Domain-driven design can ensure the consistency of business model and code model, separate business and technical complexity, and control business complexity through boundary demarcation, and the current rise of microservice architecture has brought about a best practice environment for implementing domain-driven design. The software building process is inherently a complex process that accompanies the entire life cycle of software engineering. Using a microservices architecture, domain-driven software modeling pattern allows us to find a solution to this complexity problem.

Verbal blowing is useless, practice is truth

Topping GitHub again! Alibaba intranet for the first time self-exposed colorful version of microservice responsiveness and K8S manual
  • scaffold
Topping GitHub again! Alibaba intranet for the first time self-exposed colorful version of microservice responsiveness and K8S manual
At present, software construction based on scaffolding (substrate) mode has become the mainstream development method of microservice architecture landing, which can significantly improve the work efficiency of developers. Spring Boot itself is based on the Spring framework and inherits the powerful technical features of Spring. In this chapter, we analyze the core modules and mechanisms of the Spring Boot framework, explain in detail the automation configuration principles of SpringBoot, the Starter mechanism and the working principle of custom Stars, and solidify the concise development concepts and efficient development methods such as "convention is better than configuration" and "out of the box". At the same time, this chapter is also the basis for the subsequent Spring Cloud microservice governance, before starting the technical advancement, it is necessary to master the basic principles of Spring Boot, so as to achieve more with less.
  • Key technologies
Topping GitHub again! Alibaba intranet for the first time self-exposed colorful version of microservice responsiveness and K8S manual
The key technology of a microservices architecture is to provide a platform infrastructure that is highly available, scalable, and fault-tolerant for microservices. Spring Cloud as a governance platform for microservices provides us with relevant technologies and service components, and open source solutions often cannot meet individual needs, and we need to customize the development according to actual scenarios and business characteristics. The premise of customized development is that we can fully understand the underlying operating principles and working mechanisms of these key technologies.
  • System integration
Topping GitHub again! Alibaba intranet for the first time self-exposed colorful version of microservice responsiveness and K8S manual
Microservices integration architectures tend to integrate using standardized HTTP, REST API-based architectural interaction patterns. In addition, the RPC invocation method can also be used for performance. For asynchronous interactions, message queuing enables sufficient decoupling and heterogeneous integration between microservices. Spring Cloud provides the Spring Cloud Stream framework, which masks the underlying communications technical details and implements a lightweight message-based microservices integration solution. Event-driven and CQRS-based system architectures can also be implemented using Spring Cloud Stream.
  • Microservices data architecture
Topping GitHub again! Alibaba intranet for the first time self-exposed colorful version of microservice responsiveness and K8S manual
Under the microservices architecture, we emphasize the need to select the appropriate back-end data storage type according to the data type and business scenario of the microservice. For data consistency management in distributed applications under the microservice architecture, distributed transactions are not recommended, and the microservices data architecture improves the interaction performance between microservices by abandoning the consistency of the distributed network. In addition, in the microservices data architecture, we introduce common TCC, Saga, and reliable message patterns, which can be used as solutions to ensure eventual consistency between data.
  • Microservice delivery
Topping GitHub again! Alibaba intranet for the first time self-exposed colorful version of microservice responsiveness and K8S manual
Compared with the monolithic architecture, the microservices architecture has greatly improved the deployment flexibility, but the frequent service releases also bring stability challenges to the software quality under the microservices architecture. The traditional manual deployment method is no longer suitable for microservice architecture, and the container-based delivery method has become the standard delivery method for microservices, through continuous integration of delivery tools, with automated and sustainable delivery of deployed infrastructure, to support microservice applications to rapidly iterate delivery, becoming the best practice of software delivery.
  • Service monitoring governance
Topping GitHub again! Alibaba intranet for the first time self-exposed colorful version of microservice responsiveness and K8S manual
According to the principle and role of the monitoring system, it can be roughly divided into three categories: metrics ( Metrics ) , log classes ( Log ) , and call chains ( Tracing ) . For different monitoring objects and monitoring data types, the corresponding technology stacks and monitoring methods need to be used. For the Spring Boot microservices architecture, in addition to the production-ready components that come with the development framework to support the health indicator query of the service, we also need to introduce a third-party ELK framework as a log monitoring component, and implement call chain monitoring together with components such as Zipkin and SkyWalking.

Learning! Advanced!

Topping GitHub again! Alibaba intranet for the first time self-exposed colorful version of microservice responsiveness and K8S manual
  • Responsive microservices architecture
Topping GitHub again! Alibaba intranet for the first time self-exposed colorful version of microservice responsiveness and K8S manual
Building responsive microservices can obtain system features such as asynchronity, responsiveness, elasticity, fast recovery, and back pressure, while the responsive microservices architecture has stronger advantages in resource consumption, high concurrency, high throughput, and asynchronous processing scenarios. At present, there are many types of reactive framework technology, if the reactive programming is applied to the large-scale production system, it is necessary to conduct careful research, and comprehensively consider the actual project cycle, personnel experience, technical framework and other factors to avoid the complexity of the technology becoming a bottleneck in the process of business development.
  • Kubernetes container management
Topping GitHub again! Alibaba intranet for the first time self-exposed colorful version of microservice responsiveness and K8S manual
Kubernetes, as a container scheduling platform, ensures the resiliency, load, language agnosticity, scaling and other powerful DevOps capabilities of microservices, while the Spring Cloud framework provides developer experience for developer-friendly microservices, both platforms have their own strengths. In the process of microservices practice, we need to integrate their respective advantages, and the ultimate appeal is to meet business scenarios, solve complex problem domains, improve development efficiency, and improve service delivery efficiency.
  • Microservices trends
Topping GitHub again! Alibaba intranet for the first time self-exposed colorful version of microservice responsiveness and K8S manual

The content in this book comes from the author's years of work accumulation and practice summary, from theory to practice to advanced, in an all-round progressive way to interpret the design and application of microservices, which can make everyone take fewer detours in daily development work, and has a strong guiding significance. Need to get friends to learn, please help like and forward, background private message [learning] or [notes] free to get the full content download method.

Read on