Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reading a file creates a Bucket GET request #1198

Open
Lyon77 opened this issue Dec 10, 2024 · 2 comments
Open

Reading a file creates a Bucket GET request #1198

Lyon77 opened this issue Dec 10, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Lyon77
Copy link

Lyon77 commented Dec 10, 2024

Mountpoint for Amazon S3 version

mount-s3 1.8.0

AWS Region

us-east-1

Describe the running environment

Locally running mountpoint s3 against an AWS bucket using creds stored in the environment variables. Using Ubuntu 20.04

Mountpoint options

mount-s3 <bucket> <file_dir> --endpoint-url <endpoint> --read-only --force-path-style --auto-unmount --prefix <prefix>

What happened?

I'm trying to fetch thousands of really small files and I realized I was getting rate limited due to a rate limit imposed on the number of Bucket GET requests which are basically operations from mountpoint s3 trying to read the location per each file read.

I am not listing the contents of the bucket. I know what the file names are beforehand and are just reading each location without listing the folder. However, I am getting as many Bucket GET requests as Object GET and Object HEAD requests.

Is this expected? Is there a way to not list the folder every time I do a get request?

Relevant log output

No response

@Lyon77 Lyon77 added the bug Something isn't working label Dec 10, 2024
@vladem vladem closed this as completed Dec 16, 2024
@vladem vladem reopened this Dec 16, 2024
@vladem
Copy link
Contributor

vladem commented Dec 16, 2024

Hi, thank you for opening the issue. I assume that you see unexpected ListObjectsV2 requests and to those you refer with "Bucket GET requests". You've mentioned getting rate limited, are you getting 503 errors on ListObjectsV2 requests?

Before reading the file, Mountpoint will make both the ListObjectsV2 and HeadObject requests for the specified path. This mechanism is ensuring the shadowing semantics (e.g. directory dir/ "shadows" the file dir).

There were related issues opened previously:

You may avoid repeated ListObjectsV2 operations for the given file by using --metadata-ttl <SECONDS>. Also I see that you're already using the --prefix argument, choosing a longer prefix may reduce the number of ListObjectsV2 in case of nested directories.

@Lyon77
Copy link
Author

Lyon77 commented Dec 16, 2024

Ah I see. I missed the previous issues. I'll give a shot with --metadata-ttl indefinite and see if it helps. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants