I finally finished learning the many years of practical experience of the Alibaba P8 architect, sharing the practical documentation of microservices

In the world of programmers, new concepts and new technologies emerge in an endless stream. As Zhuangzi said: "My life has boundaries, and knowledge has no boundaries. With the boundaries there is no limit, almost nothing!" Learning new technologies is a pleasure , To master its essence and apply it to daily development work to improve development efficiency and build cooler and more in line with user needs is a very happy thing.

The crystallization of years of practical experience of senior software architects, recommended by many experts!

Take you hand in hand to experience the whole process from microservice design, implementation to operation and maintenance. Covers the concept, design, implementation, aggregation analysis, display and alarm of microservice measurement, and how to promote service improvement and perfection through measurement

I finally finished learning the many years of practical experience of the Alibaba P8 architect, sharing the practical documentation of microservices

 

This article starts from the first contact with microservices to the proficient application of measurement-driven development methods, from the shallower to the deeper, following the whole process of microservice development gradually! We will introduce from three parts: catalog, main content and evaluation!

table of Contents

I finally finished learning the many years of practical experience of the Alibaba P8 architect, sharing the practical documentation of microservices

 

main content

On the main line of this article, we start with the characteristics of microservices, introduce the basic concepts, content, methods and strategies of measurement-driven development, and then start with the design and implementation of metrics to describe in detail how to design and implement microservice metrics, and introduce how to Use measurement-driven methods and techniques to improve microservices. Next, various solutions for aggregation and display of measurement data, analysis and alarms are elaborated. Finally, the full scale of measurement-driven operation and maintenance and microservices is introduced with examples. The following briefly introduces the main content of each chapter of this article.

Chapter 1 Introduction to Microservices; compares the characteristics of monolithic services and microservices, explains the way of microservices in our minds, and introduces an example of microservices throughout the process-Tudou microservices, which will help us to do things that we are familiar with The Todo List application is split into Tudou management microservices, Tudou reminders microservices and Tudou web microservices, and their functions and designs are briefly described respectively. In terms of technical implementation, the Java language is used for development based on Spring Boot. This case provides the most basic pavement for subsequent measurements.

  • 1.1 Features of Monolithic Service
  • 1.2 Split service
  • 1.3 Characteristics of microservices
  • 1.4 The Way of Microservices
  • 1.5 Get started quickly with Tendou microservice cases

I finally finished learning the many years of practical experience of the Alibaba P8 architect, sharing the practical documentation of microservices

 

Chapter 2 The basic concepts of microservice measurement; this chapter briefly introduces the limitations of microservices and the important role of measurement in solving the limitations of microservices. Then it introduces some basic concepts and methods of measurement from various aspects such as content, level, and program selection, and pave the way for preliminary theoretical knowledge of how to use measurement to drive design and development in the following article. The characteristics and limitations of microservices make it more important than traditional monolithic services to pay attention to measurement. Each microservice should define metrics before developing functions. There are many basic knowledge about measurement. Readers can get more and more in-depth knowledge through the hyperlinks below.

  • 2.1 Limitations of microservices and their solutions
  • 2.2 The importance of measurement in microservices
  • 2.3 The content of microservice measurement
  • 2.4 Microservice metrics and terminology
  • 2.5 Choice of Microservice Measurement Strategy
  • 2.6 Summary of this chapter

I finally finished learning the many years of practical experience of the Alibaba P8 architect, sharing the practical documentation of microservices

 

Chapter 3 Microservice Metric Design; This chapter mainly introduces the choice of microservice protocol and storage system, and takes three commonly used microservice protocols as examples to analyze their characteristics and measurement methods, as well as the corresponding data storage system, It also introduces three important methods to achieve high availability with metrics: shunting, current limiting, and current interruption. We advocate measurement-driven design, which is to allow everyone to make technical selection decisions based on measurement indicators when doing microservice design, and have a good idea of ​​what to measure and how to measure at the design stage. We have designed a metric-driven solution for Tudou Microservices for your reference.

  • 3.1 Selection and measurement of microservice protocol
  • 3.2 HTTP and its measurement
  • 3.3 SIP and its measurement
  • 3.4 RTP and its measurement
  • 3.5 Selection of data storage system
  • 3.6 Achieve high availability based on metrics
  • 3.7 Metric-driven design of Tudou microservices
  • 3.8 Summary of this chapter

I finally finished learning the many years of practical experience of the Alibaba P8 architect, sharing the practical documentation of microservices

 

Chapter 4 Measurement-driven implementation of microservices; the core of software is composed of code, so code measurement not only shows the quality of the code, but also promotes the improvement of code quality through continuous feedback and modification. This chapter first introduces how to measure the quality of the code, then in the implementation of the measurement code, introduces the key technologies that the measurement implementation depends on, and finally focuses on how to use these technologies to achieve the measurement of Tudou microservices. The main point of metric-driven implementation is that we have to be targeted when implementing services and bury points in appropriate places according to the design. A variety of measurement information can be generated through the above-mentioned commonly used software libraries and technologies. In the next chapter, we will introduce how to collect and display these measurement data.

  • 4.1 Measurement code
  • 4.2 Measuring progress
  • 4.3 Measuring performance
  • 4.4 Common techniques for measuring microservices
  • 4.5 Measurement Common Class Libraries
  • 4.6 Implementation of Tudou Microservice Metrics
  • 4.7 Summary of this chapter

