Skip to content

feat(examples): add an Envoy service discovery proxy - #6184

Draft
TaylorMutch wants to merge 2 commits into
fix/6181-application-ingress-scale/TaylorMutchfrom
feat/6182-envoy-discovery-example/TaylorMutch
Draft

TaylorMutch wants to merge 2 commits into
fix/6181-application-ingress-scale/TaylorMutchfrom
feat/6182-envoy-discovery-example/TaylorMutch

Conversation

@TaylorMutch

@TaylorMutch TaylorMutch commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add a reference service-discovery consumer that uses Envoy for application TLS passthrough to shared supervisors. A Rust dynamic module watches the gateway's ServiceDiscovery service, resolves exact SNI hostnames, and supplies destinations to Envoy's ORIGINAL_DST/TCP proxy.

Stacked on #6183.

flowchart LR
    Client[Application client] -->|HTTPS| Envoy[Envoy: TLS inspector + discovery module + TCP proxy]
    Envoy -->|Application TLS| Supervisor[Owning supervisor app listener: TLS termination]
    Supervisor --> Service[Sandbox service]
    Gateway[OpenShell gateway: ServiceDiscovery] -. Authenticated route watch .-> Envoy
Loading

Related Issue

Closes #6182

Changes

  • Support authenticated discovery with one, several, or all workspaces through the Rust SDK.
  • Follow installation changes, owner replacement, withdrawal, authorization failures, and monotonic lease expiry. An explicit option lets the consumer retain previously accepted routes during transient discovery outages.
  • Keep application TLS keys on supervisors; provide a configurable mounted Envoy bootstrap and private readiness/admin endpoints.
  • Pin Envoy and the module SDK ABI, provide image packaging and build instructions, and include a small real-Envoy validation harness.

Testing

  • Five focused cache tests and strict example Clippy.
  • Linux module built from this branch with the documented glibc 2.35 floor and packaged into a fresh image.
  • Real Envoy validates the supplied bootstrap.
  • Fresh-image harness verifies unknown-SNI rejection, verbatim ClientHello passthrough, renewal, owner takeover/rerouting, and active withdrawal.
  • Formatting, shell syntax, and Markdown checks.
  • An integrated GKE campaign exercised this Envoy approach with 1,000 shared-supervisor sandboxes, 2,000 services, and 10,000 clients; all public identity checks passed before load.
  • Production qualification remains open: the measured run retained 5,539 failures in 1,693,011 operations (0.327%), including TLS/connection closures and DNS failures. API p95 was 570ms. Failure bursts followed supervisor control-stream token expiry; this is not a completed reliability qualification. A separate 10,000-client HPA check confirmed scale-up from two to three replicas, with a 12-second new-Pod readiness time and accepted traffic. That shorter run retained two DNS failures in 625,507 operations; it does not resolve the longer run's control-stream-expiry failures.

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Example and operating guidance included

Demonstrate authenticated ServiceDiscovery watches, exact-SNI routing to supervisors, installation lifecycle handling, and configurable consumer caching with a pinned Envoy dynamic module.

Closes #6182

Signed-off-by: Taylor Mutch <taylormutch@gmail.com>
Signed-off-by: Taylor Mutch <taylormutch@gmail.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant