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

How is the core process of Istio implemented?

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

Share

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

This article introduces the relevant knowledge of "how the core process of Istio is realized". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

I. General interaction process

The figure shows:

Gray circle, serving the business

Purple hexagon, acting for Envoy

The two go hand in hand.

At first, the upstream caller ServiceA accessed the V1 version of the downstream service provider ServiceB. After the V2 version of ServiceB was deployed, how did the caller know the directive "SvcA sliced 1% of the traffic to the V2 version of SvcB"?

The whole process is mainly divided into three steps:

In the background of the control plane, the user modifies the routing policy from A to B through the API of Pilot (label 1)

Pilot solidifies the routing policy so that the newly registered caller An in the future can know the current routing policy; for the existing caller Agraine pilot, it notifies caller An of the corresponding Envoy (label 2) through active notification.

Envoy, as the data plane, implements a * routing strategy (label 3). In this case, 1% of the traffic is directed to the grayscale version of Bv2.

Service Discovery and load balancing

This paper talks about the general flow control policy implementation general process, while service discovery and load balancing is only a special case of policy implementation:

Add a new Pod (label 1) to the SvcB that provides the service

Modify the cluster configuration of SvcB in the Pilot background (label 2)

Pilot synchronizes the * information of SvcB to the subscriber of the configuration (label 3), that is, the Proxy corresponding to SvcA, the caller of SvcB.

The Proxy corresponding to SvcA increases the link to SvcB (label 4) and implements load balancing.

Voiceover: it is actually linked to the Proxy corresponding to SvcB.

The whole process is basically similar to using a configuration center to implement service discovery.

III. The entrance and exit of the request

The core of ServiceMesh is the decoupling of technical infrastructure and business services. Service An invokes service B and emphasizes again:

A service in a container Pod, the service process (SrvA/SrvB) and the side car process (Proxy) are associated, and the interaction between them is local (label 1).

Remote calls between cross-container Pod must be made through Proxy (label 2)

By implication, service An invokes service B, and the process of the request is:

SvcA-> SvcA Proxy-> SvcB Proxy-> SvcB

The process of response is the other way around:

SvcB-> SvcB Proxy-> SvcA Proxy-> SvcA

Cross-network calls, request entrances and exits, are all Proxy.

IV. Internal structure of Pilot

The internal structure of Pilot is not complex:

The core of Pilot is the maintenance of various flow control strategies, Abstract Model

Inevitably, Pilot needs to provide interfaces to users, add, delete, query and modify these policies, Rules API

On the one hand, Pilot needs to maintain the compatibility of all kinds of underlying infrastructure, Platform Adapter

On the other hand, Pilot needs to maintain the compatibility of different Proxy real interfaces, Envoy API

The advantages of this design are:

Istio has been designed with heterogeneous infrastructure in mind, regardless of whether the underlying system is K8s or other systems.

Any third party can implement its own proxy and integrate with Pilot as long as it conforms to the relevant API standards.

The cooperation of Pilot and Envoy is the core of Istio, so that:

Service discovery (discovery)

Load balancing (load balancing)

Failure recovery (failure recovery)

Service Measurement (metrics)

Service Monitoring (monitoring)

A _ testing B test (A _ amp B test)

Grayscale publishing (canary rollouts)

Current limit and speed limit (rate limiting)

And so many abilities can be realized.

MerviceMesh is not as complicated as people think.

This is the end of the content of "how to implement the core process of Istio". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

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