#envoy #mesh
- https://www.envoyproxy.io/docs/envoy/v1.29.3/intro/intro#intro
# What is Envoy
- Envoy 是一个 L7 代理 和 communication bus,为大型现代化面向服务的架构而设计。
- 信念:
> The network should be **transparent** to applications. When network and application problems do occur it should be **easy to determine** the source of the problem.
- High level features:
- **Out of process architecture:** 单独进程,支持任意语言,envoy可以透明地快速部署和升级。
- **L3/L4 filter architecture:** Envoy 的核心是一个 L3/L4 网络代理。可插拔 filter chain 机制,允许编写 filters 支持不同的 TCP/UDP proxy tasks 和插入到 main server 中。
- **HTTP L7 filter architecture:** Envoy 支持额外的 HTTP L7 filter layer。HTTP filters 可以插入到 HTTP 连接管理子系统,支持不同的任务例如 buffering,限速,路由/转发等。
- **First class HTTP/2 support:** 在 HTTP 模式下运行时,Envoy 同时支持 HTTP/1.1 和 HTTP/2。
- **HTTP/3 support:** 目前是 alpha 阶段。
- **HTTP L7 routing:** 在 HTTP 模式下运行时,Envoy 支持一个 [routing](https://www.envoyproxy.io/docs/envoy/v1.29.3/intro/arch_overview/http/http_routing#arch-overview-http-routing) subsystem,支持基于 path,authority,content type、runtime values 等来做路由和重定向请求。
- **gRPC support:** Envoy 支持所有需要用作 gRPC 请求和响应的路由和负载平衡的HTTP/2特性。
- **Service discovery and dynamic configuration:**
- 动态配置 API:[xDS configuration API](https://www.envoyproxy.io/docs/envoy/v1.29.3/intro/arch_overview/operations/dynamic_configuration#arch-overview-dynamic-config) 中心化管理
- 为 Envoy 提供关于以下内容的动态更新:
- hosts within a backend cluster
- backend clusters 自身
- HTTP routing
- listening sockets
- cryptographic material
- **Health checking:** [健康检查子系统](https://www.envoyproxy.io/docs/envoy/v1.29.3/intro/arch_overview/upstream/health_checking#arch-overview-health-checking)
- **Advanced load balancing**
- **Front/edge proxy support:** Envoy具有一组功能,使其非常适合作为大多数现代Web应用程序用例的边缘代理。
- **Best in class observabilty:** Envoy 包含了对所有子系统的统计。Envoy 还通过第三方提供商支持分布式跟踪。
--------
# Architecture overview
## Introduction
### Terminology
- **Host:** 可以进行网络通信的实体(手机上的应用、服务器等)。一个 host 是一个**逻辑**网络应用。一个物理硬件上可以有多个独立寻址的 hosts。
- **Downstream:** downstream host,连接到 Envoy,发送请求,接收回应。
- **Upstream:** upstream host,接收来自 Envoy 的连接和请求,返回回应。
- **Listener:** named network location(如端口、unix domain socket等),下游客户端可以连接到它们。Envoy 暴露一到多个 Listener,供 downstream host 连接。**(Envoy 自己的)**
- **Cluster:** 一组逻辑上相似的 upstream hosts,Envoy 可以连接到它们。
- Envoy 通过 [service discovery](https://www.envoyproxy.io/docs/envoy/v1.29.3/intro/arch_overview/upstream/service_discovery#arch-overview-service-discovery) 来发现一个 cluster 中的成员。
- 可选地通过健康检查来确定 cluster 成员的健康。
- 通过负载均衡策略路由一个请求到 cluster 的成员。
- **Mesh:** A group of hosts that coordinate to provide a consistent network topology。
- **Runtime configuration:** 带外实时配置系统与Envoy一起部署。更改配置不需要重启。
---------
# Life of a Request
----------
# Deployment types