Skip to content

SDK rpc proxy: an RPCERROR relay should not trip the breaker #1628

Description

@feruzm

Seen in the first production hour of the server-side RPC proxy (#1614, #1625): a large share of the proxy's non-200 answers are hivemind application errors passed through as 502 with X-Ssr-Cache: RPCERROR, e.g. Tag <x> does not exist for crawler-made feed URLs (5 of 30 real feed URLs replayed on one origin). callRPC counts every non-200 as a proxy miss, so three such reads in a row open the breaker for 10s and every eligible read in that window skips a healthy proxy (thousands of skipped per replica per hour).

Proposal: a 502 carrying X-Ssr-Cache: RPCERROR is the proxy working as intended (it reached a node and relayed the node's answer), so it should not count toward the breaker. The read still falls back to the node loop as today, which reproduces the same error for the caller. A 504 (budget exceeded) and transport failures keep counting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions