Revolyssup commented on code in PR #1876:
URL: 
https://github.com/apache/apisix-ingress-controller/pull/1876#discussion_r1419984238


##########
docs/en/latest/concepts/annotations.md:
##########
@@ -413,3 +413,63 @@ spec:
                 port:
                   number: 80
 ```
+
+## Upstream retries
+
+This annotation can be used to configure retries among multiple nodes in an 
upstream. You may want the proxy to retry when requests occur faults like 
transient network errors or service unavailable, by default the retry count is 
1. You can change it by specifying the retries field.
+
+The following configuration configures the retries to 3, which indicates 
there'll be at most 3 requests sent to Kubernetes service httpbin's endpoints.
+
+One should bear in mind that passing a request to the next endpoint is only 
possible if nothing has been sent to a client yet. That is, if an error or 
timeout occurs in the middle of the transferring of a response, fixing this is 
impossible.
+
+```yaml
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+metadata:
+  annotations:
+    k8s.apisix.apache.org/upstream.retries: "2"
+  name: ingress-ext-v1beta1
+spec:
+  ingressClassName: apisix
+  rules:
+    - host: httpbin.org
+      http:
+        paths:
+          - path: /ip
+            pathType: Exact
+            backend:
+              service:
+                name: httpbin
+                port:
+                  number: 80
+```
+
+## Upstream timeout
+
+This annotation can be used to configure different types of timeout on an 
upstream. The default connect, read and send timeout are 60s, which might not 
be proper for some applications, just change them in the timeout field.
+
+The below example sets the connect, read and timeout to 5s, 10s, 10s 
respectively.

Review Comment:
   fixed



##########
docs/en/latest/concepts/annotations.md:
##########
@@ -413,3 +413,63 @@ spec:
                 port:
                   number: 80
 ```
+
+## Upstream retries
+
+This annotation can be used to configure retries among multiple nodes in an 
upstream. You may want the proxy to retry when requests occur faults like 
transient network errors or service unavailable, by default the retry count is 
1. You can change it by specifying the retries field.

Review Comment:
   fixed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to