kunwp1 opened a new issue, #9352:
URL: https://github.com/apache/texera/issues/9352
Related to #9351, which fixes the same 15s cut on `texera-rustfs-route`.
### What happened?
The static HTTPRoute rule in
`bin/k8s/templates/base/gateway/gateway-routes.yaml` that sends `/api/dataset`,
`/api/access/dataset`, `/api/model` and `/api/access/model` to
`file-service-svc:9092` has no `timeouts` block. Envoy Gateway then leaves the
route timeout unset, so Envoy applies its 15s default, which runs until the
upstream response is complete, body included.
The dashboard downloads a whole dataset or model version through `GET
/api/dataset/{did}/versionZip` and `GET /api/model/{mid}/versionZip`.
file-service builds that zip while it streams it
(`ResourceUploadService.versionZipResponse`), so any version whose zip takes
longer than 15s to build and send is cut off mid-body, after the 200 and the
headers have already gone out.
Expected: version zips download in full, however long they take.
### How to reproduce?
1. On a deployment behind the gateway, pick a dataset version whose zip
takes more than 15s to stream, for example one with a multi-GB file.
2. Download it through the gateway:
```
curl -s -o /dev/null -H "Authorization: Bearer <token>" -w
"http=%{http_code} bytes=%{size_download} secs=%{time_total}\n"
"https://<host>/api/dataset/<did>/versionZip?latest=true"
```
3. The transfer stops at about 15s with curl exit 18 (partial transfer).
We reproduced it locally with the real file-service behind Envoy 1.36.4, the
Envoy that Envoy Gateway 1.6.3 deploys, configured with the route Envoy Gateway
generates for this rule. To stand in for a large version, file-service's
response was throttled to 100 KiB/s. The 3,913,563-byte zip was cut at 16.0s
after 813,383 bytes, and Envoy counted one `upstream_rq_timeout`. With a rule
that sets `timeouts.request: "0s"` on the versionZip paths, all 3,913,563 bytes
arrived in 46s.
### Version/Branch
1.4.0-incubating-SNAPSHOT (main)
### Commit Hash (Optional)
bb6136d
### Relevant log output
```
before http=200 bytes=813383 secs=16.013110 curl_exit=18
after http=200 bytes=3913563 secs=46.195134 curl_exit=0
cluster.slow_file_service.upstream_rq_timeout: 1
```
--
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]