Skip to content

gateway: range requests issue with big >5GiB files #856

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

Closed
3 tasks
lidel opened this issue Feb 22, 2025 · 2 comments
Closed
3 tasks

gateway: range requests issue with big >5GiB files #856

lidel opened this issue Feb 22, 2025 · 2 comments
Assignees
Labels
need/analysis Needs further analysis before proceeding P1 High: Likely tackled by core team if no one steps up status/blocked Unable to be worked further until needs are met

Comments

@lidel
Copy link
Member

lidel commented Feb 22, 2025

Many CDNs (incl. Cloudflare) won't support range requests of big files (>1-4GiB) if origin HTTP server does not return explicit support for range requests indicated by Accept-Ranges: bytes in GET responses.

This should apply to deserialized, deterministic response types.

TODO

@lidel lidel added kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization P0 Critical: Tackled by core team ASAP labels Feb 22, 2025
@lidel lidel mentioned this issue Feb 22, 2025
56 tasks
@lidel lidel added P1 High: Likely tackled by core team if no one steps up and removed P0 Critical: Tackled by core team ASAP labels Feb 22, 2025
@lidel lidel self-assigned this Feb 22, 2025
@lidel
Copy link
Member Author

lidel commented Feb 24, 2025

Seems that something else is at play. I've checked multiple times and both GET and HEAD for 20GiB file include accept-ranges: bytes in response already.

Pausing until we get some clarifications from Cloudflare.

@lidel lidel added need/analysis Needs further analysis before proceeding status/blocked Unable to be worked further until needs are met and removed kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization labels Feb 24, 2025
@lidel lidel mentioned this issue Mar 20, 2025
40 tasks
@lidel
Copy link
Member Author

lidel commented Apr 8, 2025

Closing as the bug turned out to be on the Cloudflare side.

Cloudflare, by default only supports caching of range requests for files <=5GiB.
Range requests for bigger files are ignored and full file is returned as HTTP 200 instead.

Enterprise clients are able to opt-in into increased "cache keys + origin range requests" feature, which at the time of me writing it, is NOT documented anywhere.

So if anyone is reading this in future:

  • If you are Cloudflare client, reach out to their support, and reference this issue
  • If you write HTTP Client, make sure to check response code before processing response body

@lidel lidel closed this as completed Apr 8, 2025
@lidel lidel changed the title gateway: add accept-ranges response header gateway: range requests issue with big >5GiB files Apr 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/analysis Needs further analysis before proceeding P1 High: Likely tackled by core team if no one steps up status/blocked Unable to be worked further until needs are met
Projects
None yet
Development

No branches or pull requests

1 participant