Skip to content

Commit 4041c17

Browse files
authored
Add Documentation for Replication Using a Load Balancer (#2375)
* Add Documentation for Replication Using a Load Balancer
1 parent 258fcd8 commit 4041c17

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

Diff for: docs/nginx-ingress.md

+58
Original file line numberDiff line numberDiff line change
@@ -131,3 +131,61 @@ spec:
131131
port:
132132
number: 9443
133133
```
134+
135+
### Replication configuration:
136+
137+
Ingress by default may time out connections before an operation completes.
138+
This is common with slower setups (network/drives) or poor operational practices (many objects in one prefix, flat organization).
139+
You can set a timeout value that is above what your cluster requires on average to complete an operation to address the above issue.
140+
Place the following nginx annotations in the ingress configuration under `metadata.anotations`:
141+
142+
* `nginx.ingress.kubernetes.io/proxy-read-timeout`: Controls how long the NGINX load balancer waits for a response from the backend.
143+
144+
* `nginx.ingress.kubernetes.io/proxy-send-timeout`: Controls how long the NGINX load balancer waits to send a request to the backend.
145+
146+
Here is the updated ingress configuration:
147+
148+
```yaml
149+
apiVersion: networking.k8s.io/v1
150+
kind: Ingress
151+
metadata:
152+
name: ingress-minio
153+
namespace: tenant1-ns
154+
annotations:
155+
kubernetes.io/ingress.class: "nginx"
156+
## Remove if using CA signed certificate
157+
nginx.ingress.kubernetes.io/proxy-ssl-verify: "off"
158+
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
159+
nginx.ingress.kubernetes.io/rewrite-target: /
160+
nginx.ingress.kubernetes.io/proxy-body-size: "0"
161+
nginx.ingress.kubernetes.io/server-snippet: |
162+
client_max_body_size 0;
163+
nginx.ingress.kubernetes.io/configuration-snippet: |
164+
chunked_transfer_encoding off;
165+
nginx.ingress.kubernetes.io/proxy-read-timeout: "60s"
166+
nginx.ingress.kubernetes.io/proxy-send-timeout: "60s"
167+
spec:
168+
tls:
169+
- hosts:
170+
- minio.example.com
171+
secretName: nginx-tls
172+
rules:
173+
- host: minio.example.com
174+
http:
175+
paths:
176+
- path: /
177+
pathType: Prefix
178+
backend:
179+
service:
180+
name: minio
181+
port:
182+
number: 443
183+
```
184+
185+
> Explanation:
186+
187+
* `proxy-read-timeout`: Ensures that NGINX waits for 60 seconds for a response from the MinIO backend before timing out.
188+
189+
* `proxy-send-timeout`: Ensures that NGINX waits for 60 seconds for data to be sent to the MinIO backend before timing out.
190+
191+
Apply the updated configuration using `kubectl apply -f <file_name>.yaml`. This will set the desired timeouts for read and write operations.

0 commit comments

Comments
 (0)