fix: gRPC appProtocol and EVM WebSocket routing#71
Merged
Conversation
Two networking fixes from expert validation: 1. gRPC: set appProtocol "kubernetes.io/h2c" on the gRPC ServicePort so Envoy uses HTTP/2 to the backend. Without this, Envoy defaults to HTTP/1.1 and gRPC requests fail. 2. EVM WebSocket: add a second rule to the EVM HTTPRoute with a header match for "Upgrade: websocket" routing to port 8546. seid serves JSON-RPC on 8545 and WebSocket on 8546 as separate ports. The first rule (default) routes HTTP to 8545, the second routes WebSocket upgrades to 8546. Both share the same hostname, matching the industry standard (Alchemy, Infura use one URL for HTTP + WS). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Set appProtocol "kubernetes.io/h2c" on the gRPC port in the headless per-node Service (servicePorts), matching what's already set on the shared external Service. Ensures Istio/Envoy uses HTTP/2 for gRPC when routing directly to individual pods. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2 tasks
Add tests for: - Empty domain produces malformed hostnames (documents the invariant that platform.Validate() catches at startup) - Validator mode produces zero routes - Non-EVM routes have exactly one rule and zero WSPort Remove breadcrumb comment in BackendRef test. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two networking fixes from expert validation of the listener-based routing model.
1. gRPC appProtocol
Without
appProtocol: kubernetes.io/h2con the gRPC ServicePort, Envoy defaults to HTTP/1.1 when proxying to the backend — breaking all gRPC requests. This sets the standard Kubernetes signal for HTTP/2 cleartext backends.2. EVM WebSocket routing
seid serves JSON-RPC on port 8545 and WebSocket on port 8546 as separate listeners. The EVM HTTPRoute now has two rules:
Upgrade: websocket→ port 8546 (WebSocket)Both share the same hostname (
pacific-1.evm.prod.platform.sei.io), so clients usehttps://for JSON-RPC andwss://for subscriptions on the same URL — matching the industry standard.Test plan
make testpassesmake lintpasses (0 issues)appProtocol: kubernetes.io/h2c🤖 Generated with Claude Code