I finally finished learning the many years of practical experience of the Alibaba P8 architect, sharing the practical documentation of microservices

 

Chapter 5 Aggregation and Display of Measurement Data ; This chapter mainly introduces how to aggregate and store the measurement data after the measurement data is generated. It also introduces the method of cleaning and processing measurement data in the form of cases, and then introduces the frequent data display. Types of charts used and selection criteria. Finally, it focuses on two commonly used open source aggregation and display solutions, namely TIG and ELK. Based on these two solutions, the display effect of various measurement data of Tudou Microservices is demonstrated. These technologies are designed to extract and dig out useful information from a large amount of metric data, around the key performance indicators of microservices and the businesses supported by them, using these powerful data statistics and charting tools, we can do something Targeted analysis. In the next chapter, we will begin to introduce the technologies and practices related to measurement analysis and alarms.

  • 5.1 Aggregation and storage of metric data
  • 5.2 Cleaning and processing of measurement data
  • 5.3 Visualization of metric data
  • 5.4 Common Metric Aggregation and Display Scheme
  • 5.5 Metric aggregation and display of Tudou Microservices
  • 5.6 Summary of this chapter

I finally finished learning the many years of practical experience of the Alibaba P8 architect, sharing the practical documentation of microservices

 

Chapter 6 Analysis and Alarm of Measurement Data; This chapter starts with examples, introduces how to analyze measurement data and design alarms, and lists some common problems. The focus is to focus on the goal of data analysis, through observation, comparison and analysis, and see the essence through the phenomenon. We built a mini alarm system for Tudou Microservices from scratch based on Python and Elasticsearch API. Although the sparrow is small, the function is not weak. Using the three major functions of metric checking, alarming and reporting, your system can be escorted by "eyes" at all times, and developers and operation and maintenance personnel no longer have to worry about product line problems not being discovered in time. Using this system as the prototype, we developed a more powerful alarm system in actual work, and deeply integrated PagerDuty and instant messaging (IM) systems, which can detect many problems on the product line in advance or in time.

  • 6.1 Analysis of measurement data
  • 6.2 Commonly used technologies to achieve alarm
  • 6.3 Alarm realization of Tudou Microservice
  • 6.4 Summary of this chapter

I finally finished learning the many years of practical experience of the Alibaba P8 architect, sharing the practical documentation of microservices

 

Chapter 7 Measurement-driven operation and maintenance; Microservice operation and maintenance is a very troublesome matter, involving complicated matters such as deployment and upgrade, monitoring and alarming, and failure recovery. The purpose is to ensure that reliable and efficient services are continuously provided to users. Traditional monitoring systems mainly focus on system-level indicators, and only a comprehensive measurement of microservices and business KPIs can do well in operation and maintenance. Measurement-driven operation and maintenance is an effective means and key technology for us to do well in the operation and maintenance of product online services before, during and after the event. Our microservices can achieve three 9s (99.9%) or more high availability, and measurement is indispensable.

  • 7.1 Deployment upgrade
  • 7.2 Data operation and maintenance
  • 7.3 Configuration adjustment
  • 7.4 Measurement of open source components
  • 7.5 Example of Operation and Maintenance of Tudou Microservices
  • 7.6 Summary of this chapter

I finally finished learning the many years of practical experience of the Alibaba P8 architect, sharing the practical documentation of microservices

 

Chapter 8 Full Link Measurement; This chapter is the last chapter of the full text. We first discuss the full link measurement of microservices, from each client (browser, local application and mobile application App) on the front end to many servers in the background. The link collects all-round measurement data, so as to drive us to continuously improve in all aspects through measurement. After that, we reviewed and looked forward to the methodology of measurement-driven development of microservices. With the rapid development of technology, with the wave of cloud platforms, big data, stream computing, and machine learning, the combination of measurement-driven development methods will be even more powerful. Due to space constraints, I will not elaborate on it, and hope to have the opportunity to discuss and learn with you in the future.

  • 8.1 Call link measurement of microservices
  • 8.2 Client measurement data collection
  • 8.3 Retrospect and Prospect of Metric-Driven Development
  • 8.4 Summary of this chapter

I finally finished learning the many years of practical experience of the Alibaba P8 architect, sharing the practical documentation of microservices

 

This [The Way of Microservices: Measurement Driven Development] has 442 pages of actual combat notes. Students who need the full version can forward this article and follow the editor, scan the code below to get it! ! !

Daniel's evaluation of this article

I finally finished learning the many years of practical experience of the Alibaba P8 architect, sharing the practical documentation of microservices

 

I finally finished learning the many years of practical experience of the Alibaba P8 architect, sharing the practical documentation of microservices

 

I finally finished learning the many years of practical experience of the Alibaba P8 architect, sharing the practical documentation of microservices

 

Guess you like

Origin blog.csdn.net/bjmashibing001/article/details/112838358