l4echo

command
v0.0.0-...-bb1d162 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Command l4echo is the test backend for the L4 (Gateway API TCPRoute / TLSRoute / UDPRoute) e2e harness, e2e/l4routes.sh.

Every mode answers with the same marker text, so the harness can tell which workload served a probe purely from the payload it read back. That payload marker is the primary assertion vehicle: it needs no Envoy admin access, it survives a proxy hot restart (raw counters do not), and it distinguishes "the weighted split picked backend B" from "the connection failed" without interpreting an exit code.

Modes (the harness deploys one process per workload):

--mode=tcp  (:9000)  read one line, write "<text> <line>\n", CLOSE.
--mode=tls  (:9443)  HTTPS with a self-signed cert minted at start-up;
                     every request answers "<text>\n".
--mode=udp  (:9001)  reply "<text> <datagram>" to the sender.

All three modes are exercised: --mode=tcp by the TCPRoute leg, --mode=tls by the TLSRoute leg (which needs the PARENT to speak TLS too, so that an unmatched SNI falling through to the floor can be asserted positively rather than as an absence), and --mode=udp by the UDPRoute leg.

Closing after the echo is deliberate and is the whole reason this is not istio/tcp-echo-server: that image holds the connection open, so a probe can only be scored from the captured payload after a full client timeout. Every probe here costs one round trip.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL