When there is length request for a binary( not present in local cache),S3DS just send HEAD request of binary in S3 to fetch the metadata. The actual binary is not retrieved and cached locally. The reason is that length is often needed in list pages and caching these binaries locally slow down the response time. The impact is higher if there is large binaries( say 1GB) are there in list pages.
Customer reported that in their application sees lot of HEAD request ( approx 1500) for the same binary as it is not cached in HEAD request. Now it seems that the bottleneck are the HEAD requests that are hitting the S3.
Solution: After completing HEAD request asynchronously cache binary. So next time binary's metadata request is fulfilled from local cache.