-
Notifications
You must be signed in to change notification settings - Fork 321
fix: updates write reponses, suggests exponential backoffs #6574
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR updates write response documentation for InfluxDB Cloud Dedicated and InfluxDB Clustered by removing references to Retry-After headers (which are no longer sent by these products) and adding comprehensive guidance on implementing exponential backoff strategies for handling 429 and 503 errors.
Key changes:
- Removes
Retry-Afterheader specifications from API response definitions for 429 and 503 status codes - Updates error descriptions to clarify when 429 and 503 errors occur (resource constraints, concurrent request limits, insufficient healthy ingesters)
- Adds new documentation section with exponential backoff implementation examples in cURL, Python, and JavaScript
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| content/shared/influxdb3-write-guides/troubleshoot-distributed.md | Adds exponential backoff strategy section with code examples and best practices; updates 503 error description to reference new backoff guidance |
| api-docs/influxdb3/clustered/v2/ref.yml | Removes Retry-After headers from 429/503 responses; updates error descriptions for write and query endpoints |
| api-docs/influxdb3/clustered/v1-compatibility/swaggerV1Compat.yml | Removes Retry-After headers from 429 responses for write and query endpoints; updates error descriptions |
| api-docs/influxdb3/cloud-dedicated/v2/ref.yml | Removes Retry-After headers from 429/503 responses; updates error descriptions to clarify resource constraints |
| api-docs/influxdb3/cloud-dedicated/v1-compatibility/swaggerV1Compat.yml | Removes Retry-After headers from 429 responses; updates error descriptions for write and query endpoints |
content/shared/influxdb3-write-guides/troubleshoot-distributed.md
Outdated
Show resolved
Hide resolved
content/shared/influxdb3-write-guides/troubleshoot-distributed.md
Outdated
Show resolved
Hide resolved
content/shared/influxdb3-write-guides/troubleshoot-distributed.md
Outdated
Show resolved
Hide resolved
content/shared/influxdb3-write-guides/troubleshoot-distributed.md
Outdated
Show resolved
Hide resolved
content/shared/influxdb3-write-guides/troubleshoot-distributed.md
Outdated
Show resolved
Hide resolved
| <!--pytest.mark.skip--> | ||
| ```sh | ||
| base=1 | ||
| max_delay=30 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is $max-delay used?
|
|
||
| # compute exponential delay and apply full jitter | ||
| delay=$(awk -v b=$base -v a=$attempt 'BEGIN{d=b*(2^a); if(d>30) d=30; print d}') | ||
| sleep_seconds=$(awk -v d=$delay 'BEGIN{srand(); printf "%.3f", rand()*d}') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot Should $maxDelay be used here?
| ### Incremental backoff best practices | ||
|
|
||
| - Only retry on idempotent or safe request semantics your client supports. | ||
| - Retry only for `429` (Too Many Requests) and `503` (Service Unavailable). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we include "Too Many Requests" in the spec (as Copilot recommended)?
|
@jstirnaman I've opened a new pull request, #6575, to work on those changes. Once the pull request is ready, I'll request review from you. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
#6575) * Initial plan * Fix: use $max_delay variable instead of hardcoded 30 in cURL example Co-authored-by: jstirnaman <212227+jstirnaman@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jstirnaman <212227+jstirnaman@users.noreply.github.com>
Closes influxdata/DAR#557
Retry-Afterheaders from InfluxDB Cloud Dedicated and InfluxDB Clustered API responses