0

As it seems, Azure now has an option to publicly serve the contents of Blob storage via HTTP, mainly intended for static websites. It is rather new and currently tagged as "preview".

I'd like to store binary releases (about 3 GB each version) of a game on Azure storage, and allow players to perform a differential update to any version using a zsync-like algorithm. For this way to work, it is crucial to be able to downloaded only specified chunks of a large file. Normally, this is achieved over HTTP by sending a multipart byteranges GET request.

The question is: is it possible to enable HTTP requests with multiple byteranges on the Azure "static website"?

UPDATE: As Itay Podhajcer mentioned, I don't need the "static website" feature for serving my blob storage over HTTP, I can directly open my storage container for public. However, multipart byteranges requests do not work with direct access to blob storage too.

stgatilov
  • 5,333
  • 31
  • 54

2 Answers2

1

The Azure Static Website service is intended more for Single Page Applications (such as Angular and React apps).

If you only need to store binary content to be downloaded by clients, I think you should be fine using the "regular" Blob container. To specify the a range header on a GET request, you can follow Specifying the Range Header for Blob Service Operations.

Hope it helps!

Itay Podhajcer
  • 2,616
  • 2
  • 9
  • 14
  • Do I understand you right that I can serve contents of Blob storage on a public HTTP address, and I don't even need "static website" thing? This is very strange. In fact, I cannot see any difference between serving static html+js+jpg+mp3 for browsers and serving binary content for downloading. – stgatilov Nov 30 '18 at 10:43
  • 1
    The static website has out-of-box support for relevant mime types (because you don't want to trigger a download when a user access your SPA and additionally, it should have the functionality to handle routes correctly. You should be able to set the container as a accessible from the internet (either at the content level or even the entire container level). – Itay Podhajcer Nov 30 '18 at 10:50
0

I managed to get multipart byteranges working by using CDN. The full list of actions is:

  1. Screw "static website" feature: as Itay Podhajcer wrote, it is absolutely unnecessary.
  2. Upgrade DefaultServiceVersion using Cloud Shell, as said here (to ensure that Accept-Ranges is included in HTTP headers).
  3. Enable "Standard Akamai" CDN to serve Blob Storage directly.

After that I can send multipart byteranges requests to the CDN endpoint, and it gives back multipart response with exactly the data I requested.

stgatilov
  • 5,333
  • 31
  • 54