Skip to content

Commit

Permalink
Merge pull request istio#163 from vgbhfive/translate_network_filters
Browse files Browse the repository at this point in the history
zh-translation: /intro/arch_overview/listeners/network_filters.rst
  • Loading branch information
helight authored Nov 15, 2020
2 parents a512020 + 4433f33 commit 630c6da
Showing 1 changed file with 13 additions and 18 deletions.
31 changes: 13 additions & 18 deletions docs/root/intro/arch_overview/listeners/network_filters.rst
Original file line number Diff line number Diff line change
@@ -1,24 +1,19 @@
.. _arch_overview_network_filters:

Network (L3/L4) filters
网络 (L3/L4) 过滤器
=======================

As discussed in the :ref:`listener <arch_overview_listeners>` section, network level (L3/L4) filters
form the core of Envoy connection handling. The filter API allows for different sets of filters to
be mixed and matched and attached to a given listener. There are three different types of network
filters:
如在 :ref:`监听器 <arch_overview_listeners>` 部分的描述一样,网络层 (L3/L4) 过滤器构成了 Envoy 连接处理的核心。
过滤器 API 允许混合不同的过滤器组合,并匹配和附加到给定的监听器。
下面就有三种不同的网络过滤器:

* **Read**: Read filters are invoked when Envoy receives data from a downstream connection.
* **Write**: Write filters are invoked when Envoy is about to send data to a downstream connection.
* **Read/Write**: Read/Write filters are invoked both when Envoy receives data from a downstream
connection and when it is about to send data to a downstream connection.
* **读取**: 当 Envoy 从下游连接接收数据时,将会调用读取过滤器。
* **写入**: 当 Envoy 将要向下游发送数据时,将会调用写入过滤器。
* **读取/写入**: 读取/写入过滤器会在 Envoy 从下游连接接收数据或者向下游连接写入数据时都会被调用。

The API for network level filters is relatively simple since ultimately the filters operate on raw
bytes and a small number of connection events (e.g., TLS handshake complete, connection disconnected
locally or remotely, etc.). Filters in the chain can stop and subsequently continue iteration to
further filters. This allows for more complex scenarios such as calling a :ref:`rate limiting
service <arch_overview_global_rate_limit>`, etc. Network level filters can also share state (static and
dynamic) among themselves within the context of a single downstream connection. Refer to
:ref:`data sharing between filters <arch_overview_data_sharing_between_filters>` for more details.
Envoy already includes several network level filters that are documented in this architecture
overview as well as the :ref:`configuration reference <config_network_filters>`.
网络层过滤器的 API 都相对简单,因为过滤器最终会对原始字节和少量连接事件进行操作(比如 TLS 握手完成、本地或远程断开连接)。
可停止链中的过滤器并继续执行后续的过滤器。
这允许去应对更复杂的业务场景,比如调用 :ref:`限速服务 <arch_overview_global_rate_limit>` 。
同时网络筛选器可以在单个下游连接的上下文中彼此共享状态(静态和动态)。
有关其他的信息,可以参考 :ref:`过滤器之间的数据共享 <arch_overview_data_sharing_between_filters>` 。
Envoy 现在已经有好几个网络过滤器,这些过滤器在本体系架构概述和 :ref:`配置参考 <config_network_filters>` 中都有记录。

0 comments on commit 630c6da

Please sign in to comment.