Skip to content

Commit

Permalink
Merge branch 'master' into version-gauge
Browse files Browse the repository at this point in the history
Signed-off-by: Jose Nino <[email protected]>
  • Loading branch information
Jose Nino committed Oct 4, 2017
2 parents cb8e2fc + c534f5a commit 4a4aa75
Show file tree
Hide file tree
Showing 69 changed files with 1,278 additions and 314 deletions.
2 changes: 2 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ jobs:
- checkout
- run: ci/do_circle_ci.sh bazel.coverage
- run: ci/coverage_publish.sh
- store_artifacts:
path: /build/envoy/generated/coverage
format:
docker:
- image: lyft/envoy-build:8839608c2f4b0d7c8311361ee5c8785e543d517a
Expand Down
8 changes: 7 additions & 1 deletion bazel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,13 @@ test/run_envoy_bazel_coverage.sh
The summary results are printed to the standard output and the full coverage
report is available in `generated/coverage/coverage.html`.

In Travis, the master branch and pull requests by members of the Lyft organization will have coverage reports automatically uploaded to S3 when the coverage target successfully executes. The latest coverage report for master is available [here](https://s3.amazonaws.com/lyft-envoy/coverage/report-master/coverage.html). If an uploaded coverage report is available for a branch's build, a link can be found at the bottom of the output log in Travis.
Coverage for every PR is available in Circle in the "artifacts" tab of the coverage job. You will
need to navigate down and open "coverage.html" but then you can navigate per normal. NOTE: We
have seen some issues with seeing the artifacts tab. If you can't see it, log out of Circle, and
then log back in and it should start working.

The latest coverage report for master is available
[here](https://s3.amazonaws.com/lyft-envoy/coverage/report-master/coverage.html).

# Cleaning the build and test artifacts

Expand Down
4 changes: 2 additions & 2 deletions bazel/envoy_build_system.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ def envoy_test_linkopts():
"@bazel_tools//tools/osx:darwin": [],

# TODO(mattklein123): It's not great that we universally link against the following libs.
# In particular, -latomic is not needed on all platforms. Make this more granular.
"//conditions:default": ["-pthread", "-latomic"],
# In particular, -latomic and -lrt are not needed on all platforms. Make this more granular.
"//conditions:default": ["-pthread", "-latomic", "-lrt"],
})

# References to Envoy external dependencies should be wrapped with this function.
Expand Down
2 changes: 2 additions & 0 deletions docs/configuration/cluster_manager/cluster.rst
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ dns_resolvers
configuration. For cluster types other than *strict_dns* and *logical_dns* this setting is
ignored.

.. _config_cluster_manager_cluster_outlier_detection_summary:

:ref:`outlier_detection <config_cluster_manager_cluster_outlier_detection>`
*(optional, object)* If specified, outlier detection will be enabled for this upstream cluster.
See the :ref:`architecture overview <arch_overview_outlier_detection>` for more information on outlier
Expand Down
16 changes: 16 additions & 0 deletions docs/configuration/http_conn_man/stats.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,19 @@ the following statistics:
downstream_cx_total, Counter, Total connections
downstream_cx_destroy_remote_active_rq, Counter, Total connections destroyed remotely with 1+ active requests
downstream_rq_total, Counter, Total requests


Per listener statistics
-----------------------

Additional per listener statistics are rooted at *listener.<address>.http.<stat_prefix>.* with the
following statistics:

.. csv-table::
:header: Name, Type, Description
:widths: 1, 1, 2

downstream_rq_2xx, Counter, Total 2xx responses
downstream_rq_3xx, Counter, Total 3xx responses
downstream_rq_4xx, Counter, Total 4xx responses
downstream_rq_5xx, Counter, Total 5xx responses
11 changes: 11 additions & 0 deletions docs/configuration/http_filters/router_filter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,17 @@ for the next health check interval. The host can become healthy again via standa
checks. See the :ref:`health checking overview <arch_overview_health_checking>` for more
information.

.. _config_http_filters_router_x-envoy-overloaded:

x-envoy-overloaded
^^^^^^^^^^^^^^^^^^

If this header is set by upstream, Envoy will not retry. Currently the value of the header is not
looked at, only its presence. Additionally, Envoy will set this header on the downstream response
if a request was dropped due to either :ref:`maintenance mode
<config_http_filters_router_runtime_maintenance_mode>` or upstream :ref:`circuit breaking
<arch_overview_circuit_break>`.

.. _config_http_filters_router_stats:

