Skip to content
Envoy xDS Server with Consul
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore #CleanUp Oct 15, 2018
Dockerfile-xds-build Add file based config loader Oct 16, 2018
Gopkg.lock added dep pkg manager Oct 15, 2018
Gopkg.toml added dep pkg manager Oct 15, 2018
LICENSE add cluster tls context Feb 4, 2019
docker-compose.consul.yaml update travis ci Aug 22, 2018
docker-compose.travis.yaml update travis ci Aug 22, 2018


Build Status Version

Envoy Pilot or Envoy xDS is a control plane implementation for Envoy written in Golang and uses Consul for persistence by default. It can also run without Consul by loading configuration from file.

This is an extension of go-control-plane

Currently Supports

  • CDS
  • LDS
  • RDS
  • EDS
  • ADS (for CDS & LDS)

Note: Some infrequent configurations might not be mapped. Feel free to PR

Checkout Envoy XDS PROTOCOL Overview for more detail

Also Checkout Sample Project

File Config

Checkout the above example to load config from file

Consul Usage

xDS Server will be exposed on port 7777

Run Envoy Proxy with the following configurations or use --service-node && --service-cluster

  id: ride-service-replica-2
  cluster: ride-service

Every *DS requires two keys to be set in consul

  • config
  • version

And the key template is xDS/app-cluster/ride-service/CDS/(config|version)

For CDS add KV pairs

  • xDS/app-cluster/ride-service/CDS/version => "1.0"
  • xDS/app-cluster/ride-service/CDS/config => "[{ { "name": "app1", "connect_timeout": "0.250s", "type": "STRICT_DNS", "lb_policy": "RANDOM", "hosts": [{ "socket_address": { "address": "", "port_value": 1234 } }] } }]"

Pushing new configuration

  • Envoy-Pilot will be polling for version change every 10 seconds.
  • If there is a version mismatch for any of xDS/app-cluster/ride-service/(CDS|LDS|RDS|EDS)/version then new config xDS/app-cluster/ride-service/(CDS|LDS|RDS|EDS)/config will be pushed to subscriber envoy.
  • If update succeed there will be an ACK log for the instance.

Running Docker Compose

From root directory

docker network create envoy-pilot_xds-demo
docker-compose -f docker-compose.consul.yaml up
docker-compose -f docker-compose.server.yaml up --build

Running test

cd test/integration
docker-compose up --build

cd test/rspec
DEVMODE=true rspec basic_spec.rb --order defined --format documentation

Runnnig Docker

Consul url need to be set in .env



Docker run

docker run -v $(pwd)/env_values.txt:/.env -p 7777:7777 -p 9090:9090 tak2siva/envoy-pilot:latest

Helm Chart

Install using the Helm Chart for Envoy-Pilot.


  • xDS-Server is running on port 7777
  • A http server is running on port 9090 for debugging

localhost:9090/dump/KEY_TEMPLATE will give a json dump of proto mapping


  • To get list of subcsribers hit localhost:9090/dump/subscribers/

Prometheus metrics

Prometheus is running on localhost:8081/metrics and the following stats are available

  • xds_active_connections[cluster] (GAUGE)
  • xds_active_subscribers[cluster][type] (GAUGE)
  • xds_update_counter[cluster][subscribedTo] (Counter)
You can’t perform that action at this time.