Skip to content

proxy: a request the destination had already begun sending to the application is retried on another endpoint, whatever its method #1641

Closed

Description

@bpalermo

outboundRetryPolicy() (agent/internal/xds/proxy/route.go) retries on retriable-status-codes: [503] with no method condition. When the destination proxy has already started sending a request to the application and the upstream connection is then terminated, it answers 503 with flag UC; the source proxy retries that on another endpoint, whatever the method.

Measured (access logs of an 8 h soak, joined by request id): 3 rows with us_tx_beg_ms set (the request had begun to be sent to the application) and 503 UC connection_termination at the destination were answered 200 from a different pod at the source. Those were GETs; nothing in the policy would treat a POST differently.

Consequence: a non-idempotent request can be executed twice when an application closes the connection or dies after receiving it. docs/workload-requirements.md ("What the mesh retries for you") and the code comment say every retried failure happens before a request reaches an application; that holds for UF (connect failure) and not for a destination-synthesized 503 UC.

A fix needs a choice: for example the inbound side marking a response "not sent upstream" so the source retries only those, or restricting the 503 retry to idempotent methods. Until then the documentation should say what is true.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugproxy

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions