docs: redis proxy (#293)

Signed-off-by: Matt Klein <mklein@lyft.com>
pull/294/head
Matt Klein 8 years ago committed by GitHub
parent 6bcca94649
commit 1134ceeca7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      api/BUILD
  2. 35
      api/filter/network/redis_proxy.proto
  3. 1
      docs/build.sh
  4. 46
      docs/root/api-v1/network_filters/redis_proxy_filter.rst
  5. 44
      docs/root/configuration/network_filters/redis_proxy_filter.rst

@ -152,8 +152,9 @@ proto_library(
"//api/filter/http:lua",
"//api/filter/http:router",
"//api/filter/http:transcoder",
"//api/filter/network:tcp_proxy",
"//api/filter/network:http_connection_manager",
"//api/filter/network:mongo_proxy",
"//api/filter/network:redis_proxy",
"//api/filter/network:tcp_proxy",
],
)

@ -4,28 +4,31 @@ package envoy.api.v2.filter.network;
import "google/protobuf/duration.proto";
import "validate/validate.proto";
// [#protodoc-title: Redis Proxy]
// Redis Proxy :ref:`configuration overview <config_network_filters_redis_proxy>`.
message RedisProxy {
// The human readable prefix to use when emitting statistics for the
// Redis proxy filter. See the statistics documentation for more information.
string stat_prefix = 1;
// The prefix to use when emitting :ref:`statistics <config_network_filters_redis_proxy_stats>`.
string stat_prefix = 1 [(validate.rules).string.min_len = 1];
// Indicates the upstream cluster to which the operation should be routed to.
string cluster = 2;
// 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.
string cluster = 2 [(validate.rules).string.min_len = 1];
// Redis connection pool settings.
message ConnPoolSettings {
// Per-operation timeout. See
// https://developers.google.com/protocol-buffers/docs/proto3#json for
// the JSON/YAML Duration mapping. 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. REQUIRED.
google.protobuf.Duration op_timeout = 1;
// 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.
google.protobuf.Duration op_timeout = 1 [(validate.rules).duration.required = true];
}
// Network settings for the connection pool to the upstream cluster.
ConnPoolSettings settings = 3;
ConnPoolSettings settings = 3 [(validate.rules).message.required = true];
}

@ -45,6 +45,7 @@ PROTO_RST="
/api/filter/http/transcoder/api/filter/http/transcoder.proto.rst
/api/filter/network/http_connection_manager/api/filter/network/http_connection_manager.proto.rst
/api/filter/network/mongo_proxy/api/filter/network/mongo_proxy.proto.rst
/api/filter/network/redis_proxy/api/filter/network/redis_proxy.proto.rst
/api/filter/network/tcp_proxy/api/filter/network/tcp_proxy.proto.rst
/api/protocol/api/protocol.proto.rst
/api/rds/api/rds.proto.rst

@ -0,0 +1,46 @@
.. _config_network_filters_redis_proxy_v1:
Redis proxy
===========
Redis proxy :ref:`configuration overview <config_network_filters_redis_proxy>`.
.. 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.

@ -3,47 +3,9 @@
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.
* Redis :ref:`architecture overview <arch_overview_redis>`
* :ref:`v1 API reference <config_network_filters_redis_proxy_v1>`
* :ref:`v2 API reference <envoy_api_msg_filter.network.RedisProxy>`
.. _config_network_filters_redis_proxy_stats:

Loading…
Cancel
Save