Sidecar与Ambassador和Adapter模式之间的区别 [英] Differences between Sidecar and Ambassador and Adapter pattern

查看:213
本文介绍了Sidecar与Ambassador和Adapter模式之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对多容器Pod设计模式感到困惑.
(边车,适配器,大使)

I confused between Multi-Container Pod Design patterns.
(sidecar, adapter, ambassador)

我了解的是:
Sidecar :容器+容器(共享相同的资源并执行其他功能)
适配器:容器+适配器(用于检查其他容器的状态.例如监视)
大使:容器+代理(用于外部联网)

What I understand is :
Sidecar : container + container(share same resource and do other functions)
Adapter : container + adapter(for checking other container's status. e.g. monitoring)
Ambassador : container + proxy(to networking outside)

但是,根据 Istio-安装Sidecar ,他们将代理作为补充工具模式引入.

But, According to Istio -Installing the Sidecar, They introduce proxy as a sidecar pattern.

适配器是容器,代理也是容器.

Adapter is container, and Proxy is container too.

所以,我的问题是 Sidecar模式和Adapter& Ambassador模式之间有什么区别?

Sidecar模式概念是否包含Adapter& Ambassador模式?

Is the Sidecar pattern concept contain Adapter&Ambassador pattern?

推荐答案

首先,您是对的, sidecar 容器一词现在已经成为描述一个额外容器的一个词在您的广告连播中.最初(?)这是一个特定的多容器设计模式.

First, you are right, the term sidecar container has now became a word for describing an extra container in your pod. Originally(?) it was a specific multi-container design pattern.

侧车模式

您的广告连播中有一个额外的容器,用于增强扩展主容器的功能.

An extra container in your pod to enhance or extend the functionality of the main container.

大使模式

用于代理与主容器的网络连接的容器.

适配器模式

用于转换主容器的输出的容器.

这摘自2015年的原始文章:样式用于复合容器

This is taken from the original article from 2015: Patterns for Composite Containers

您的便笺上

但是,根据Istio-安装Sidecar的介绍,他们将代理引入为Sidecar模式.

But, According to Istio -Installing the Sidecar, They introduce proxy as a sidecar pattern.

在上述模式中,大使适配器实际上都必须代理,但是这样做的目的不同.使用Istio,例如终止 mTLS 连接,收集指标等以增强您的主容器.因此,它实际上是一个 sidecar模式,但正如您正确指出的那样,所有模式代理该连接都是令人困惑的-但出于不同的目的.

In the patterns above, both Ambassador and Adapter must in fact proxy the network connection, but do it with different purpose. With Istio, this is done e.g. to terminate mTLS connection, collect metrics and more to enhance your main container. So it actually is a sidecar pattern but confusingly, as you correctly pointed out, all pattern proxy the connection - but for different purposes.

这篇关于Sidecar与Ambassador和Adapter模式之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