Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is Service Mesh?

2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains "what is Service Mesh". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what is Service Mesh".

As a synonym for the next generation of micro-service technology, Service Mesh is a blockbuster in its infancy and has a trend in the era of unified micro-service.

So, what exactly is Service Mesh?

In a word: Service Mesh is the TCP protocol in the era of micro-services. With such a perceptual preliminary understanding, let's take a look at what Service Mesh is.

When it comes to Service Mesh, you have to mention the microservice. According to Wikipedia, Microservices is a kind of software architecture style, which is based on small functional blocks (Small Building Blocks) that focus on a single responsibility and function, and combines complex large applications in a modular way. The functional blocks communicate with each other using language-independent (Language-Independent / Language agnostic) API sets.

At present, there are numerous development platforms and frameworks related to micro-services in the industry: how do these numerous products such as Spring Cloud, Service Fabric, Linkerd, Envoy, Istio and so on relate to Sevice Mesh? Which fall into the category of Service Mesh?

In order to sort out these complicated products and concepts, let's first take a look at the historical development of microservices and Service Mesh technology.

With a clear understanding of the main context of technology, we can clearly know which node the above-mentioned platforms and frameworks belong to, and the relationship between them will be clear at a glance.

Phil Cal ç ado's article

Borrowing from the context of the article, combined with my own understanding and simplification, this paper tries to explain clearly the concept of ServiceMesh and the historical inevitability of the birth of this technology.

Time 0: developers imagine communication between different services

The abstract representation is as follows:

Time 1: the era of primitive Communication

However, the reality is much more complex than imagined. In the actual situation, communication needs the physical layer that can transmit bytecode and electronic signals. Before the emergence of TCP protocol, the service needs to deal with a series of flow control problems faced by network communication, such as packet loss, disorder, retry and so on. Therefore, in the service implementation, in addition to business logic, it is also mixed with the processing logic of network transmission.

Era 2:TCP era

In order to avoid that each service needs to implement a set of similar network transmission processing logic, TCP protocol appears, which solves the general flow control problem in network transmission, moves the technology stack down, pulls out from the implementation of the service, and becomes a part of the network layer of the operating system.

Time 3: the first generation of micro-services

After the emergence of TCP, the network communication between machines is no longer a difficult problem, and the distributed system represented by GFS/BigTable/MapReduce is booming.

At this time, the unique communication semantics of distributed systems appear again, such as circuit breaker strategy, load balancing, service discovery, authentication and authorization, quota restrictions, trace and monitoring, etc., so services realize part of the required communication semantics according to business requirements.

Time 4: the second generation of microservices

In order to avoid that each service needs to implement a set of semantic functions of distributed system communication, with the development of technology, some development frameworks for micro-service architecture have emerged, such as Twitter's Finagle, Facebook's Proxygen and Spring Cloud and so on.

These frameworks implement a variety of general semantic functions needed for distributed system communication, such as load balancing and service discovery, so they shield these communication details to a certain extent. Developers can develop robust distributed systems with less framework code.

Time 5: the first generation of Service Mesh

The second-generation microservice model seemed perfect, but developers soon discovered that it also had some essential problems:

First, although the framework itself shields some common functional implementation details of distributed system communication, developers have to spend more energy on mastering and managing the complex framework itself. In practical applications, it is not easy to track and solve problems in the framework.

Second, the development framework usually supports only one or more specific languages. Looking back at the definition of micro-services at the beginning of the article, an important feature is that they are language-independent, but those services written in languages that are not supported by the framework are difficult to integrate into the micro-service-oriented architecture, and it is difficult to implement different modules in the architecture system in multiple languages according to local conditions.

Third, the framework is linked with services in the form of lib library, and the compatibility of the library version when complex projects depend is very thorny. At the same time, the upgrade of the framework library is not transparent to the service, and the service will be forced to upgrade because of the lib library upgrade that has nothing to do with business.

Therefore, the agent mode (side car mode) represented by Linkerd,Envoy,Ngixmesh arises at the historic moment, which is the first generation Service Mesh, which abstracts the communication of distributed services into a single layer, in which it implements the functions needed by distributed systems, such as load balancing, service discovery, authentication and authorization, monitoring and tracking, flow control, etc., as a proxy service equivalent to the service, it is deployed with the service to take over the traffic of the service. The communication requests between services are completed indirectly through the communication between agents, so that the three problems mentioned above can also be easily solved.

If we look at it from a global perspective, it is easy to get the following deployment diagram:

If we skip the service for a while and just look at the network of stand-alone components of Service Mesh:

I believe that by now, you have understood the so-called Service Mesh, that is, the service grid. It does look like an intricate grid of several service proxies.

Time 6: the second generation Service Mesh

The first generation of Service Mesh consists of a series of stand-alone agent services that run independently. In order to provide a unified upper operation and maintenance entrance, a centralized control panel is evolved. All stand-alone agent components update network topology strategies and report stand-alone data by interacting with the control panel. This is the second generation Service Mesh represented by Istio.

The Service Mesh global deployment view of the stand-alone agent component (data panel) and control panel is as follows:

At this point, after witnessing the changes of six times, we must have a clear understanding of what Service Mesh technology is and how it has evolved into such a form step by step.

Now, let's go back to the definition of Service Mesh in Buoyant's CEO William Morgan, the inventor of the word Service Mesh:

The service grid is an infrastructure layer that handles communication between services. Cloud native applications have complex service topologies, and service grids ensure that requests travel reliably through these topologies.

In practical applications, the service grid is usually composed of a series of lightweight network agents, which are deployed with the application, but transparent to the application. There are four key words in this definition:

Infrastructure layer + requests travel reliably through these topologies: is it deja vu that these two words together describe the location and function of Service Mesh? Yes, you must have thought of TCP.

Network proxy: this describes the implementation form of Service Mesh

Transparency to applications: this describes the key features of Service Mesh, and it is precisely because of this feature that Service Mesh can solve three essential problems faced by the second generation micro-service framework represented by Spring Cloud.

To sum up, Service Mesh has the following advantages

Shielding the complexity of communication in distributed systems (load balancing, service discovery, authentication and authorization, monitoring tracking, flow control, etc.), services only focus on business logic

True language-independent, services can be written in any language, just communicate with Service Mesh

Transparent to applications, Service Mesh components can be upgraded separately.

Of course, Service Mesh also faces some challenges.

The Service Mesh component calculates and forwards requests in proxy mode, which reduces the performance of the communication system to some extent and increases the overhead of system resources.

The Service Mesh component takes over the network traffic, so the overall stability of the service depends on Service Mesh, and the operation and management of a large number of additional Service Mesh service instances is also a challenge.

History is always strikingly similar. In order to solve the problem of end-to-end bytecode communication, TCP protocol was born, which makes multi-computer communication simple and reliable; in the micro-service era, Service Mesh arises at the historic moment, shielding many complexities of distributed systems, so that developers can return to business and focus on real value.

Thank you for your reading, the above is the content of "what is Service Mesh", after the study of this article, I believe you have a deeper understanding of what Service Mesh is, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report