Skip to content

Conversation

@justinyeh1995
Copy link
Contributor

@justinyeh1995 justinyeh1995 commented Oct 26, 2025

Why are these changes needed?

This PR addresses the need for documentation related to the new automatic retry feature introduced to the APIServer SDK V2 client in PRs #3551 and #3946. Currently, there is no guide for users on how to configure this essential retry functionality.

Related issue number

Closes #3883

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • This PR is not tested :(

@justinyeh1995 justinyeh1995 changed the title [Docs] Add the document about retryfeature intro, configurations,… [Docs] Add the documentation about retry features, configurations, and usecases Oct 26, 2025
@justinyeh1995 justinyeh1995 changed the title [Docs] Add the documentation about retry features, configurations, and usecases [Docs] Add user guide for APIServer SDK client retry configuration Oct 26, 2025
@justinyeh1995 justinyeh1995 changed the title [Docs] Add user guide for APIServer SDK client retry configuration [apiserversdk][Docs] Add user guide for APIServer SDK client retry configuration Oct 27, 2025
@justinyeh1995 justinyeh1995 changed the title [apiserversdk][Docs] Add user guide for APIServer SDK client retry configuration [APIServer][Docs] Add user guide for APIServer SDK client retry configuration Oct 30, 2025
@justinyeh1995 justinyeh1995 changed the title [APIServer][Docs] Add user guide for APIServer SDK client retry configuration [APIServer][Docs] Add user guide for retry behavior & configuration Oct 30, 2025
@justinyeh1995 justinyeh1995 marked this pull request as ready for review November 12, 2025 14:19
@justinyeh1995
Copy link
Contributor Author

cc @machichima @dentiny - Would appreciate your reviews. Thank you!

@machichima
Copy link
Collaborator

cc @CheyuWu
also cc @kenchung285 as you implemented retry in apiserversdk

Comment on lines +45 to +53
```go
const (
HTTPClientDefaultMaxRetry = 5 // Increase retries from 3 to 5
HTTPClientDefaultBackoffFactor = float64(2)
HTTPClientDefaultInitBackoff = 2 * time.Second // Longer backoff makes timing visible
HTTPClientDefaultMaxBackoff = 20 * time.Second
HTTPClientDefaultOverallTimeout = 120 * time.Second // Longer timeout to allow more retries
)
```
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like currently we do not have a way to configure it without modifying the code. I am thinking in this case we can omit the configuration part and just write about the default behavior?

cc @Future-Outlier @rueian for some advice on this

- **MaxBackoff**: 10s (maximum wait time between retries)
- **OverallTimeout**: 30s (total timeout for all attempts)

which means $$Backoff_i = \min(InitBackoff \times BackoffFactor^i, MaxBackoff)$$
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
which means $$Backoff_i = \min(InitBackoff \times BackoffFactor^i, MaxBackoff)$$
which means $$\text{Backoff}_i = \min(\text{InitBackoff} \times \text{BackoffFactor}^i, \text{MaxBackoff})$$

For better format, preview: $$\text{Backoff}_i = \min(\text{InitBackoff} \times \text{BackoffFactor}^i, \text{MaxBackoff})$$

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.

[Doc] Add APIServer retry to doc

2 participants