Skip to content

Commit

Permalink
add envoy proxy architecure diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
rootsongjc committed Apr 27, 2018
1 parent bdae8eb commit 5254cb5
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 22 deletions.
2 changes: 1 addition & 1 deletion SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
- [Condiut概览](usecases/conduit-overview.md)
- [安装Conduit](usecases/conduit-installation.md)
- [Envoy](usecases/envoy.md)
- [Envoy中的基本术语](usecases/envoy-terminology.md)
- [Envoy的架构与基本术语](usecases/envoy-terminology.md)
- [Envoy作为前端代理](usecases/envoy-front-proxy.md)
- [大数据](usecases/big-data.md)
- [Spark standalone on Kubernetes](usecases/spark-standalone-on-kubernetes.md)
Expand Down
Binary file added images/envoy-arch-v0.1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/envoy-upstream-downstream.png
Binary file not shown.
40 changes: 32 additions & 8 deletions usecases/envoy-terminology.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,49 @@
# Envoy 中的基本术语
# Envoy 的架构与基本术语

在了解一门技术之前一开始就要了解其中的基本概念和术语,只有融入了该语境才能理解这门技术。
在了解一门技术之前一开始就要了解其中的基本概念和术语,只有融入了该语境才能理解这门技术。本文将为大家介绍 Envoy 中的基本术语和重点概念。

**Host**:能够进行网络通信的实体(在手机或服务器等上的应用程序)。在 Envoy 中主机是指逻辑网络应用程序。只要每台主机都可以独立寻址,一块物理硬件上就运行多个主机。
## 架构

**Downstream**:下游(downstream)主机连接到 Envoy,发送请求并或获得响应
下图是 Envoy proxy 的架构图,显示了 host B 经过 Envoy 访问 host A 的过程。每个 host 上都可能运行多个 service,Envoy 中也可能有多个 Listener,每个 Listener 中可能会有多个 filter 组成了 chain

**Upstream**:上游(upstream)主机获取来自 Envoy 的链接请求和响应。
![Envoy proxy 架构图](../images/envoy-arch-v0.1.png)

其中的基本术语将在下面解释。

Downstream 和 Upstream 的关系如下图所示。
## 基本术语

![Envoy 中的 Downstream 与 Upstream 关系图](../images/envoy-upstream-downstream.png)
**Host**:能够进行网络通信的实体(在手机或服务器等上的应用程序)。在 Envoy 中主机是指逻辑网络应用程序。只要每台主机都可以独立寻址,一块物理硬件上就运行多个主机。

**Downstream**:下游(downstream)主机连接到 Envoy,发送请求并或获得响应。

**Listener**: 侦听器(listener)是可以由下游客户端连接的命名网络位置(例如,端口、unix域套接字等)。Envoy 公开一个或多个下游主机连接的侦听器
**Upstream**:上游(upstream)主机获取来自 Envoy 的链接请求和响应

**Cluster**: 集群(cluster)是 Envoy 连接到的一组逻辑上相似的上游主机。Envoy 通过[服务发现](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/service_discovery#arch-overview-service-discovery)发现集群中的成员。Envoy 可以通过[主动运行状况检查](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/health_checking#arch-overview-health-checking)来确定集群成员的健康状况。Envoy 如何将请求路由到集群成员由[负载均衡策略](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/load_balancing#arch-overview-load-balancing)确定。

**Mesh**:一组互相协调以提供一致网络拓扑的主机。Envoy mesh 是指一组 Envoy 代理,它们构成了由多种不同服务和应用程序平台组成的分布式系统的消息传递基础。

**运行时配置**:与 Envoy 一起部署的带外实时配置系统。可以在无需重启 Envoy 或 更改 Envoy 主配置的情况下,通过更改设置来影响操作。

**Listener**: 侦听器(listener)是可以由下游客户端连接的命名网络位置(例如,端口、unix域套接字等)。Envoy 公开一个或多个下游主机连接的侦听器。一般是每台主机运行一个 Envoy,使用单进程运行,但是每个进程中可以启动任意数量的 Listener(监听器),目前只监听 TCP,每个监听器都独立配置一定数量的(L3/L4)网络过滤器。Listenter 也可以通过 Listener Discovery Service(**LDS**)动态获取。

**Listener filter**:Listener 使用 listener filter(监听器过滤器)来操作链接的元数据。它的作用是在不更改 Envoy 的核心功能的情况下添加更多的集成功能。Listener filter 的 API 相对简单,因为这些过滤器最终是在新接受的套接字上运行。在链中可以互相衔接以支持更复杂的场景,例如调用速率限制。Envoy 已经包含了多个监听器过滤器。

**Http Route Table**:HTTP 的路由规则,例如请求的域名,Path 符合什么规则,转发给哪个 Cluster。

**Health checking**:健康检查会与SDS服务发现配合使用。但是,即使使用其他服务发现方式,也有相应需要进行主动健康检查的情况。详见 [health checking](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/health_checking)

## xDS

xDS 是一个关键概念,它是一类发现服务的统称,其包括如下几类:

- CDS:Cluster Discovery Service
- EDS:Endpoint Discovery Service
- SDS:Service Discovery Service
- RDS:Route Discovery Service
- LDS:Listener Discovery Service

正是通过对 xDS 的请求来动态更新 Envoy 配置。

## 参考

- [Terminology - www.envoyproxy.io](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/terminology)
20 changes: 7 additions & 13 deletions usecases/service-mesh.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,10 @@ Service mesh 并没有给我们带来新功能,它是用于解决其他工具

## 参考

[WHAT’S A SERVICE MESH? AND WHY DO I NEED ONE?](https://buoyant.io/2017/04/25/whats-a-service-mesh-and-why-do-i-need-one/)

[So what even is a Service Mesh? Hot take on Istio and Linkerd](http://redmonk.com/jgovernor/2017/05/31/so-what-even-is-a-service-mesh-hot-take-on-istio-and-linkerd)

[linkerd: A service mesh for AWS ECS](https://medium.com/attest-engineering/linkerd-a-service-mesh-for-aws-ecs-937f201f847a)

[Introducing Istio: A robust service mesh for microservices](https://istio.io/blog/istio-service-mesh-for-microservices.html)

[Application Network Functions With ESBs, API Management, and Now.. Service Mesh?](http://blog.christianposta.com/microservices/application-network-functions-with-esbs-api-management-and-now-service-mesh/)

[Pattern: Service Mesh](http://philcalcado.com/2017/08/03/pattern_service_mesh.html)

[Istio官方文档中文版](http://istio.doczh.cn/)
- [WHAT’S A SERVICE MESH? AND WHY DO I NEED ONE?](https://buoyant.io/2017/04/25/whats-a-service-mesh-and-why-do-i-need-one/)
- [So what even is a Service Mesh? Hot take on Istio and Linkerd](http://redmonk.com/jgovernor/2017/05/31/so-what-even-is-a-service-mesh-hot-take-on-istio-and-linkerd)
- [linkerd: A service mesh for AWS ECS](https://medium.com/attest-engineering/linkerd-a-service-mesh-for-aws-ecs-937f201f847a)
- [Introducing Istio: A robust service mesh for microservices](https://istio.io/blog/istio-service-mesh-for-microservices.html)
- [Application Network Functions With ESBs, API Management, and Now.. Service Mesh?](http://blog.christianposta.com/microservices/application-network-functions-with-esbs-api-management-and-now-service-mesh/)
- [Pattern: Service Mesh](http://philcalcado.com/2017/08/03/pattern_service_mesh.html)
- [Istio官方文档中文版](http://istio.doczh.cn/)

0 comments on commit 5254cb5

Please sign in to comment.