Repository navigation
head-lag: Base and Robinhood on Codex's iad edge node - #3234
Open
mikerowe23 wants to merge 2 commits into
Open
mikerowe23 wants to merge 2 commits into
mikerowe23 wants to merge 2 commits into
Conversation
Base subscribes on wss://iad.edge.codex.io/graphql from every region, on
its own socket. Solana stays on fra.edge and BNB and Robinhood on
graph.codex.io, so each probe now holds three Codex sockets, all feeding
the one ws_connected{aggregator="codex"} series. CODEX_BASE_WS_URL
overrides the Base endpoint; setting it to graph.codex.io rolls back.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Robinhood subscribes on wss://iad.edge.codex.io/graphql on a socket of its own (not Base's: an edge error or a silent pool ends the whole socket), at the Processed commitment level. On the default level iad trailed graph.codex.io by ~60 ms on every trade (2026-10-27, 34 trades); at Processed it led by ~60 ms (p50). graph.codex.io serves no Processed stage on Robinhood, so the level follows the endpoint: CODEX_ROBINHOOD_WS_URL=wss://graph.codex.io/graphql rolls back both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mikerowe23
force-pushed
the
feat/codex-base-iad-edge
branch
from
October 27, 2026 17:35
af2b0a8 to
239c412
Compare
This branch has not been deployed
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.
I'm on the Codex team. This moves two of the bench's Codex subscriptions to our new edge node,
iad.edge.codex.io: Base, and Robinhood Chain at the Processed commitment level. Solana stays onfra.edge.codex.ioand BNB ongraph.codex.io. The change is in two commits, so you can take Base without Robinhood.Changes
wss://iad.edge.codex.io/graphqlfrom every region, at Processed as before.CODEX_BASE_WS_URLoverrides the endpoint; setting it towss://graph.codex.io/graphqlrolls Base back without a code change.wss://iad.edge.codex.io/graphqlat Processed instead of the default level. At the default leveliadis no faster thangraph.codex.io(about 50 ms slower from Singapore), so the gain comes from the Processed stage.graph.codex.iodoesn't serve that stage on Robinhood: it accepts the subscription and delivers nothing. So the level follows the endpoint, andCODEX_ROBINHOOD_WS_URL=wss://graph.codex.io/graphqlrolls back both.graph.codex.io). Base and Robinhood share the node but not a socket. Since head-lag: a full race book no longer eats pool trades; Codex edge errors end the subscription #3256 an edge error ends the whole socket, and a silent pool trips the flow watchdog for everything on it, so a Robinhood problem can't disconnect Base. All four feed the existingws_connected{aggregator="codex"}series, which reads 1 only while every socket is up. The spec queries are unchanged.codexSocketPlansplits the chains across sockets andcodexProcessedpicks each chain's level; both are tested. The socket log tags are[solana],[base],[robinhood]and[graph](previously[edge]and[graph]).graph.codex.io. It's two lines to stay under the 500-character limit.Verified
Base (2026-10-22). I ran a probe in each of the bench's probe regions on Railway (us-east4, europe-west4, asia-southeast1) for about 15 minutes. Each one subscribed the bench's Base pool at Processed on both
iad.edge.codex.ioandgraph.codex.ioand compared arrival times trade by trade.iad.edgefirstiad.edgelead p10 / p50 / p90Both sockets stayed connected for the whole run in every region. In each region one trade reached
graph.codex.iobut notiad.edge.codex.iowithin the 15 s matching window.Robinhood (2026-10-27). I ran probes in the same three regions for about 10 minutes, each subscribing the bench's Robinhood pool on three setups at once: today's (
graph.codex.io, default level), this PR's (iad.edge.codex.io, Processed) andiad.edge.codex.ioat the default level.How far this PR's setup was ahead of today's, trade by trade:
The bench's own figure (arrival minus block timestamp), mean over the same trades:
iad.edge.codex.ioat the default level ran 1–4 ms behindgraph.codex.ioin us-east and eu-west, and a steady 51 ms behind in sgp. Every subscription stayed connected in every region, with no errors.Harness and tests. The branch ran locally with the Codex key: all four Codex sockets connected on the first attempt, every chain delivered, and
ws_connected{aggregator="codex"}read 1.go test ./cmd/script(with-raceon the Codex tests),pnpm validateandbun test src/pass.Deploy notes
CODEX_API_KEY. Redeploy the three head-lag services (us-east, eu-west, sgp).dev(a705fe05) since opening the PR.🤖 Generated with Claude Code