(可选)您可以将此重试策略用于返回错误代码 404 的 IAM API 请求。IAM 读取最终一致;因此,资源在创建后可能不会立即显示,而这可能会导致 404 错误。
此外,针对返回错误代码 409 和状态 ABORTED 的所有 IAM API 请求,请使用此重试策略的修改版本。此类错误表示出现并发问题;例如,您可能尝试更新另一个客户端已覆盖的允许政策。对于此类错误,您应该始终使用引入了抖动的截断指数退避算法来重试请求的整个读取-修改-写入系列。如果仅重试写入操作,则请求将继续失败。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-03-26。"],[[["This document outlines best practices for retrying failed requests to the Identity and Access Management (IAM) API, recommending the use of truncated exponential backoff with jitter for safe-to-retry requests."],["Using truncated exponential backoff with jitter helps prevent overwhelming the IAM API with a large number of retries, which can lead to exceeding project quotas and limits."],["The retry algorithm involves exponentially increasing wait times between retries, with the addition of a random delay (jitter) to avoid synchronized retries from multiple clients, and a cap on the wait time, followed by a final deadline."],["The recommended retry strategy should be used for IAM API requests that return `500`, `502`, `503`, or `504` error codes, and optionally `404` errors due to eventual consistency, and a modified version should be used for `409` `ABORTED` errors."],["For `409` errors, which typically signify concurrency issues, you should retry the entire read-modify-write series of requests, as retrying only the write operation will not resolve the issue."]]],[]]