-
Notifications
You must be signed in to change notification settings - Fork 338
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
feat: allow configuring timeout and retries for upstream with ingress #1876
Conversation
… annotations Signed-off-by: revolyssup <ashishjaitiwari15112000@gmail.com>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #1876 +/- ##
=======================================
Coverage 37.12% 37.13%
=======================================
Files 93 93
Lines 7886 7938 +52
=======================================
+ Hits 2928 2948 +20
- Misses 4568 4598 +30
- Partials 390 392 +2 ☔ View full report in Codecov by Sentry. |
|
Signed-off-by: revolyssup <ashishjaitiwari15112000@gmail.com>
maybe e2e-test is needed @tao12345666333 wdyt |
yes, we need an e2e test case to cover this one. |
Signed-off-by: revolyssup <ashishjaitiwari15112000@gmail.com>
Signed-off-by: revolyssup <ashishjaitiwari15112000@gmail.com>
Signed-off-by: revolyssup <ashishjaitiwari15112000@gmail.com>
Signed-off-by: revolyssup <ashishjaitiwari15112000@gmail.com>
@tao12345666333 How do you suggest I simulate backend for testing retries and timeouts? For retries, I configured an http server on port 8080 that responds with 200 on 3rd attempt(400 previously) and the I set the retry to 3, but tests seem to fail. Do you have a better approach? Or is there some issue with my approach? |
Using the serverless plugin of APISIX, it will be easier to simulate with Lua. |
Signed-off-by: Ashish Tiwari <ashishjaitiwari15112000@gmail.com>
Please provide documentation for this feature. |
metadata: | ||
annotations: | ||
k8s.apisix.apache.org/retry: "1" | ||
k8s.apisix.apache.org/timeout.read: "20s" |
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.
What timeout? The timeout here has many layers of meaning, should it be a client or a service?
You should clarify the target or object of the timeout.
Retrying is also the same.
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.
How about, upstream.retries
and upstream.timeout.read
? @AlinsRan
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.
I suggest using - as the separator for annotations name, which is the format we are currently using. Please maintain consistency.
upstream-retries
upstream-read-timeout
.
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.
some suggestions for docs
Type of change:
Fixes #1783
Documentation to be updated.
What this PR does / why we need it:
Pre-submission checklist: