You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(envoy_tcp_routing): improve README with destination info and future enhancements
- Fix grammar: "In separate terminals" → "In a separate terminal"
- Add consistency: "routes to" → "routes via" in output examples
- Add "Note on Destination Information" section explaining:
- Hardcoded httpbin.org endpoints in both clusters
- PROXY protocol for preserving metadata across TCP hops
- Implementation approach using WASM stream context + Envoy config
- Document future enhancement for source-based egress router use case:
- Routing via different external IPs (e.g., even vs. odd source IP)
- Explain conventional network approach (routing tables + IP rules)
- Note challenges in managed K8s (requires plugins like Multus CNI)
- Clarify how K8s abstracts layer 3 routing configuration
The `Ok(None)` status confirms that the filter state was successfully set, and you can see in the access logs that traffic is being routed to the correct clusters (`egress-router1` for even IPs, `egress-router2` for odd IPs).
82
+
83
+
### Note on Destination Information
84
+
85
+
In this example, both Envoy clusters (`egress-router1` and `egress-router2`) have `httpbin.org` hardcoded as their load balancer endpoints.
86
+
87
+
In real world scenarios where destination information needs to be preserved across TCP hops, the [PROXY protocol](https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt) could be used to forward metadata like the original source and destination addresses between proxies. This could be implemented using advanced WASM stream context capabilities combined with Envoy's PROXY protocol configuration.
88
+
89
+
**Future Enhancement:** With Istio (Envoy-based) in a Kubernetes setup and PROXY protocol support, this example could be extended to serve as a source-based egress router. One practical use case would be routing user's web traffic via different external IP addresses based on source-based routing decisions (e.g., even vs. odd source IP like in the example). In conventional networks, this would be achieved with routing tables and IP rules to select egress interfaces based on source addresses. However, this approach is close to impossible with managed Kubernetes services (without additional network plugins like [Multus CNI](https://github.com/k8snetworkplumbingwg/multus-cni), as Kubernetes largely abstracts away the network layer where such layer 3 routing (different outgoing IPs) would normally be configured.
0 commit comments