当前位置:网站首页>Sidecar mode

Sidecar mode

2022-07-07 05:42:00 From watershed to sea area

Sidecar Pattern

Sidecar It's a design pattern , Conceptually, it refers to the implementation method of separating part of the functions of the application from the application itself as a separate process . This mode supports adding multiple functions to applications in a non intrusive way , At the same time, it also realizes the purpose of decoupling the common part of multiple applications from the self owned part of each application , Therefore, it is widely used in the field of micro Services .
 Insert picture description here

As Service Mesh Important elements of ,Sidecar Patterns are highly scalable for build height 、 Scalable 、 A secure and easily monitored microservice architecture system is very important .Sidecar Patterns reduce the complexity associated with microservice architecture , And provides load balancing 、 Service registration 、 Service discovery 、 The service call 、 Traffic management 、 Application certification 、 telemetering 、 Basic functional features required by microservices such as fault injection .

 Insert picture description here
Picture source : The first reference

Sidecar characteristic

  • Sidecar It is a process of independent deployment
  • Sidecar It reduces the coupling between the application code and the underlying code , Help heterogeneous services through sidecar Fast access to micro service system .

Sidecar Patterns reduce the code complexity of microservices by abstracting public infrastructure related functions to different layers , In high mode, there is no need to write service configuration in every micro service 、 Find out 、 Call a series of basic and public code , Achieve decoupling .

Sidecar How to work

 Insert picture description here
The yellow line in the figure indicates registration , The white arrow represents the call

Suppose we have a micro service A、B、C, stay Sidecar In mode , The microservice itself will not interact with the registry ( In the picture Service Mesh Control Plane Acting as a registry , There are also other functions ) Call on request , But through sidecar Proxy registration access registry , Get service registration 、 Discovery and other functions .

sidecar As a proxy for heterogeneous services, initiate service calls

 Insert picture description here

Heterogeneous services themselves do not have a direct connection to the registry , Therefore, the call of heterogeneous services also needs to go sidecar, adopt sidecar Make service discovery calls ,sidecar After receiving the request of heterogeneous services, select the target service instance through service discovery and load balancing , Forward request to target service .

reference

原网站

版权声明
本文为[From watershed to sea area]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202130733545537.html