Post ATTqkuuDdEmHlOTSu8 by e_nomem@hachyderm.io
 (DIR) More posts by e_nomem@hachyderm.io
 (DIR) Post #ATTq1SVINoR2e38lou by misty@digipres.club
       2023-03-10T18:03:07Z
       
       0 likes, 0 repeats
       
       Fellow masto admins: I'm having trouble with my Nginx config where it doesn't seem to be respecting range requests when doing a proxy cache in front of an S3-style bucket. Anything you've got configured in your Nginx to ensure that works?
       
 (DIR) Post #ATTqkuuDdEmHlOTSu8 by e_nomem@hachyderm.io
       2023-03-10T18:11:23Z
       
       0 likes, 0 repeats
       
       @misty Not respecting in what sense? When Nginx gets a range request and has a cache miss, it will pull the entire file from the origin and serve the client when it has sufficient data (and it continues pulling the original file in full in the background)
       
 (DIR) Post #ATTqoy7hbxhettiHGi by codl@chitter.xyz
       2023-03-10T18:12:08Z
       
       0 likes, 0 repeats
       
       @misty not respecting range requests how? by default nginx will fetch the entire file first and then serve the requested range, is that what you mean? if so, the slice module is your friend https://nginx.org/en/docs/http/ngx_http_slice_module.html
       
 (DIR) Post #ATTrGDtz3QtjekIBW4 by edolnx@mastodon.social
       2023-03-10T18:17:03Z
       
       0 likes, 0 repeats
       
       @misty most S3 compatible object stores don't honor range requests for performance reasons. This is one of the benefits most CDN provide to object storage. Enabling caching in your nginx config may help with this.
       
 (DIR) Post #ATTrY8Y5hCWSGZat8a by misty@digipres.club
       2023-03-10T18:20:16Z
       
       0 likes, 0 repeats
       
       @edolnx My Nginx config *is* caching! It just doesn’t seem to be providing range support.
       
 (DIR) Post #ATTsl6o5aF50aApINU by edolnx@mastodon.social
       2023-03-10T18:32:59Z
       
       0 likes, 0 repeats
       
       @misty bummer, sorry that wasn't helpful then. It sounds like nginx may be using sendfile which doesn't allow ranges
       
 (DIR) Post #ATTsxqd52hg6Anketk by anj@digipres.club
       2023-03-10T18:36:06Z
       
       0 likes, 0 repeats
       
       @misty is it possible the NGINX config is using HTTP 1.0 instead of 1.1 for some reason? Ranges need 1.1.
       
 (DIR) Post #ATU0mU1nX5qqWZPAUi by misty@digipres.club
       2023-03-10T20:03:40Z
       
       0 likes, 0 repeats
       
       @anj Looks like it's responding that it's 1.1, but like you noted earlier, the server doesn't advertise range support.