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 problem did ServiceMesh solve?

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

What this article shares with you is about what problems ServiceMesh has solved. The editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.

Service Grid (ServiceMesh) has been very popular in the past two years and claims to be the next generation of micro-service architecture. in the next two months, we are going to write this thing systematically, hoping to give you a preliminary understanding of the architecture technology.

Voiceover: the style of my writing, "why" is often more important than "how".

Internet companies often use a hierarchical micro-service architecture.

Voiceover: why should it be service-oriented?

With the increasing amount of data and throughput, the business is becoming more and more complex, the number of services will be more and more, and the layering will be more and more fine. in addition to the data service layer, it will also derive a variety of hierarchical structures, such as business service layer, front-end separation and so on.

Continue to find the principal contradiction, withdraw from the principal contradiction, solve the principal contradiction, the architecture has evolved naturally, micro-service architecture, what will be the potential principal contradiction?

With the introduction of micro-service architecture, a RPC framework is generally introduced to complete the entire RPC call process.

As shown in the pink section of the figure above, RPC is divided into:

RPC-client, which is embedded in the caller process

RPC-server is the foundation of the service process.

Not just microservices, MQ is a similar architecture:

As shown in the pink section of the figure above, MQ is divided into:

MQ-send-client

MQ-server

MQ-recv-client

The framework is just the beginning, and more and more functions related to RPC, and microservices, will be added.

For example: load balancing

If you want to extend multiple load balancing schemes, such as:

Polling

Random

Take the mold

Consistent hash

RPC-client needs to be upgraded.

For example: data collection

If you want to collect the processing time of RPC interface to implement unified monitoring and alarm, you also need to upgrade RPC-client.

Voiceover, processing time is divided into:

Client perspective processing time

Server perspective processing time

If you want to collect the latter, RPC-server also needs to modify and report.

Another example: service discovery

A new instance is added to the service to notify the configuration center, and the configuration center notifies the registered RPC-client to send traffic to the newly launched service instance to rapidly expand the capacity.

Another example: call chain tracking

If you want to do full-link call chain tracking, both RPC-client and RPC-server need to be upgraded.

The following features:

Load balancing

Data collection

Service discovery

Call chain tracking

...

In fact, none of them are business functions, so Internet companies generally have a technical department similar to the "Architecture Department" to develop and upgrade related functions, while the technical department of the line of business directly uses the relevant frameworks, tools and platforms. Enjoy the convenience brought by various "cool techs".

The ideal is very plump, but the reality is very bony, because:

RPC-client, which is embedded in the caller process

RPC-server is the foundation of the service process.

We often face the following problems:

Business technical teams still need to spend time learning and using basic frameworks and tools, rather than focusing wholeheartedly on business and products

Client needs to maintain m versions, server needs to maintain n versions, and compatibility needs to test m versions.

If you want to support different languages, it is often necessary to develop a multi-language version of CmurclientMagi PythonMutual client.

Every upgrade of the "cool techs" needs to promote the upstream and downstream to upgrade, and this cycle is often quarterly, half a year, or even longer, and the overall efficiency is very low.

Voiceover: brother, how long will it take for your company to promote a new technology product?

Is there any way to solve these couplings, these universal pain points?

One idea is to split the service into two processes and decouple them.

A process implements the business logic (whether it is the caller or the service provider), biz, that is, the white box above

A process implements the underlying technical architecture, proxy, which is the blue square shown above.

Voiceover: load balancing, service discovery and governance, call chain. And so on a lot of infrastructure, all put into this layer to realize.

Biz and proxy were born together, died out together, and deployed locally to each other, namely the dotted box shown above.

Between biz and proxy is the local communication, that is, the black arrow pictured above

All the communication between biz is done through proxy, so that there is a remote connection between proxy, that is, the red arrow above.

In this way, the "return of business to business and technology to technology" is realized, and the full decoupling is realized. if all nodes are decoupled, the whole architecture will evolve into:

Green is biz

Blue is proxy

The whole service cluster becomes grid-like, which is the origin of Service Mesh service grid.

The evolution of the architecture is endless, and there are many pain points, so it is natural to be layered and decoupled. I hope you have something to gain, and we will talk about the design and architecture details of SM later.

Ideas are more important than conclusions.

These are the problems that ServiceMesh has solved, and the editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

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