What is all this talk about service Mesh?

2019 is a year of chaos and many new technologies and concepts are emerging. Today, we will talk about what service Mesh is, why it emerged, and how it was implemented.

In order for our applications and products to withstand high concurrency, they need to be developed based on microservices architecture. Microservice architecture is just an idea of architecture. The origin of microservice started from micro-Web-Service proposed by Dr. Peter Rodgers at the 2005 Cloud Computing Expo. In 2014, [Martin Fowler] (https://zh.wikipedia.org/wiki/Martin_Fowler) and [James Lewis] (https://zh.wikipedia.org/w/index.php?title=James_Lewis&action=edit&redlink=1), puts forward the concept of micro service defines micro service is made up by a single application of small service, With its own schedule and lightweight processing, the service is designed according to business functions, deployed in a fully automated manner, and communicates with other services using HTTP/RPC APIS. At the same time, services will use the smallest scale of centralized management capabilities, services can be implemented in different programming languages and databases and other components.Copy the code

The realization of microservices is based on the development of distributed systems.

Distributed systems have three basic high indicators:

High performance, high concurrency, high availability.

It also has four major pain points:

  • How is communication between services resolved?
  • How do clients access so many services?
  • How are services governed?
  • What if the service is down? (Load balancing, service degradation, service traffic limiting, service fuse)

How can so many services standardize their external interfaces?

How are services governed?

What if the service is down?

Achieving the three metrics requires infrastructure, commonly known as DevOps (cloud computing, server operations). The popular infrastructure is Docker. We will explain the function and basis of Docker in detail in another chapter. We can first understand that it is a software that can run multiple virtual machines and maximize the utilization of memory. Can we use the Docker start multiple division forming and running of the service, however, think of some big projects like taobao, the application of this great concurrency is trill, it may need to tens of thousands of micro service, also is to start in the Docker tens of thousands of container to hold the operations of the service, tens of thousands of containers to run on a server is a fable, We can’t just rely on shell scripts to manage these services. Besides, what about service governance? So Google for this technical problem, launched Kubernetes (K8s) powerful container choreography system, simple understanding is to control which container to start. Other common service choreography systems are ESC, Nomad, and Mescos. So Kubernetes has been added to infrastructure cloud computing. That is, its entire cloud computing infrastructure process is: Linux→Docker→ Docker-compose →Kubernetes.

With the container choreography system, it also needs to solve service communication, distributed log management, container service performance monitoring **** and distributed persistence. The above implementations are as follows:

Istio, a collaboration between Google, IBM, and Ruffles, provides a simple way to network deployed services with load balancing, authentication between services, and monitoring without any changes to service code. In 2019, it will be called a standard for the next generation of microservices, also known as microservices Architecture 2.0.

ELK is an acronym for ElasticSearch, Logstash, and Kibana. ELK is an integrated log collection, troubleshooting, full-text search, and display solution provided by Elastic.

Zabbix is an enterprise-level solution created by Zabbix for monitoring servers, supporting real-time monitoring of thousands of servers, virtual machines and network devices, and collecting millions of monitoring indicators. It automatically detects the state of the problem based on the collected metrics, rather than continuously observing the collected metrics.

Fescar is an open source version of Alibaba’s Global Transaction Service (GTS) solution. It is non-intrusive and has high performance. Limited by the technical problem of distributed Transaction, Fescar requires the application to be designed and modified at the business level.

TiDB is an online transaction processing/online analysis processing (HTAP: Hybrid Transactional/Analytical Processing (Hybrid Transactional/Analytical Processing) is a converged database product that implements key features such as one-click horizontal scaling, strong consistency, multi-copy data security, distributed transactions, and real-time OLAP. At the same time compatible with MySQL protocol and ecology, easy migration, low operation and maintenance cost.

All the above are a set of solutions for standardization of microservice 2.0 to achieve three high standards and solve the four major problems of microservice, namely, a set of solutions for Service Mesh. To sum up, it is a way of controlling how different parts of an application share data with each other. It can adapt to the unique nature of distributed microservice environment. In large-scale applications built on microservices, there are many established service instances that run across local and cloud servers. All these moving parts obviously make it difficult for individual microservices to find the other services they need to communicate with. Service Mesh automatically processes discovery and connection services in a short period of time without the need for developers and individual microservices to match themselves.

Of course, it does not mean that if you have learned the above framework, you will be able to achieve a multi-million or multi-billion concurrent architecture.

This article is only a superficial understanding of the direction and landing of service mesh as a developer. To truly understand service mesh, we need to continue to combine theory with practice and summarize.

After that, I will probably do a series of practical courses starting from cloud computing, in order to improve my language organization ability, writing ability and systematically summarize what I have learned during this period.

Finally:

Art without road, stop at the art; Dao has no art, art can be found.