Statistics
Expand Down
1 change: 1 addition & 0 deletions docs/configuration/network_filters/network_filters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ filters.
echo_filter
mongo_proxy_filter
rate_limit_filter
redis_proxy_filter
tcp_proxy_filter
97 changes: 97 additions & 0 deletions docs/configuration/network_filters/redis_proxy_filter.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
.. _config_network_filters_redis_proxy:

Redis proxy
===========

Redis :ref:`architecture overview <arch_overview_redis>`.

.. code-block:: json
{
"name": "redis_proxy",
"config": {
"cluster_name": "...",
"conn_pool": "{...}",
"stat_prefix": "..."
}
}
cluster_name
*(required, string)* Name of cluster from cluster manager.
See the :ref:`configuration section <arch_overview_redis_configuration>` of the architecture
overview for recommendations on configuring the backing cluster.

conn_pool
*(required, object)* Connection pool configuration.

stat_prefix
*(required, string)* The prefix to use when emitting :ref:`statistics
<config_network_filters_redis_proxy_stats>`.

Connection pool configuration
-----------------------------

.. code-block:: json
{
"op_timeout_ms": "...",
}
op_timeout_ms
*(required, integer)* Per-operation timeout in milliseconds. The timer starts when the first
command of a pipeline is written to the backend connection. Each response received from Redis
resets the timer since it signifies that the next command is being processed by the backend.
The only exception to this behavior is when a connection to a backend is not yet established. In
that case, the connect timeout on the cluster will govern the timeout until the connection is
ready.

.. _config_network_filters_redis_proxy_stats:

Statistics
----------

Every configured Redis proxy filter has statistics rooted at *redis.<stat_prefix>.* with the
following statistics:

.. csv-table::
:header: Name, Type, Description
:widths: 1, 1, 2

downstream_cx_active, Gauge, Total active connections
downstream_cx_protocol_error, Counter, Total protocol errors
downstream_cx_rx_bytes_buffered, Gauge, Total received bytes currently buffered
downstream_cx_rx_bytes_total, Counter, Total bytes received
downstream_cx_total, Counter, Total connections
downstream_cx_tx_bytes_buffered, Gauge, Total sent bytes currently buffered
downstream_cx_tx_bytes_total, Counter, Total bytes sent
downstream_rq_active, Gauge, Total active requests
downstream_rq_total, Counter, Total requests


Splitter statistics
-------------------

The Redis filter will gather statistics for the command splitter in the
*redis.<stat_prefix>.splitter.* with the following statistics:

.. csv-table::
:header: Name, Type, Description
:widths: 1, 1, 2

invalid_request, Counter, "Number of requests with an incorrect number of arguments"
unsupported_command, Counter, "Number of commands issued which are not recognized by the
command splitter"

Per command statistics
----------------------

The Redis filter will gather statistics for commands in the
*redis.<stat_prefix>.command.<command>.* namespace.

.. csv-table::
:header: Name, Type, Description
:widths: 1, 1, 2

total, Counter, Number of commands

.. _config_network_filters_redis_proxy_per_command_stats:
1 change: 1 addition & 0 deletions docs/intro/arch_overview/arch_overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Architecture overview
tcp_proxy
mongo
dynamo
redis
hot_restart
dynamic_configuration
init
6 changes: 5 additions & 1 deletion docs/intro/arch_overview/circuit_breaking.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,14 @@ configure and code each application independently. Envoy supports various types
* **Cluster maximum active retries**: The maximum number of retries that can be outstanding to all
hosts in a cluster at any given time. In general we recommend aggressively circuit breaking
retries so that retries for sporadic failures are allowed but the overall retry volume cannot
explode and cause large scale cascading failure. If this circuit breaker overflows the
explode and cause large scale cascading failure. If this circuit breaker overflows the
:ref:`upstream_rq_retry_overflow <config_cluster_manager_cluster_stats>` counter for the cluster
will increment.

Each circuit breaking limit is :ref:`configurable <config_cluster_manager_cluster_circuit_breakers>`
and tracked on a per upstream cluster and per priority basis. This allows different components of
the distributed system to be tuned independently and have different limits.

Note that circuit breaking will cause the :ref:`x-envoy-overloaded
<config_http_filters_router_x-envoy-overloaded>` header to be set by the router filter in the
case of HTTP requests.
3 changes: 3 additions & 0 deletions docs/intro/arch_overview/http_routing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ headers <config_http_filters_router_headers>`. The following configurations are
requirements. For example, network failure, all 5xx response codes, idempotent 4xx response codes,
etc.

Note that retries may be disabled depending on the contents of the :ref:`x-envoy-overloaded
<config_http_filters_router_x-envoy-overloaded>`.

.. _arch_overview_http_routing_priority:

Priority routing
Expand Down
Loading

0 comments on commit 4a4aa75

Please sign in to comment.