Skip to content

Conversation

@sanderson
Copy link
Collaborator

Closes influxdata/DAR#557

  • Updates response code descriptions for InfluxDB Cloud Dedicated and InfluxDB Clustered
  • Removes Retry-After headers from InfluxDB Cloud Dedicated and InfluxDB Clustered API responses
  • Adds information and examples about implementing an exponential backoff strategy

  • Rebased/mergeable

Copilot finished reviewing on behalf of sanderson November 27, 2025 00:39
Copy link
Contributor

Copilot AI left a 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-After header 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

<!--pytest.mark.skip-->
```sh
base=1
max_delay=30
Copy link
Contributor

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}')
Copy link
Contributor

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).
Copy link
Contributor

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)?

Copy link
Contributor

Copilot AI commented Nov 27, 2025

@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.

sanderson and others added 2 commits November 27, 2025 08:11
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants