gw-04 — References
The primary source (read first — it's named in the JD)
- Curbing Connection Churn in Zuul — Netflix TechBlog, 2023. The per-event-loop pool + subsetting work; the ≈8× / thousands→~60 result; the low-discrepancy (Van der Corput) distribution ring. https://netflixtechblog.com/curbing-connection-churn-in-zuul-2feb273a3598
- Arthur Gonigberg, Curbing Connection Churn (companion write-up). https://arthur.gonigberg.com/2023/10/03/curbing-connection-churn/
Subsetting & balanced distribution
- Google SRE Book / Site Reliability Engineering, "Load Balancing in
the Datacenter" — deterministic subsetting: why
N×Mdoesn't scale and how subset selection keeps balance. https://sre.google/sre-book/load-balancing-datacenter/ - Van der Corput / low-discrepancy sequences — the math behind the
balanced ring. (Any quasi-Monte-Carlo reference; the binary Van der
Corput sequence is "bit-reverse
i".) - Twitter/Finagle Aperture load balancer — another production take on
subsetting with a ring (
deterministic aperture). https://twitter.github.io/finagle/guide/Clients.html#aperture-load-balancers
Pooling & keep-alive
- Go
net/http.Transport—MaxIdleConnsPerHost,IdleConnTimeout,MaxConnsPerHost,ForceAttemptHTTP2; read the pooling logic. - Envoy connection pools (per-worker-thread pools — the same
per-event-loop idea) and
subsetload balancer docs. https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/subsets - gRPC
MAX_CONNECTION_AGE/ keepalive — the rebalancing-vs-churn tension from gw-02.
TLS handshake cost (why churn is a CPU problem)
- RFC 8446 (TLS 1.3) handshake; session resumption / 0-RTT.
- Cloudflare blog — TLS handshake cost, session resumption, and why connection reuse is a CPU optimization.
Tooling
ss -s/ss -tan state established | wc -l— live connection counts.nstat -az | grep -i active—TcpActiveOpens(outbound connections opened) — the churn counter on the gateway side.wrk/wrk2with and without--latency; toggle keep-alive to see churn (a non-keepalive client maximizes it).
Cross-lab dependencies
- Upstream: gw-01 (handshake/TIME_WAIT), gw-02 (h2 multiplexing),
gw-03 (the endpoint
Transport). - Downstream: gw-06 (LB over the subset), gw-08 (EDS membership), gw-09 (EndpointSlices, pod churn).