apache / apache/kyuubi

Treat HTTP status 503 as retryable error

Open
#5,343 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Scala
Stars
2.4k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)

### Search before asking

- [X] I have searched in the [issues](https://github.com/apache/kyuubi/issues?q=is%3Aissue) and found no similar issues.

### What would you like to be improved?

We deploy the Kyuubi Server behind the Nginx, and we meet the following issue several times when use the Kyuubi Rest Client to access Kyuubi RESTful API.

```
Caused by: org.apache.http.client.HttpResponseException:

503 Service Temporarily Unavailable
nginx

at org.apache.kyuubi.client.RestClient.lambda$doRequest$1(RestClient.java:162)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:223)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:165)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:140)
at org.apache.kyuubi.client.RestClient.doRequest(RestClient.java:166)
... 24 more
```

### How should we improve?

Treat HTTP status 503 as retryable error, so that we can overcome such transient issue transparently

### Are you willing to submit PR?

- [ ] Yes. I would be willing to submit a PR with guidance from the Kyuubi community to improve.
- [ ] No. I cannot submit a PR at this time.

Contributor guide

Open the contributing guide

Research direction

Start in RestClient.java at doRequest, especially the stack-trace locations around lines 162 and 166, and trace how HTTP responses become exceptions. Confirm the existing retry decision for a 503 response and identify the relevant client behavior to verify. Done means transient HTTP 503 responses are treated as retryable without changing other response handling.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.