Refactoring - “top N” shard_size heuristic moved into new common BucketUtils class