Redis filter

In this example, we show how a Redis filter can be used with the Envoy proxy.

The Envoy proxy configuration includes a Redis filter that routes egress requests to redis server.

Step 1: Build the sandbox

Change to the examples/redis directory.

Build and start the containers.

Terminal 1

$ pwd
$ docker-compose pull
$ docker-compose up --build -d
$ docker-compose ps

    Name                   Command               State                             Ports
redis_proxy_1   / /bin       Up      10000/tcp,>1999/tcp,>8001/tcp
redis_redis_1 redis       Up      6379/tcp

Step 2: Issue Redis commands

Issue Redis commands using your favourite Redis client, such as redis-cli, and verify they are routed via Envoy.

Terminal 1

$ redis-cli -h localhost -p 1999 set foo foo
$ redis-cli -h localhost -p 1999 set bar bar
$ redis-cli -h localhost -p 1999 get foo
$ redis-cli -h localhost -p 1999 get bar

Step 3: Verify egress stats

Go to http://localhost:8001/stats?usedonly&filter=redis.egress_redis.command and verify the following stats: 2 2

See also

Envoy Redis filter

Learn more about using the Envoy Redis filter.

Envoy admin quick start guide

Quick start guide to the Envoy admin interface.


The Redis in-memory data structure store.