parent
30e4830489
commit
dd4cd02123
13 changed files with 329 additions and 194 deletions
@ -0,0 +1,49 @@ |
||||
.. _config_listeners_lds_v1: |
||||
|
||||
Listener discovery service (LDS) |
||||
================================ |
||||
|
||||
.. code-block:: json |
||||
|
||||
{ |
||||
"cluster": "...", |
||||
"refresh_delay_ms": "..." |
||||
} |
||||
|
||||
cluster |
||||
*(required, string)* The name of an upstream :ref:`cluster <config_cluster_manager_cluster>` that |
||||
hosts the listener discovery service. The cluster must run a REST service that implements the |
||||
:ref:`LDS HTTP API <config_listeners_lds_v1_api>`. NOTE: This is the *name* of a cluster defined |
||||
in the :ref:`cluster manager <config_cluster_manager>` configuration, not the full definition of |
||||
a cluster as in the case of SDS and CDS. |
||||
|
||||
refresh_delay_ms |
||||
*(optional, integer)* The delay, in milliseconds, between fetches to the LDS API. Envoy will add |
||||
an additional random jitter to the delay that is between zero and *refresh_delay_ms* |
||||
milliseconds. Thus the longest possible refresh delay is 2 \* *refresh_delay_ms*. Default value |
||||
is 30000ms (30 seconds). |
||||
|
||||
.. _config_listeners_lds_v1_api: |
||||
|
||||
REST API |
||||
-------- |
||||
|
||||
.. http:get:: /v1/listeners/(string: service_cluster)/(string: service_node) |
||||
|
||||
Asks the discovery service to return all listeners for a particular `service_cluster` and |
||||
`service_node`. `service_cluster` corresponds to the :option:`--service-cluster` CLI option. |
||||
`service_node` corresponds to the :option:`--service-node` CLI option. Responses use the following |
||||
JSON schema: |
||||
|
||||
.. code-block:: json |
||||
|
||||
{ |
||||
"listeners": [] |
||||
} |
||||
|
||||
listeners |
||||
*(Required, array)* A list of :ref:`listeners <config_listeners>` that will be |
||||
dynamically added/modified within the listener manager. The management server is expected to |
||||
respond with the complete set of listeners that Envoy should configure during each polling cycle. |
||||
Envoy will reconcile this list with the listeners that are currently loaded and either |
||||
add/modify/remove listeners as necessary. |
@ -1,7 +1,111 @@ |
||||
.. _config_listeners_v1: |
||||
|
||||
Listeners |
||||
========= |
||||
|
||||
.. toctree:: |
||||
:hidden: |
||||
|
||||
lds |
||||
|
||||
.. code-block:: json |
||||
|
||||
{ |
||||
"name": "...", |
||||
"address": "...", |
||||
"filters": [], |
||||
"ssl_context": "{...}", |
||||
"bind_to_port": "...", |
||||
"use_proxy_proto": "...", |
||||
"use_original_dst": "...", |
||||
"per_connection_buffer_limit_bytes": "...", |
||||
"drain_type": "..." |
||||
} |
||||
|
||||
.. _config_listeners_name: |
||||
|
||||
name |
||||
*(optional, string)* The unique name by which this listener is known. If no name is provided, |
||||
Envoy will allocate an internal UUID for the listener. If the listener is to be dynamically |
||||
updated or removed via :ref:`LDS <config_listeners_lds>` a unique name must be provided. |
||||
By default, the maximum length of a listener's name is limited to 60 characters. This limit can be |
||||
increased by setting the :option:`--max-obj-name-len` command line argument to the desired value. |
||||
|
||||
address |
||||
*(required, string)* The address that the listener should listen on. Currently only TCP |
||||
listeners are supported, e.g., "tcp://127.0.0.1:80". Note, "tcp://0.0.0.0:80" is the wild card |
||||
match for any IPv4 address with port 80. |
||||
|
||||
:ref:`filters <config_listener_filters>` |
||||
*(required, array)* A list of individual :ref:`network filters <arch_overview_network_filters>` |
||||
that make up the filter chain for connections established with the listener. Order matters as the |
||||
filters are processed sequentially as connection events happen. |
||||
|
||||
**Note:** If the filter list is empty, the connection will close by default. |
||||
|
||||
:ref:`ssl_context <config_listener_ssl_context>` |
||||
*(optional, object)* The :ref:`TLS <arch_overview_ssl>` context configuration for a TLS listener. |
||||
If no TLS context block is defined, the listener is a plain text listener. |
||||
|
||||
bind_to_port |
||||
*(optional, boolean)* Whether the listener should bind to the port. A listener that doesn't bind |
||||
can only receive connections redirected from other listeners that set use_original_dst parameter to |
||||
true. Default is true. |
||||
|
||||
use_proxy_proto |
||||
*(optional, boolean)* Whether the listener should expect a |
||||
`PROXY protocol V1 <http://www.haproxy.org/download/1.5/doc/proxy-protocol.txt>`_ header on new |
||||
connections. If this option is enabled, the listener will assume that that remote address of the |
||||
connection is the one specified in the header. Some load balancers including the AWS ELB support |
||||
this option. If the option is absent or set to false, Envoy will use the physical peer address |
||||
of the connection as the remote address. |
||||
|
||||
use_original_dst |
||||
*(optional, boolean)* If a connection is redirected using *iptables*, the port on which the proxy |
||||
receives it might be different from the original destination address. When this flag is set to true, |
||||
the listener hands off redirected connections to the listener associated with the original |
||||
destination address. If there is no listener associated with the original destination address, the |
||||
connection is handled by the listener that receives it. Defaults to false. |
||||
|
||||
.. _config_listeners_per_connection_buffer_limit_bytes: |
||||
|
||||
per_connection_buffer_limit_bytes |
||||
*(optional, integer)* Soft limit on size of the listener's new connection read and write buffers. |
||||
If unspecified, an implementation defined default is applied (1MiB). |
||||
|
||||
.. _config_listeners_drain_type: |
||||
|
||||
drain_type |
||||
*(optional, string)* The type of draining that the listener does. Allowed values include *default* |
||||
and *modify_only*. See the :ref:`draining <arch_overview_draining>` architecture overview for |
||||
more information. |
||||
|
||||
.. _config_listener_filters: |
||||
|
||||
Filters |
||||
------- |
||||
|
||||
Network filter :ref:`architecture overview <arch_overview_network_filters>`. |
||||
|
||||
.. code-block:: json |
||||
|
||||
{ |
||||
"name": "...", |
||||
"config": "{...}" |
||||
} |
||||
|
||||
name |
||||
*(required, string)* The name of the filter to instantiate. The name must match a :ref:`supported |
||||
filter <config_network_filters>`. |
||||
|
||||
config |
||||
*(required, object)* Filter specific configuration which depends on the filter being instantiated. |
||||
See the :ref:`supported filters <config_network_filters>` for further documentation. |
||||
|
||||
.. _config_listener_ssl_context: |
||||
|
||||
TLS context |
||||
=========== |
||||
----------- |
||||
|
||||
TLS :ref:`architecture overview <arch_overview_ssl>`. |
||||
|
@ -1,21 +0,0 @@ |
||||
.. _config_listener_filters: |
||||
|
||||
Filters |
||||
======= |
||||
|
||||
Network filter :ref:`architecture overview <arch_overview_network_filters>`. |
||||
|
||||
.. code-block:: json |
||||
|
||||
{ |
||||
"name": "...", |
||||
"config": "{...}" |
||||
} |
||||
|
||||
name |
||||
*(required, string)* The name of the filter to instantiate. The name must match a :ref:`supported |
||||
filter <config_network_filters>`. |
||||
|
||||
config |
||||
*(required, object)* Filter specific configuration which depends on the filter being instantiated. |
||||
See the :ref:`supported filters <config_network_filters>` for further documentation. |
@ -0,0 +1,12 @@ |
||||
How fast is Envoy? |
||||
================== |
||||
|
||||
We are frequently asked *how fast is Envoy?* or *how much latency will Envoy add to my requests?* |
||||
The answer is: *it depends*. Performance depends a great deal on which Envoy features are being |
||||
used and the environment in which Envoy is run. In addition, doing accurate performance testing |
||||
is an incredibly difficult task that the project does not currently have resources for. |
||||
|
||||
Although we have done quite a bit of performance tuning of Envoy in the critical path and we |
||||
believe it performs extremely well, because of the previous points we do not currently publish |
||||
any official benchmarks. We encourage users to benchmark Envoy in their own environments with a |
||||
configuration similar to what they plan on using in production. |
@ -0,0 +1,52 @@ |
||||
.. _faq_how_to_setup_sni: |
||||
|
||||
How do I setup SNI? |
||||
=================== |
||||
|
||||
`SNI <https://en.wikipedia.org/wiki/Server_Name_Indication>`_ is only supported in the :ref:`v2 |
||||
configuration/API <config_overview_v2>`. |
||||
|
||||
The current implementation has the requirement that the :ref:`filters |
||||
<envoy_api_field_FilterChain.filters>` in every :ref:`FilterChain <envoy_api_msg_FilterChain>` must |
||||
be identical. In a future release, this requirement will be relaxed so that SNI can be used to |
||||
choose between completely different filter chains. :ref:`Domain name matching |
||||
<envoy_api_field_VirtualHost.domains>` can still be used within the HTTP connection manager to |
||||
choose different routes. This is by far the most common use case for SNI. |
||||
|
||||
The following is a YAML example of the above requirement. |
||||
|
||||
.. code-block:: yaml |
||||
|
||||
address: |
||||
socket_address: { address: 127.0.0.1, port_value: 1234 } |
||||
filter_chains: |
||||
- filter_chain_match: |
||||
sni_domains: "example.com" |
||||
tls_context: |
||||
common_tls_context: |
||||
tls_certificates: |
||||
- certificate_chain: { filename: "example_com_cert.pem" } |
||||
private_key: { filename: "example_com_key.pem" } |
||||
filters: |
||||
- name: envoy.http_connection_manager |
||||
config: |
||||
route_config: |
||||
virtual_hosts: |
||||
- routes: |
||||
- match: { prefix: "/" } |
||||
route: { cluster: service_foo } |
||||
- filter_chain_match: |
||||
sni_domains: "www.example.com" |
||||
tls_context: |
||||
common_tls_context: |
||||
tls_certificates: |
||||
- certificate_chain: { filename: "www_example_com_cert.pem" } |
||||
private_key: { filename: "www_example_com_key.pem" } |
||||
filters: |
||||
- name: envoy.http_connection_manager |
||||
config: |
||||
route_config: |
||||
virtual_hosts: |
||||
- routes: |
||||
- match: { prefix: "/" } |
||||
route: { cluster: service_foo } |
Loading…
Reference in new issue