Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

we should backoff on 40x errors #5442

Open
richvdh opened this issue Jun 12, 2019 · 2 comments
Open

we should backoff on 40x errors #5442

richvdh opened this issue Jun 12, 2019 · 2 comments
Labels
T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements. z-outbound-federation-meltdown (Deprecated Label) Synapse melting down by trying to talk to too many servers z-p2 (Deprecated Label)

Comments

@richvdh
Copy link
Member

richvdh commented Jun 12, 2019

Currently we do not increment the per-host backoff counter on 405 (method not allowed) responses. If we get a 405, it suggests a poorly-configured destination, so we should back off.

Indeed, the only 40x codes we do back off for are 401, 429, and (sometimes) 404. If our spec actually properly defined the valid error responses, we could do much better here.

@neilisfragile neilisfragile added enhancement z-p2 (Deprecated Label) labels Jun 20, 2019
@hawkowl hawkowl self-assigned this Jul 11, 2019
@hawkowl hawkowl added the z-outbound-federation-meltdown (Deprecated Label) Synapse melting down by trying to talk to too many servers label Jul 11, 2019
@richvdh richvdh changed the title we should backoff on 405s we should backoff on 40x errors Feb 10, 2021
@richvdh
Copy link
Member Author

richvdh commented Feb 10, 2021

currently the federation sender will back off sending transactions to a host which returns:

  • a 50x error
  • a 401
  • a 429
  • a 404, but only for certain endpoints

(see https://github.com/matrix-org/synapse/blob/v1.26.0/synapse/util/retryutils.py#L176-L183)

This seems... arbitrary. For example, a homeserver which has been configured with a federation whitelist will return a 403 to any homeserver not on that whitelist. Surely we should back off in that case.

@richvdh
Copy link
Member Author

richvdh commented Feb 10, 2021

related: #8915, #8917

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements. z-outbound-federation-meltdown (Deprecated Label) Synapse melting down by trying to talk to too many servers z-p2 (Deprecated Label)
Projects
None yet
Development

No branches or pull requests

4 participants