Range headers being stripped out

Awesome! I’m not really near a computer today, are you able to check if the page in the OP loads the video and audio file?

This one: https://f2j4a-eiaaa-aaaam-ab7nq-cai.raw.icp0.io/

I tried it and in both cases, I only get audio. I see that video.ogv is requested, but only audio is being played.

1 Like

Hey, I just checked this by editing my /etc/hosts file and going to https://f2j4a-eiaaa-aaaam-ab7nq-cai.raw.icp0.io/ and both the video and audio file are working just fine!

I would be curious to know why the video isn’t loading for you…

So the ranges being returned a larger than my Express Azle server allows…are the boundary nodes doing some kind of caching of the range requests? Would you be able to explain how this cache works so that I can understand scalability implications. Also, does my server even need to implement range requests if the boundary nodes are caching?

I assume this might make the boundary nodes able to respond more quickly to a request…I’m just not sure what’s really going on under-the-hood here, as it seems there is some machinery in-between the client and my Express server.

1 Like

Hey @lastmjs

Indeed, the boundary nodes cache slices of the file you are requesting: No matter what range you request, the boundary nodes request slices of 1MB in size, cache that and serve your requests from cache.

The relevant config is here and if you are interested you can read up on the following two articles that explain the intricacies of caching range requests: nginx on caching (in particular “Byte Range Caching”) and a general article on why caching ranges is difficult.

2 Likes

Is it still early next week? Any chance of this getting deployed soon?

Hey @lastmjs

We deployed another canary today and if all looks good tomorrow, we will roll it out to all boundary nodes.

1 Like

Hey @lastmjs

The version was rolled out earlier today. Range requests should now be supported on all boundary nodes. Let me know if that is not the case for you :slight_smile:

1 Like

Been testing all morning, preparing a demo. Thanks!

1 Like

It’s working beautifully, here’s the demo (original link from OP): https://f2j4a-eiaaa-aaaam-ab7nq-cai.raw.icp0.io/

Thanks for getting this done! I really appreciate it and many seem happy and excited about this.

2 Likes

Can you confirm that this is not working with certification? Or are you doing something fancy with certification to make it work as well?

I think this may be messing with our file serving some how. See ERR_HTTP2_PROTOCOL_ERROR for assets on canister.

Same file works from https://prptl.io/-/nszbk-7iaaa-aaaap-abczq-cai/-/64ba621a76bd639aa6484af4/-/logo.png our own proxy.