Re:S3 is files, but not a filesystem
by johnmaguire on Sunday March 10, 2024 @11:21AM
(#39659874)
You're right that it won't work for all use cases, but starting two threads with prefixes A and M, for example, is one way you might achieve this.
For example, you can do separate parallel ListObjectV2 for files starting a-f and g-k, etc.. covering the whole key space. You can parallelize recursively based on what is found in the first 1000 entries so that it matches the statistics of the keys. Yes there may be pathological cases, but in practice we find this works very well.
How are you "parallelizing" the ListObjectsV2? The continuation token can be only fed in once the previous ListObjectsV2 response has completed, unless you know the name or structure of keys ahead of time, in which listing objects isn't necessary.