当前位置:网站首页>Basic mode of service mesh

Basic mode of service mesh

2022-07-08 00:33:00 InfoQ

according to Service Mesh The development and use of , We can Service Mesh It is divided into two modes .
One 、Sidecar Pattern
stay Service Mesh Early development ,Service Mesh With Sidecar The form of being .Sidecar The model can be regarded as the first generation Service Mesh, There are early representatives of Linkerd and Envoy.Sidecar In mode , The network proxy service is next to the micro service , Provide communication and link governance functions for microservices . therefore , The data plane proxy service is also often referred to as Sidecar.

here , The network proxy service with only the data plane has no control plane , The interaction with external infrastructure services is carried out directly in the network agent service . first generation Service Mesh By adopting Sidecar Pattern , Separate communication and communication link governance functions from microservices , It realizes the sinking and service of communication infrastructure , This also reflects the idea of architecture decoupling , Through decoupling, the burden of microservices is reduced .
Two 、 Second generation Service Mesh Pattern
Sidecar Mode Service Mesh There is a prominent problem , Put all the functions of communication and communication link governance into this proxy service , This causes the data plane agent to be heavy , And because it carries too many features and functions , This makes the update and modification of the data plane agent particularly frequent , Frequent updates and upgrades will increase the probability of agent service problems , Affect the stability of agency services .

meanwhile ,Service Mesh In mode , The data plane agent carries all the traffic of microservice communication , Very high demand for stability , Any failure of this service will have a great impact on the stability of the whole system . In order to solve the contradiction between the above frequent upgrades and stability , Separate the policy and configuration decision logic from the agent service , An independent control plane is formed , This is the second generation Service Mesh.

Second generation Service Mesh The most important sign is the separation of control plane and data plane
. Data plane and control plane are not new concepts , Router / Switch and other data communication product architecture , There are control planes running on special processors and multiple independent operation 、 Data plane for routing or switching functions .SDN(Software Defined Network, Software Defined Network ) Separate the data plane from the control plane , The control plane is programmable , Make the network more intelligent 、 Flexible and scalable , Inspired another revolution in network technology .

Second generation Service Mesh Learn from it SDN The idea of , Based on the separation of control plane and data plane , With a perfect control plane :① All agent services are controlled by the control plane , Because the control plane can control the whole system , Therefore, it provides strong control ability and strategy ability ;② Remove the specific control logic from the data plane , Simplify the design of data plane , The data plane does not need to interact with external systems , The data plane completely focuses on the traffic routing and forwarding logic with low change frequency , Improves the stability of the data plane .
3、 ... and 、Service Mesh framework
Second generation Service Mesh The basic architecture of is divided into two parts: data plane and control plane .
  • Data plane
The data plane is responsible for the communication between proxy microservices , Specifically including RPC signal communication 、 Service discovery 、 Load balancing 、 Degraded fuse 、 Current limiting, fault tolerance, etc , The data plane can be considered to be Spring Cloud、Dubbo And other language related microservice frameworks. Communication and service governance capabilities are independent of a language independent process , And pay more attention to universality and expansibility . stay Service Mesh in , No longer treat the data plane proxy as an isolated component , Instead, these agents are connected together to form a global distributed network .
  • Control plane
The control plane is responsible for managing the data plane , Define service discovery 、 route 、 flow control 、 Telemetry statistics and other strategies , These policies can be global , It can also be specified separately by configuring a data plane node . The control plane sends the policy to each data plane node through a certain mechanism , Data plane nodes use these strategies when communicating .


原网站

版权声明
本文为[InfoQ]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/189/202207072238039268.html