Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure - Sort order of List operation on blob container

What is the sort order of a list operation on a blob container? Is it like Azure Table Storage, where it is alphabetic?

like image 672
David Pfeffer Avatar asked Jan 19 '23 20:01

David Pfeffer


2 Answers

From the last line of "List Blobs" in MSDN - http://msdn.microsoft.com/en-us/library/dd135734.aspx

Blobs are listed in alphabetical order in the response body.


As an aside, in one of the PDC deep dive talks, the storage team talked about the fact that blobs are keyed on a combination of the container name and blob path, so this is what determines the list order - and it also determines "hot spots" if you are hitting blob storage for lots of similarly named files.

like image 168
Stuart Avatar answered Jan 27 '23 22:01

Stuart


Given that blobs supports an equivalent of the continuation tokens used by table storage (Marker/NextMarker) the order that blobs are returned in would have to be fixed. While it's not explicitly mentioned in the specs that we have access to, I suspect blobs will always be returned in alphabetic order. I'd be happy if someone from MS could verify this though.

like image 28
knightpfhor Avatar answered Jan 27 '23 21:01

knightpfhor