You started with one Envoy node fronting a handful of upstream services, written by hand into envoy.yaml. Six months later you have nine upstreams, three teams pushing route changes, and every config reload is a SIGHUP to a single static file with no validation gate. A typo last Friday took the API offline for eleven minutes because Envoy refused to start with the new file and the previous instance had already exited. The next change you wrote was “stop editing envoy.yaml directly” — which, in Envoy’s vocabulary, is the moment you adopt xDS.
What’s happening
Envoy was designed to be configured remotely. A control plane speaks the xDS family of gRPC APIs — LDS for listeners, RDS for routes, CDS for clusters, EDS for endpoints — and the data-plane Envoy fetches its configuration over a streaming connection. New config is delivered as a versioned snapshot, applied atomically, and rolled back if Envoy rejects it. The static envoy.yaml file becomes a tiny bootstrap that points at the control plane; everything operational lives in the snapshot.
A front-proxy cluster adds two more requirements on top. First, every Envoy node must serve the same listener set and route table — there is no per-node configuration drift, because the upstream LB (cloud LB, BGP anycast, or DNS round-robin) treats them as interchangeable. Second, config changes must be testable before they reach production: an xDS server with versioned snapshots and a staging cluster is what gets you out of “ship the YAML and pray.” Hot restart — Envoy’s ability to spawn a child process that takes over listening sockets without dropping inflight connections — is the third piece, and matters whenever you change a flag that xDS cannot push (TLS context, listener filters compiled in, the bootstrap itself).
Observability is non-negotiable at the front-proxy tier. Envoy emits a high-cardinality Prometheus surface (per-cluster, per-route, per-listener), structured access logs in JSON, and OpenTelemetry tracing spans for every request. If you skip the OTel hookup you give up the only causal chain that links a slow user request to the upstream service that caused it.
How to verify
After the installer runs on all three nodes, the bootstrap should show xDS connected:
curl -s http://127.0.0.1:9901/server_info | jq '.state, .node.id, .node.cluster'
# "LIVE"
# "envoy-front-01"
# "front-proxy"
Listener and cluster warming should be zero:
curl -s http://127.0.0.1:9901/stats | grep -E 'listener_manager.(workers_started|lds.update_success)|cluster_manager.cds.update_success'
Confirm the control plane is the source of truth (not the bootstrap):
curl -s http://127.0.0.1:9901/config_dump?include_eds | jq '.configs[].dynamic_listeners | length' 2>/dev/null
A live route push should propagate to all three nodes within a second or two — measure with:
for n in 10.20.0.11 10.20.0.12 10.20.0.13; do
ssh $n "curl -s http://127.0.0.1:9901/stats | grep cluster.api_v1.upstream_rq_total"
done
Prometheus should be scraping every node and OTel traces should be reaching the collector — if tracing.zipkin.spans_sent is zero, the OTel endpoint or service name is wrong.
The fix
The installer below sets up a single Envoy front-proxy node on Ubuntu 22.04. Run it on three nodes (or however many you front-proxy with), all pointed at the same xDS control plane. The control-plane installer is at the bottom — run it once on a separate node. Edit the variables at the top of each script before running.
Save this as /root/setup-envoy-frontproxy.sh:
#!/usr/bin/env bash
set -euo pipefail
### Ubuntu 22.04 Envoy front-proxy node installer
### Run on each front-proxy node after editing the variables below
### Assumes xDS control plane already running (see control-plane installer)
if [[ "$(id -u)" -ne 0 ]]; then
echo "Run as root."
exit 1
fi
# === EDIT PER NODE ===
NODE_ID="envoy-front-01" # envoy-front-01 / 02 / 03
NODE_CLUSTER="front-proxy" # logical cluster name
NODE_IP="10.20.0.11" # this node's private IP
XDS_HOST="10.20.0.20" # control-plane host
XDS_PORT="18000" # control-plane gRPC port
OTEL_HOST="10.20.0.30" # OTel collector OTLP gRPC
OTEL_PORT="4317"
ADMIN_BIND="127.0.0.1:9901" # admin interface (loopback only)
LISTEN_BIND="0.0.0.0" # data plane bind
HTTP_PORT="80"
HTTPS_PORT="443"
ENVOY_VERSION="1.31.2"
# =====================
echo
echo "========================================"
echo "Envoy front-proxy ${NODE_ID} (${NODE_IP})"
echo "========================================"
echo
echo "==> Updating base OS"
apt-get update
apt-get -y dist-upgrade
apt-get -y install curl wget jq lsof tcpdump net-tools dnsutils \
ca-certificates gnupg apt-transport-https unattended-upgrades \
fail2ban chrony socat
systemctl enable --now chrony
echo "==> Hardening SSH"
sed -i 's|^[#[:space:]]*PermitRootLogin.*|PermitRootLogin prohibit-password|' /etc/ssh/sshd_config
sed -i 's|^[#[:space:]]*PasswordAuthentication.*|PasswordAuthentication no|' /etc/ssh/sshd_config
sshd -t && systemctl restart ssh
echo "==> fail2ban + unattended-upgrades"
cat > /etc/fail2ban/jail.d/sshd.local <<'FAIL2BAN'
[sshd]
enabled = true
port = ssh
backend = systemd
maxretry = 4
findtime = 10m
bantime = 1h
FAIL2BAN
systemctl enable --now fail2ban
dpkg-reconfigure -f noninteractive unattended-upgrades
echo "==> Kernel/sysctl tuning for L7 proxy"
cat > /etc/sysctl.d/99-envoy.conf <<'SYSCTL'
net.core.somaxconn = 65535
net.core.netdev_max_backlog = 32768
net.ipv4.tcp_max_syn_backlog = 16384
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.ip_local_port_range = 10240 65535
net.ipv4.tcp_fin_timeout = 15
net.ipv4.tcp_keepalive_time = 60
net.ipv4.tcp_keepalive_intvl = 10
net.ipv4.tcp_keepalive_probes = 6
net.ipv4.tcp_slow_start_after_idle = 0
fs.file-max = 2097152
fs.nr_open = 2097152
vm.swappiness = 10
SYSCTL
sysctl --system
cat > /etc/security/limits.d/99-envoy.conf <<'LIMITS'
envoy soft nofile 1048576
envoy hard nofile 1048576
envoy soft nproc 65535
envoy hard nproc 65535
LIMITS
echo "==> Creating envoy user + dirs"
getent passwd envoy >/dev/null || useradd --system --no-create-home --shell /usr/sbin/nologin envoy
mkdir -p /etc/envoy /var/lib/envoy /var/log/envoy /run/envoy
chown -R envoy:envoy /etc/envoy /var/lib/envoy /var/log/envoy /run/envoy
echo "==> Installing Envoy ${ENVOY_VERSION}"
ARCH="$(dpkg --print-architecture)"
case "$ARCH" in
amd64) ENVOY_ARCH="x86_64" ;;
arm64) ENVOY_ARCH="aarch64" ;;
*) echo "Unsupported arch: $ARCH"; exit 1 ;;
esac
TMP="$(mktemp -d)"
cd "$TMP"
curl -fsSLO "https://github.com/envoyproxy/envoy/releases/download/v${ENVOY_VERSION}/envoy-${ENVOY_VERSION}-linux-${ENVOY_ARCH}"
install -m 0755 "envoy-${ENVOY_VERSION}-linux-${ENVOY_ARCH}" /usr/local/bin/envoy
cd /
rm -rf "$TMP"
envoy --version
echo "==> Writing Envoy bootstrap"
cat > /etc/envoy/envoy.yaml <<EOF
node:
id: "${NODE_ID}"
cluster: "${NODE_CLUSTER}"
locality:
region: "local"
zone: "$(hostname)"
admin:
address:
socket_address:
address: 127.0.0.1
port_value: 9901
access_log:
- name: envoy.access_loggers.file
typed_config:
"@type": type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog
path: /var/log/envoy/admin.log
dynamic_resources:
ads_config:
api_type: GRPC
transport_api_version: V3
grpc_services:
- envoy_grpc:
cluster_name: xds_cluster
set_node_on_first_message_only: true
cds_config:
resource_api_version: V3
ads: {}
lds_config:
resource_api_version: V3
ads: {}
static_resources:
clusters:
- name: xds_cluster
type: STRICT_DNS
connect_timeout: 2s
typed_extension_protocol_options:
envoy.extensions.upstreams.http.v3.HttpProtocolOptions:
"@type": type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions
explicit_http_config:
http2_protocol_options:
connection_keepalive:
interval: 30s
timeout: 5s
load_assignment:
cluster_name: xds_cluster
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: ${XDS_HOST}
port_value: ${XDS_PORT}
- name: otel_collector
type: STRICT_DNS
connect_timeout: 2s
typed_extension_protocol_options:
envoy.extensions.upstreams.http.v3.HttpProtocolOptions:
"@type": type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions
explicit_http_config:
http2_protocol_options: {}
load_assignment:
cluster_name: otel_collector
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: ${OTEL_HOST}
port_value: ${OTEL_PORT}
tracing:
http:
name: envoy.tracers.opentelemetry
typed_config:
"@type": type.googleapis.com/envoy.config.trace.v3.OpenTelemetryConfig
grpc_service:
envoy_grpc:
cluster_name: otel_collector
timeout: 1s
service_name: "${NODE_CLUSTER}"
stats_sinks: []
EOF
chown envoy:envoy /etc/envoy/envoy.yaml
chmod 640 /etc/envoy/envoy.yaml
echo "==> Hot-restart wrapper"
cat > /usr/local/bin/envoy-hot-restart <<'HOT'
#!/usr/bin/env bash
set -euo pipefail
# Hot restart: spawn a child Envoy that adopts listener sockets from the parent.
# Increment the restart epoch in $RESTART_EPOCH_FILE and pass --restart-epoch N
# to the child. systemd's KillMode=process lets the old worker drain.
RESTART_EPOCH_FILE=/run/envoy/restart.epoch
mkdir -p "$(dirname "$RESTART_EPOCH_FILE")"
[[ -f "$RESTART_EPOCH_FILE" ]] || echo 0 > "$RESTART_EPOCH_FILE"
NEW=$(( $(cat "$RESTART_EPOCH_FILE") + 1 ))
echo "$NEW" > "$RESTART_EPOCH_FILE"
exec /usr/local/bin/envoy \
--config-path /etc/envoy/envoy.yaml \
--restart-epoch "$NEW" \
--parent-shutdown-time-s 30 \
--drain-time-s 25 \
--drain-strategy gradual \
--log-path /var/log/envoy/envoy.log
HOT
chmod 0755 /usr/local/bin/envoy-hot-restart
echo "==> systemd unit"
cat > /etc/systemd/system/envoy.service <<'UNIT'
[Unit]
Description=Envoy front-proxy
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=envoy
Group=envoy
RuntimeDirectory=envoy
LogsDirectory=envoy
ExecStart=/usr/local/bin/envoy --config-path /etc/envoy/envoy.yaml --restart-epoch 0 --log-path /var/log/envoy/envoy.log --base-id 1
ExecReload=/usr/local/bin/envoy-hot-restart
Restart=on-failure
RestartSec=2s
LimitNOFILE=1048576
KillMode=mixed
TimeoutStopSec=60
AmbientCapabilities=CAP_NET_BIND_SERVICE
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
NoNewPrivileges=true
ProtectSystem=strict
ReadWritePaths=/var/log/envoy /run/envoy /var/lib/envoy
ProtectHome=true
PrivateTmp=true
[Install]
WantedBy=multi-user.target
UNIT
systemctl daemon-reload
systemctl enable --now envoy
echo "==> Waiting for Envoy admin to come up"
for i in {1..60}; do
if curl -fs http://127.0.0.1:9901/ready >/dev/null 2>&1; then break; fi
sleep 1
done
echo "==> Installing node_exporter for Prometheus"
NEX_VERSION="1.8.2"
cd /tmp
curl -fsSLO "https://github.com/prometheus/node_exporter/releases/download/v${NEX_VERSION}/node_exporter-${NEX_VERSION}.linux-${ARCH}.tar.gz"
tar xzf "node_exporter-${NEX_VERSION}.linux-${ARCH}.tar.gz"
install -m 0755 "node_exporter-${NEX_VERSION}.linux-${ARCH}/node_exporter" /usr/local/bin/node_exporter
rm -rf "node_exporter-${NEX_VERSION}.linux-${ARCH}"*
cat > /etc/systemd/system/node_exporter.service <<'NEX'
[Unit]
Description=Prometheus node_exporter
After=network-online.target
[Service]
Type=simple
User=nobody
ExecStart=/usr/local/bin/node_exporter --web.listen-address=127.0.0.1:9100
Restart=on-failure
[Install]
WantedBy=multi-user.target
NEX
systemctl daemon-reload
systemctl enable --now node_exporter
echo
echo "========================================"
echo "DONE"
echo "========================================"
echo
echo "Listeners (data plane appears once xDS pushes the first LDS snapshot):"
ss -lntp | grep -E ':(80|443|9901|9100)\b' || true
echo
echo "Bootstrap:"
curl -s http://127.0.0.1:9901/server_info | jq '.state, .node.id, .node.cluster'
echo
echo "xDS connection:"
curl -s http://127.0.0.1:9901/stats | grep -E 'cluster.xds_cluster.upstream_cx_active|control_plane.connected_state' | head -10
echo
echo "Next: push your first listener snapshot from the control plane."
Now the xDS control plane. Save this as /root/setup-envoy-controlplane.sh and run on a separate VM:
#!/usr/bin/env bash
set -euo pipefail
### Ubuntu 22.04 xDS control-plane installer
### Runs go-control-plane example server as a systemd service.
### Production swap: replace with your own control plane (Istio Pilot in standalone mode,
### Gloo Edge, Kuma CP, or a custom go-control-plane build). The shape below is the same.
if [[ "$(id -u)" -ne 0 ]]; then
echo "Run as root."
exit 1
fi
# === EDIT ===
XDS_BIND_PORT="18000"
GO_VERSION="1.23.4"
# ============
apt-get update
apt-get -y install curl git ca-certificates build-essential
cd /usr/local
curl -fsSL "https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz" -o go.tgz
rm -rf /usr/local/go
tar -xzf go.tgz
rm go.tgz
ln -sf /usr/local/go/bin/go /usr/local/bin/go
useradd --system --create-home --home-dir /var/lib/xds --shell /usr/sbin/nologin xds || true
mkdir -p /etc/xds /var/lib/xds/snapshots
chown -R xds:xds /var/lib/xds /etc/xds
sudo -u xds -H bash <<EOSU
cd /var/lib/xds
[[ -d go-control-plane ]] || git clone --depth 1 https://github.com/envoyproxy/go-control-plane.git
cd go-control-plane
go build -o /var/lib/xds/xds-server ./internal/example
EOSU
cat > /etc/systemd/system/xds-server.service <<UNIT
[Unit]
Description=Envoy xDS control plane
After=network-online.target
[Service]
Type=simple
User=xds
Group=xds
WorkingDirectory=/var/lib/xds
ExecStart=/var/lib/xds/xds-server -debug -port ${XDS_BIND_PORT} -gateway 18001 -nodeID ""
Restart=on-failure
RestartSec=2s
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
UNIT
systemctl daemon-reload
systemctl enable --now xds-server
echo "xDS server listening on :${XDS_BIND_PORT}"
ss -lntp | grep -E ":${XDS_BIND_PORT}\b" || true
Make both scripts executable and run them in the right order:
chmod 700 /root/setup-envoy-controlplane.sh /root/setup-envoy-frontproxy.sh
# On control-plane VM:
/root/setup-envoy-controlplane.sh
# Then on each front-proxy node (edit NODE_ID / NODE_IP first):
/root/setup-envoy-frontproxy.sh
Once all three front-proxy nodes are up, push a real listener snapshot from your control plane. For the example go-control-plane server above, a sample snapshot is generated on start — replace it with your own snapshot generator that reads from your source of truth (Git, a config service, Kubernetes CRDs, etc.). The discipline that pays off later: every snapshot is versioned, every push is logged, and rollbacks are a snapshot revert — not a panicked vim.
Wire Prometheus to scrape :9901/stats/prometheus on each node, ship access logs from /var/log/envoy/ to your logging pipeline, and confirm OTel spans land in your collector. Hot restart: systemctl reload envoy will spawn a child with the next epoch, drain the old worker for 25s, and shut the parent down at 30s. Test that flow in staging before you need it in production.
When you’d rather not babysit the control plane yourself, our environment management team operates Envoy fleets, the xDS pipeline, and the alerting on top, with on-call monitoring wired into Sev-1 escalation. Plan it with us if you’d like to hand off the proxy tier.