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 in kubernetes

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly shows you "what is Service Mesh in kubernetes", which is easy to understand and clear. I hope it can help you solve your doubts. Let the editor lead you to study and learn what is Service Mesh in kubernetes.

One: what is Service Mesh

1. Service Mesh can be compared to the TCP/IP between programs or micro-services, which is responsible for network calls, current limiting, circuit breakers and monitoring between services. For writing applications, there is generally no need to care about the TCP/IP layer (such as RESTful applications through the HTTP protocol). Similarly, there is no need to use Service Mesh to deal with things between services that were originally implemented through applications or other frameworks, such as Spring Cloud and OSS, which can now be handed over to Service Mesh.

2.Service Mesh has the following characteristics:

a. The middle layer of communication between applications

b. Lightweight network agent

c. Application program is not aware

d. Decouple application retry, timeout, monitoring, tracking, and service discovery

Architecture of 3.Service Mesh

Service mesh runs as a sidecar, which is transparent to applications, and all traffic between applications passes through it, so the control of application traffic can be achieved in serivce mesh.

Second: why use Service Mesh

1.Service mesh does not bring us new functionality, it is used to solve problems that have been solved by other tools, but this time it is implemented in Cloud Native's kubernetes environment.

two。 Under the traditional MVC three-tier Web application architecture, the communication between services is not complex and can be managed within the application, but in today's complex large-scale websites, single applications are decomposed into numerous micro-services, and the dependence and communication between services are very complex.

3. Under the Cloud Native architecture, the use of containers gives more feasibility to heterogeneous applications. Kubernetes enhances the horizontal expansion of applications, and users can quickly program applications with complex environments and complex dependencies. At the same time, developers do not pay too much attention to the tedious things such as application monitoring, scalability, service discovery and distributed tracking, but focus on program development, giving developers more creativity.

Three: how does Service Mesh work

Linkerd shows how service mesh works as an example:

1.Linkerd routes the service request to the destination address, and based on its parameters, determines whether it is going to the production environment or the test environment, to the local environment or to the public cloud environment? All of this routing information can be configured dynamically, either globally or separately for some services.

two。 When the Linkerd confirms the destination address, the traffic is sent to the appropriate service discovery endpoint (service in kubernetes), and the service forwards the service to the backend instance (Pod).

3.Linkerd selects the most responsive instance of all the application instances based on the latency it has observed for the most recent request.

4.Linkerd sends the request to the instance, recording the response type and delay data.

5. If the instance fails, does not respond, or the process does not work, Linkerd will send the request to another instance to retry.

6. If the instance continues to return error,Linkerd, the instance will be removed from the load balancer pool and will be retried periodically later.

7. If the deadline for the request has passed, Linkerd actively fails the request instead of trying to add the load again.

8.Linkerd captures all aspects of the above behavior in the form of metric and distributed tracking, and the tracking information is sent to the centralized metric system.

Four: Istio and Linkerd

The current Service Mesh implementation has two main camps, Linkerd and Istio.

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

Servers

Wechat

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

12
Report