Repository navigation
Refuse PUT provide requests at route-origin - #27
Merged
Merged
Conversation
needle does not support provide, so these always ended in a 500 that read as a server fault in the 5xx alerts. Co-Authored-By: Claude Opus 5.5 <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.
Related to ipni/infra#247, which changes the 5xx alert thresholds. This can merge and deploy independently of it.
Why
needle can never succeed at
PUT /routing/v1/providers/:ProvideBitswapalways returnsrouting.ErrNotSupported, and boxo's server answers that with a 500. Envoy's/routing/v1/route passes these requests through, so they count as server errors in bothRouteOrigin5xxandNeedleServerErrors.Measured on 2026-11-02, over one hour:
Every request on that route in that hour was a
PUTanswered with 500. sing-1 has little traffic, so a small stream of these was enough to warn:needle-c on sing1 answers 6.742% of requests with 5xx. Lookup probes were passing at the time.Without this route, 5xx across the other needle routes was about 0.3% on sing-1 and 0.03% or less on the other two.
Change
k8s/route-origin/envoy.yaml.j2: a route above the others answersPUTon the/routing/v1/providersprefix with a 405, without reaching needle.RouteOrigin5xx.provide-refuseddecorator is a new span name, in line with the file's other routes.lookupsrate limit bucket.Checked
scripts/render-manifests.ymlrenders the template. The rendered config passes--mode validateon the pinned Envoy image (distroless-v1.39.1), and I ran that image locally with a self-signed certificate and no needle behind it:PUT /routing/v1/providers/, also without the slash and with a CIDGET /routing/v1/providers/<cid>,GET /routing/v1/peers/xPUT /routing/v1/ipns/x,GET /routing/v1/ipns/x,GET /versionGET /debug/metrics/prometheusNot checked: real traffic through Cloudflare.
After merging
This doesn't deploy by itself.
routing.ymlisn't applied from CI, so someone needs to run it. The ConfigMap hash rolls the Envoy pod on each box:Then
RouteOrigin5xxandNeedleServerErrorsshould drop on every box, with sing-1 well under its thresholds.🤖 Generated with Claude Code